Added another argument parameter for the thread creation code. Helps

implementing a more efficient on_exit_thread().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3073 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2003-04-18 09:21:22 +00:00
parent f68d61b912
commit a02a5888af
6 changed files with 6 additions and 5 deletions

View File

@ -13,7 +13,7 @@ void arch_thread_init_tls(struct thread *thread);
void arch_thread_context_switch(struct thread *t_from, struct thread *t_to);
int arch_thread_init_kthread_stack(struct thread *t, int (*start_func)(void), void (*entry_func)(void), void (*exit_func)(void));
void arch_thread_dump_info(void *info);
void arch_thread_enter_uspace(struct thread *t, addr entry, void *args);
void arch_thread_enter_uspace(struct thread *t, addr entry, void *args1, void *args2);
void arch_thread_switch_kstack_and_call(struct thread *t, addr new_kstack, void (*func)(void *), void *arg);
//struct thread *arch_thread_get_current_thread(void);

View File

@ -90,7 +90,7 @@ struct iframe {
void setup_system_time(unsigned int cv_factor);
void i386_context_switch(struct arch_thread *old_state, struct arch_thread *new_state, addr new_pgdir);
void i386_enter_uspace(addr entry, void *args, addr ustack_top);
void i386_enter_uspace(addr entry, void *args1, void *args2, addr ustack_top);
void i386_set_tss_and_kstack(addr kstack);
void i386_switch_stack_and_call(addr stack, void (*func)(void *), void *arg);
void i386_swap_pgdir(addr new_pgdir);

View File

@ -42,7 +42,7 @@ int sys_set_sem_owner(sem_id id, team_id proc);
void sys_exit(int retcode);
team_id sys_create_team(const char *path, const char *name, char **args, int argc, char **envp, int envc, int priority);
thread_id sys_spawn_thread(int32 (*func)(void*), const char *, int32, void *);
thread_id sys_spawn_thread(int32 (*func)(thread_func, void *), const char *, int32, void *, void *);
thread_id sys_get_current_thread_id(void);
int sys_suspend_thread(thread_id tid);
int sys_resume_thread(thread_id tid);

View File

@ -71,7 +71,7 @@ int user_team_wait_for_team(team_id id, int *uretcode);
status_t user_set_thread_priority(thread_id thread, int32 newPriority);
status_t user_suspend_thread(thread_id thread);
status_t user_resume_thread(thread_id thread);
thread_id user_spawn_thread(thread_func func, const char *name, int32 priority, void *arg);
thread_id user_spawn_thread(thread_func func, const char *name, int32 priority, void *arg1, void *arg2);
status_t user_wait_for_thread(thread_id id, status_t *returnCode);
status_t user_wait_for_team(team_id id, status_t *returnCode);
status_t user_snooze_etc(bigtime_t timeout, int timebase, uint32 flags);

View File

@ -113,7 +113,7 @@ struct thread {
/* this field may only stay in debug builds in the future*/
thread_func entry;
void *args;
void *args1, *args2;
struct team *team;
status_t return_code;
sem_id return_code_sem;

View File

@ -16,6 +16,7 @@ enum {
TLS_THREAD_ID_SLOT,
TLS_ERRNO_SLOT,
TLS_ON_EXIT_THREAD_SLOT,
// Note: these entries can safely be changed between
// releases; 3rd party code always calls tls_allocate()