xref: /haiku/src/system/libroot/os/area.c (revision 893988af824e65e49e55f517b157db8386e8002b)
1 /*
2 ** Copyright 2002, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 ** Distributed under the terms of the OpenBeOS License.
4 */
5 
6 
7 #include <OS.h>
8 #include "syscalls.h"
9 
10 
11 area_id
12 create_area(const char *name, void **address, uint32 addressSpec, size_t size,
13 	uint32 lock, uint32 protection)
14 {
15 	return _kern_create_area(name, address, addressSpec, size, lock, protection);
16 }
17 
18 
19 area_id
20 clone_area(const char *name, void **address, uint32 addressSpec,
21 	uint32 protection, area_id sourceArea)
22 {
23 	return _kern_clone_area(name, address, addressSpec, protection, sourceArea);
24 }
25 
26 
27 area_id
28 find_area(const char *name)
29 {
30 	return _kern_find_area(name);
31 }
32 
33 
34 area_id
35 area_for(void *address)
36 {
37 	return _kern_area_for(address);
38 }
39 
40 
41 status_t
42 delete_area(area_id id)
43 {
44 	return _kern_delete_area(id);
45 }
46 
47 
48 status_t
49 resize_area(area_id id, size_t newSize)
50 {
51 	return _kern_resize_area(id, newSize);
52 }
53 
54 
55 status_t
56 set_area_protection(area_id id, uint32 protection)
57 {
58 	return _kern_set_area_protection(id, protection);
59 }
60 
61 
62 status_t
63 _get_area_info(area_id id, area_info *areaInfo, size_t size)
64 {
65 	// size is not yet used, but may, if area_info changes
66 	(void)size;
67 
68 	return _kern_get_area_info(id, areaInfo);
69 }
70 
71 
72 status_t
73 _get_next_area_info(team_id team, int32 *cookie, area_info *areaInfo, size_t size)
74 {
75 	// size is not yet used, but may, if area_info changes
76 	(void)size;
77 
78 	return _kern_get_next_area_info(team, cookie, areaInfo);
79 }
80 
81