beos compatibility fixes: exit_thread now issues a signal; wait_for_thread returns B_INTERRUPTED if target thread gets killed
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1674 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -156,7 +156,7 @@ enum {
|
||||
|
||||
extern sem_id create_sem(int32 count, const char *name);
|
||||
extern status_t delete_sem(sem_id id);
|
||||
extern status_t delete_sem_etc(sem_id id, status_t returnCode); /* ToDo: not public BeOS */
|
||||
extern status_t delete_sem_etc(sem_id id, status_t returnCode, bool interrupted); /* ToDo: not public BeOS */
|
||||
extern status_t acquire_sem(sem_id id);
|
||||
extern status_t acquire_sem_etc(sem_id id, int32 count, uint32 flags, bigtime_t timeout);
|
||||
extern status_t release_sem(sem_id id);
|
||||
|
||||
@@ -48,6 +48,7 @@ thread_id sys_get_current_thread_id(void);
|
||||
int sys_suspend_thread(thread_id tid);
|
||||
int sys_resume_thread(thread_id tid);
|
||||
int sys_kill_thread(thread_id tid);
|
||||
void sys_exit_thread(status_t return_value);
|
||||
|
||||
status_t sys_wait_on_thread(thread_id tid, status_t *retcode);
|
||||
int sys_kill_team(team_id tid);
|
||||
|
||||
@@ -52,9 +52,10 @@ enum {
|
||||
TEAM_STATE_DEATH // being killed
|
||||
};
|
||||
|
||||
#define SIG_NONE 0
|
||||
#define SIG_SUSPEND 1
|
||||
#define SIG_KILL 2
|
||||
|
||||
#define THREAD_RETURN_EXIT 0x1
|
||||
#define THREAD_RETURN_INTERRUPTED 0x2
|
||||
|
||||
|
||||
/**
|
||||
* The team structure; equivalent to a common process.
|
||||
@@ -128,7 +129,9 @@ struct thread {
|
||||
addr entry;
|
||||
void *args;
|
||||
struct team *team;
|
||||
status_t return_code;
|
||||
sem_id return_code_sem;
|
||||
int return_flags;
|
||||
region_id kernel_stack_region_id;
|
||||
addr kernel_stack_base;
|
||||
region_id user_stack_region_id;
|
||||
|
||||
Reference in New Issue
Block a user