Subversion Repositories HelenOS

Rev

Rev 3597 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3597 Rev 4377
Line 107... Line 107...
107
    uarg->uspace_thread_function = function;
107
    uarg->uspace_thread_function = function;
108
    uarg->uspace_thread_arg = arg;
108
    uarg->uspace_thread_arg = arg;
109
    uarg->uspace_uarg = uarg;
109
    uarg->uspace_uarg = uarg;
110
   
110
   
111
    rc = __SYSCALL4(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name,
111
    rc = __SYSCALL4(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name,
112
        (sysarg_t) strlen(name), (sysarg_t) tid);
112
        (sysarg_t) str_size(name), (sysarg_t) tid);
113
   
113
   
114
    if (rc) {
114
    if (rc) {
115
        /*
115
        /*
116
         * Failed to create a new thread.
116
         * Failed to create a new thread.
117
         * Free up the allocated structures.
117
         * Free up the allocated structures.
Line 128... Line 128...
128
 * @param status Exit status. Currently not used.
128
 * @param status Exit status. Currently not used.
129
 */
129
 */
130
void thread_exit(int status)
130
void thread_exit(int status)
131
{
131
{
132
    __SYSCALL1(SYS_THREAD_EXIT, (sysarg_t) status);
132
    __SYSCALL1(SYS_THREAD_EXIT, (sysarg_t) status);
-
 
133
    for (;;)
-
 
134
        ;
133
}
135
}
134
 
136
 
135
/** Detach thread.
137
/** Detach thread.
136
 *
138
 *
137
 * Currently not implemented.
139
 * Currently not implemented.
Line 150... Line 152...
150
 *
152
 *
151
 * @return Thread exit status.
153
 * @return Thread exit status.
152
 */
154
 */
153
int thread_join(thread_id_t thread)
155
int thread_join(thread_id_t thread)
154
{
156
{
-
 
157
    return 0;
155
}
158
}
156
 
159
 
157
/** Get current thread ID.
160
/** Get current thread ID.
158
 *
161
 *
159
 * @return Current thread ID.
162
 * @return Current thread ID.