* Added [un]lock_memory_etc() versions that accept a team_id as first argument.

This allows drivers to lock the memory outside of the original team context.
* create_area_etc() got a struct team as first argument, but that should have
  been a team_id.
* Removed delete_area_etc() - there is already vm_delete_area() doing the same
  thing.
* Renamed vm_get_address_space_by_id() to vm_get_address_space(), as there is
  no other method of getting an address space.
* Removed erroneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26455 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-07-16 22:55:17 +00:00
parent cb9191556c
commit 736352dcf5
9 changed files with 89 additions and 73 deletions
+3 -2
View File
@@ -1457,8 +1457,9 @@ elf_load_user_image(const char *path, struct team *team, int flags, addr_t *entr
snprintf(regionName, B_OS_NAME_LENGTH, "%s_bss%d", baseName, i);
regionAddress += fileUpperBound;
id = create_area_etc(team, regionName, (void **)&regionAddress,
B_EXACT_ADDRESS, bss_size, B_NO_LOCK, B_READ_AREA | B_WRITE_AREA);
id = create_area_etc(team->id, regionName,
(void **)&regionAddress, B_EXACT_ADDRESS, bss_size,
B_NO_LOCK, B_READ_AREA | B_WRITE_AREA);
if (id < B_OK) {
dprintf("error allocating bss area: %s!\n", strerror(id));
status = B_NOT_AN_EXECUTABLE;