Files
haiku-beta6/headers/private/kernel/user_runtime.h
T

45 lines
1.1 KiB
C
Raw Normal View History

2002-07-09 12:24:59 +00:00
/*
** Copyright 2002, Manuel J. Petit. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#ifndef KERNEL_USER_RUNTIME_H_
#define KERNEL_USER_RUNTIME_H_
2002-07-09 12:24:59 +00:00
#include <image.h>
2002-07-09 12:24:59 +00:00
#include <defines.h>
#define MAGIC_APP_NAME "_APP_"
2002-07-09 12:24:59 +00:00
struct rld_export
2002-07-09 12:24:59 +00:00
{
// runtime linker API export
image_id (*load_add_on)(char const *path, uint32 flags);
status_t (*unload_add_on)(image_id imageID);
status_t (*get_image_symbol)(image_id imageID, char const *symbolName,
int32 symbolType, void **_location);
2003-01-12 16:36:30 +00:00
status_t (*get_nth_image_symbol)(image_id imageID, int32 num, char *symbolName,
int32 *nameLength, int32 *symbolType, void **_location);
2002-07-09 12:24:59 +00:00
};
struct uspace_program_args
2002-07-09 12:24:59 +00:00
{
char program_name[SYS_MAX_OS_NAME_LEN];
char program_path[SYS_MAX_PATH_LEN];
2002-07-09 12:24:59 +00:00
int argc;
int envc;
char **argv;
char **envp;
/*
* hooks into rld for POSIX and BeOS library/module loading
*/
struct rld_export *rld_export;
2002-07-09 12:24:59 +00:00
};
typedef void (libinit_f)(unsigned, struct uspace_program_args const *);
2002-07-09 12:24:59 +00:00
//void INIT_BEFORE_CTORS(unsigned, struct uspace_prog_args const *);
//void INIT_AFTER_CTORS(unsigned, struct uspace_prog_args const *);
2002-07-09 12:24:59 +00:00
#endif /* KERNEL_USER_RUNTIME_H_ */