Naive implementation of transfer_area(). It follows the suggested sematics

of the resolved ToDo, but could probably be made more efficient. Instead of
transfering the area, the area is cloned into the target teams' address space
and the original is deleted. This generates a new area_id for the transfered
area (as suggested by the ToDo). Updated syscall prototypes according to the
status_t to area_id return type change.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24320 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2008-03-09 12:56:59 +00:00
parent e53032e55d
commit d1189f0b05
4 changed files with 22 additions and 109 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ extern status_t _kern_unlock_node(int fd);
// extern status_t _kern_get_area_info(area_id area, area_info *info);
// extern status_t _kern_get_next_area_info(team_id team, int32 *cookie, area_info *info);
// extern status_t _kern_resize_area(area_id area, size_t newSize);
// extern status_t _kern_transfer_area(area_id area, void **_address, uint32 addressSpec,
// extern area_id _kern_transfer_area(area_id area, void **_address, uint32 addressSpec,
// team_id target);
// extern status_t _kern_set_area_protection(area_id area, uint32 newProtection);
// extern area_id _kern_clone_area(const char *name, void **_address, uint32 addressSpec,
+1 -1
View File
@@ -234,7 +234,7 @@ extern area_id _kern_find_area(const char *name);
extern status_t _kern_get_area_info(area_id area, area_info *info);
extern status_t _kern_get_next_area_info(team_id team, int32 *cookie, area_info *info);
extern status_t _kern_resize_area(area_id area, size_t newSize);
extern status_t _kern_transfer_area(area_id area, void **_address, uint32 addressSpec,
extern area_id _kern_transfer_area(area_id area, void **_address, uint32 addressSpec,
team_id target);
extern status_t _kern_set_area_protection(area_id area, uint32 newProtection);
extern area_id _kern_clone_area(const char *name, void **_address, uint32 addressSpec,
+1 -1
View File
@@ -149,7 +149,7 @@ area_id _user_find_area(const char *name);
status_t _user_get_area_info(area_id area, area_info *info);
status_t _user_get_next_area_info(team_id team, int32 *cookie, area_info *info);
status_t _user_resize_area(area_id area, size_t newSize);
status_t _user_transfer_area(area_id area, void **_address, uint32 addressSpec,
area_id _user_transfer_area(area_id area, void **_address, uint32 addressSpec,
team_id target);
status_t _user_set_area_protection(area_id area, uint32 newProtection);
area_id _user_clone_area(const char *name, void **_address, uint32 addressSpec,