Subversion Repositories HelenOS

Rev

Rev 1653 | Rev 1781 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1653 Rev 1709
Line 115... Line 115...
115
 *
115
 *
116
 * @param function Function implementing the thread.
116
 * @param function Function implementing the thread.
117
 * @param arg Argument to be passed to thread.
117
 * @param arg Argument to be passed to thread.
118
 * @param name Symbolic name of the thread.
118
 * @param name Symbolic name of the thread.
119
 *
119
 *
120
 * @param TID of the new thread on success or -1 on failure.
120
 * @return TID of the new thread on success or -1 on failure.
121
 */
121
 */
122
int thread_create(void (* function)(void *), void *arg, char *name)
122
int thread_create(void (* function)(void *), void *arg, char *name)
123
{
123
{
124
    char *stack;
124
    char *stack;
125
    uspace_arg_t *uarg;
125
    uspace_arg_t *uarg;
Line 143... Line 143...
143
    return __SYSCALL2(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name);
143
    return __SYSCALL2(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name);
144
}
144
}
145
 
145
 
146
/** Terminate current thread.
146
/** Terminate current thread.
147
 *
147
 *
148
 * @param stat Exit status. Currently not used.
148
 * @param status Exit status. Currently not used.
149
 */
149
 */
150
void thread_exit(int status)
150
void thread_exit(int status)
151
{
151
{
152
    __SYSCALL1(SYS_THREAD_EXIT, (sysarg_t) status);
152
    __SYSCALL1(SYS_THREAD_EXIT, (sysarg_t) status);
153
}
153
}