Ticket #7235: pthread.diff
File pthread.diff, 1.6 KB (added by , 13 years ago) |
---|
-
headers/private/libroot/libroot_private.h
41 41 void __reinit_pwd_backend_after_fork(void); 42 42 void* __arch_get_caller(void); 43 43 44 void __init_pthread(void); 44 45 46 45 47 #ifdef __cplusplus 46 48 } 47 49 #endif -
src/system/libroot/posix/pthread/pthread.c
29 29 }; 30 30 31 31 32 void __init_pthread(void); 32 33 static pthread_thread sMainThread; 33 34 static int sConcurrencyLevel; 34 35 … … 93 94 } 94 95 95 96 97 void 98 __init_pthread(void) 99 { 100 sMainThread.id = find_thread(NULL); 101 } 102 103 96 104 // #pragma mark - public API 97 105 98 106 -
src/system/libroot/os/thread.c
99 99 attributes.stack_address = NULL; 100 100 attributes.stack_size = 0; 101 101 102 return _kern_spawn_thread(&attributes); 102 thread->id = _kern_spawn_thread(&attributes); 103 return thread->id; 103 104 } 104 105 105 106 -
src/system/libroot/libroot_init.c
60 60 __init_env(__gRuntimeLoader->program_args); 61 61 __init_heap_post_env(); 62 62 __init_pwd_backend(); 63 __init_pthread(); 63 64 } 64 65 65 66