24 |
#include "libkern.h" |
#include "libkern.h" |
25 |
#include "queue.h" |
#include "queue.h" |
26 |
#include "ipc-tqueue.h" |
#include "ipc-tqueue.h" |
27 |
|
#include "host.h" |
28 |
|
|
29 |
bool thread_system_running = false; |
bool thread_system_running = false; |
30 |
|
|
192 |
SPLON (spl); |
SPLON (spl); |
193 |
|
|
194 |
trace_count (n_threads++); |
trace_count (n_threads++); |
195 |
|
host_info_basic.threads++; |
196 |
|
|
197 |
*threadp = thread; |
*threadp = thread; |
198 |
return KERN_SUCCESS; |
return KERN_SUCCESS; |
241 |
kmem_cache_free (thread_cache, thread); |
kmem_cache_free (thread_cache, thread); |
242 |
|
|
243 |
trace_count (n_threads--); |
trace_count (n_threads--); |
244 |
|
host_info_basic.threads--; |
245 |
} |
} |
246 |
|
|
247 |
/* Terminate THREAD. */ |
/* Terminate THREAD. */ |
398 |
|
|
399 |
/* Insert right into tasks IPC object. */ |
/* Insert right into tasks IPC object. */ |
400 |
|
|
401 |
|
ipc_object_lock (THREAD_CURRENT()->task->ipc_object); |
402 |
kr = ipc_object_copyout (THREAD_CURRENT()->task->ipc_object, reply_port, |
kr = ipc_object_copyout (THREAD_CURRENT()->task->ipc_object, reply_port, |
403 |
RTMK_MSG_TYPE_MOVE_RECEIVE, &reply_name); |
RTMK_MSG_TYPE_MOVE_RECEIVE, &reply_name); |
404 |
|
ipc_object_unlock (THREAD_CURRENT()->task->ipc_object); |
405 |
assert (kr == KERN_SUCCESS); |
assert (kr == KERN_SUCCESS); |
406 |
return reply_name; |
return reply_name; |
407 |
} |
} |