Changeset 201abde in mainline for uspace/libc/generic/thread.c
- Timestamp:
- 2007-04-07T20:06:52Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7e58979
- Parents:
- 6adbe3c2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/libc/generic/thread.c
r6adbe3c2 r201abde 125 125 * @param arg Argument to be passed to thread. 126 126 * @param name Symbolic name of the thread. 127 * 128 * @return TID of the new thread on success or -1 on failure. 129 */ 130 int thread_create(void (* function)(void *), void *arg, char *name) 127 * @param tid Thread ID of the newly created thread. 128 * 129 * @return Zero on success or a code from @ref errno.h on failure. 130 */ 131 int thread_create(void (* function)(void *), void *arg, char *name, thread_id_t *tid) 131 132 { 132 133 char *stack; … … 149 150 uarg->uspace_uarg = uarg; 150 151 151 return __SYSCALL 2(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name);152 return __SYSCALL3(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name, (sysarg_t) tid); 152 153 } 153 154 … … 167 168 * @param thread TID. 168 169 */ 169 void thread_detach( int thread)170 void thread_detach(thread_id_t thread) 170 171 { 171 172 } … … 179 180 * @return Thread exit status. 180 181 */ 181 int thread_join( int thread)182 int thread_join(thread_id_t thread) 182 183 { 183 184 } … … 187 188 * @return Current thread ID. 188 189 */ 189 int thread_get_id(void) 190 { 191 return __SYSCALL0(SYS_THREAD_GET_ID); 190 thread_id_t thread_get_id(void) 191 { 192 thread_id_t thread_id; 193 194 (void) __SYSCALL1(SYS_THREAD_GET_ID, (sysarg_t) &thread_id); 195 196 return thread_id; 192 197 } 193 198
Note:
See TracChangeset
for help on using the changeset viewer.