Implemented the complete BeOS image API, added kernel image API syscalls,

added it to the build.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2437 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2003-01-12 17:11:53 +00:00
parent 0c79589d60
commit f9f3e26e3c
3 changed files with 73 additions and 0 deletions

View File

@ -5,6 +5,7 @@ KernelMergeObject os_main.o :
<$(SOURCE_GRIST)>debug.c
<$(SOURCE_GRIST)>fs_attr.c
<$(SOURCE_GRIST)>fs_index.c
<$(SOURCE_GRIST)>image.c
<$(SOURCE_GRIST)>port.c
<$(SOURCE_GRIST)>sem.c
<$(SOURCE_GRIST)>systeminfo.c

View File

@ -0,0 +1,66 @@
/*
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License.
*/
#include <OS.h>
#include <image.h>
#include "syscalls.h"
#include "user_runtime.h"
void __init__image(struct uspace_program_args const *);
static struct rld_export const *gRuntimeLinker;
image_id
load_add_on(char const *name)
{
return gRuntimeLinker->load_add_on(name, 0);
}
status_t
unload_add_on(image_id id)
{
return gRuntimeLinker->unload_add_on(id);
}
status_t
get_image_symbol(image_id id, char const *symbolName, int32 symbolType, void **_location)
{
return gRuntimeLinker->get_image_symbol(id, symbolName, symbolType, _location);
}
status_t
get_nth_image_symbol(image_id id, int32 num, char *nameBuffer, int32 *_nameLength,
int32 *_symbolType, void **_location)
{
return gRuntimeLinker->get_nth_image_symbol(id, num, nameBuffer, _nameLength, _symbolType, _location);
}
status_t
_get_image_info(image_id id, image_info *info, size_t infoSize)
{
return sys_get_image_info(id, info, infoSize);
}
status_t
_get_next_image_info(team_id team, int32 *cookie, image_info *info, size_t infoSize)
{
return sys_get_next_image_info(team, cookie, info, infoSize);
}
void
__init__image(struct uspace_program_args const *args)
{
gRuntimeLinker = args->rld_export;
}

View File

@ -111,6 +111,12 @@ SYSCALL3(sys_get_next_thread_info, 89)
SYSCALL2(sys_get_team_info, 90)
SYSCALL2(sys_get_next_team_info, 91)
/* image calls */
SYSCALL2(sys_register_image, 114)
SYSCALL1(sys_unregister_image, 115)
SYSCALL3(sys_get_image_info, 116)
SYSCALL4(sys_get_next_image_info, 117)
/* VM calls */
SYSCALL6(sys_vm_create_anonymous_region, 29)
SYSCALL6(sys_vm_clone_region, 30)