Changeset 80649a91 in mainline for libc/generic/thread.c
- Timestamp:
- 2006-05-21T19:28:37Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a410beb
- Parents:
- 1ee11f4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libc/generic/thread.c
r1ee11f4 r80649a91 34 34 #include <psthread.h> 35 35 #include <string.h> 36 #include <async.h> 36 37 37 38 #include <stdio.h> … … 81 82 * 82 83 * @param uarg Pointer to userspace argument structure. 84 * 85 * TODO: Thread stack pages memory leak 83 86 */ 84 87 void __thread_main(uspace_arg_t *uarg) 85 88 { 86 tcb_t *tcb; 87 /* This should initialize the area according to TLS specicification */ 88 tcb = __make_tls(); 89 __tcb_set(tcb); 90 psthread_setup(tcb); 89 psthread_data_t *pt; 90 91 pt = psthread_setup(); 92 __tcb_set(pt->tcb); 93 94 async_create_manager(); 91 95 92 96 uarg->uspace_thread_function(uarg->uspace_thread_arg); … … 94 98 free(uarg); 95 99 96 psthread_teardown(tcb->pst_data);97 __free_tls(tcb);100 async_destroy_manager(); 101 psthread_teardown(pt); 98 102 99 103 thread_exit(0);
Note:
See TracChangeset
for help on using the changeset viewer.