Lines Matching refs:th

236 		thread_t th;  in ipc_mqueue_add_locked()  local
238 th = waitq_wakeup64_identify_locked(wqset, IPC_MQUEUE_RECEIVE, in ipc_mqueue_add_locked()
242 if (th == THREAD_NULL) { in ipc_mqueue_add_locked()
266 if (th->ith_state != MACH_RCV_IN_PROGRESS) { in ipc_mqueue_add_locked()
268 if (th->ith_state == MACH_PEEK_IN_PROGRESS) { in ipc_mqueue_add_locked()
276 th->ith_option, th); in ipc_mqueue_add_locked()
280 waitq_resume_identified_thread(wqset, th, in ipc_mqueue_add_locked()
293 msize = ipc_kmsg_copyout_size(kmsg, th->map); in ipc_mqueue_add_locked()
294 tsize = ipc_kmsg_trailer_size(th->ith_option, th->map); in ipc_mqueue_add_locked()
297 if (ipc_mqueue_msg_too_large(msize, tsize, asize, th->ith_option, in ipc_mqueue_add_locked()
298 &th->ith_recv_bufs)) { in ipc_mqueue_add_locked()
299 th->ith_state = MACH_RCV_TOO_LARGE; in ipc_mqueue_add_locked()
300 th->ith_msize = msize; in ipc_mqueue_add_locked()
301 th->ith_asize = asize; in ipc_mqueue_add_locked()
302 if (th->ith_option & MACH_RCV_LARGE) { in ipc_mqueue_add_locked()
306 th->ith_receiver_name = port_mqueue->imq_receiver_name; in ipc_mqueue_add_locked()
307 th->ith_kmsg = IKM_NULL; in ipc_mqueue_add_locked()
308 th->ith_seqno = 0; in ipc_mqueue_add_locked()
310 waitq_resume_identified_thread(wqset, th, in ipc_mqueue_add_locked()
316 th->ith_state = MACH_MSG_SUCCESS; in ipc_mqueue_add_locked()
331 th->ith_kmsg = kmsg; in ipc_mqueue_add_locked()
332 th->ith_seqno = port_mqueue->imq_seqno++; in ipc_mqueue_add_locked()
334 waitq_resume_identified_thread(wqset, th, in ipc_mqueue_add_locked()