* Changed _kern_spawn_thread() and create_thread(): Instead of individual
arguments they get a single thread_creation_attributes structure now. * Added stack_address and stack_size to thread_creation_attributes, which allow to specify the stack size or the stack to be used for the new user thread. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25389 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -20,6 +20,21 @@
|
||||
|
||||
struct kernel_args;
|
||||
struct select_info;
|
||||
struct thread_creation_attributes;
|
||||
|
||||
struct thread_creation_attributes {
|
||||
int32 (*entry)(thread_func, void *);
|
||||
const char* name;
|
||||
int32 priority;
|
||||
void* args1;
|
||||
void* args2;
|
||||
void* stack_address;
|
||||
size_t stack_size;
|
||||
|
||||
// when calling kernel only
|
||||
team_id team;
|
||||
thread_id thread;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -89,7 +104,7 @@ status_t _user_rename_thread(thread_id thread, const char *name);
|
||||
status_t _user_suspend_thread(thread_id thread);
|
||||
status_t _user_resume_thread(thread_id thread);
|
||||
status_t _user_rename_thread(thread_id thread, const char *name);
|
||||
thread_id _user_spawn_thread(thread_entry_func entry, const char *name, int32 priority, void *arg1, void *arg2);
|
||||
thread_id _user_spawn_thread(struct thread_creation_attributes* attributes);
|
||||
status_t _user_wait_for_thread(thread_id id, status_t *_returnCode);
|
||||
status_t _user_snooze_etc(bigtime_t timeout, int timebase, uint32 flags);
|
||||
status_t _user_kill_thread(thread_id thread);
|
||||
|
||||
Reference in New Issue
Block a user