Lines Matching refs:queue

157 static void OSi_InsertLinkToQueue(OSThreadQueue *queue, OSThread *thread)  in OSi_InsertLinkToQueue()  argument
159 OSThread *next = queue->head; in OSi_InsertLinkToQueue()
172 OSThread *prev = queue->tail; in OSi_InsertLinkToQueue()
176 queue->head = thread; in OSi_InsertLinkToQueue()
185 queue->tail = thread; in OSi_InsertLinkToQueue()
193 queue->head = thread; in OSi_InsertLinkToQueue()
215 static OSThread *OSi_RemoveLinkFromQueue(OSThreadQueue *queue) in OSi_RemoveLinkFromQueue() argument
217 OSThread *t = queue->head; in OSi_RemoveLinkFromQueue()
223 queue->head = next; in OSi_RemoveLinkFromQueue()
231 queue->tail = NULL; in OSi_RemoveLinkFromQueue()
232 t->queue = NULL; in OSi_RemoveLinkFromQueue()
248 static OSThread *OSi_RemoveSpecifiedLinkFromQueue(OSThreadQueue *queue, OSThread *thread) in OSi_RemoveSpecifiedLinkFromQueue() argument
250 OSThread *t = queue->head; in OSi_RemoveSpecifiedLinkFromQueue()
263 if (queue->head == t) in OSi_RemoveSpecifiedLinkFromQueue()
265 queue->head = next; in OSi_RemoveSpecifiedLinkFromQueue()
273 if (queue->tail == t) in OSi_RemoveSpecifiedLinkFromQueue()
275 queue->tail = prev; in OSi_RemoveSpecifiedLinkFromQueue()
300 OSMutex *OSi_RemoveMutexLinkFromQueue(OSMutexQueue * queue) in OSi_RemoveMutexLinkFromQueue() argument
302 OSMutex *t = queue->head; in OSi_RemoveMutexLinkFromQueue()
308 queue->head = next; in OSi_RemoveMutexLinkFromQueue()
316 queue->tail = NULL; in OSi_RemoveMutexLinkFromQueue()
698 thread->queue = NULL; in OS_CreateThread()
803 if (currentThread->queue) in OSi_ExitThread_Destroy()
805 (void)OSi_RemoveSpecifiedLinkFromQueue(currentThread->queue, currentThread); in OSi_ExitThread_Destroy()
895 if (thread->queue) in OS_DestroyThread()
897 (void)OSi_RemoveSpecifiedLinkFromQueue(thread->queue, thread); in OS_DestroyThread()
1141 void OS_SleepThreadDirect(OSThread *thread, OSThreadQueue *queue) in OS_SleepThreadDirect() argument
1151 if (queue) in OS_SleepThreadDirect()
1154 *queue |= (OSThreadQueue)(1UL << thread->id); in OS_SleepThreadDirect()
1156 thread->queue = queue; in OS_SleepThreadDirect()
1157 OSi_InsertLinkToQueue(queue, thread); in OS_SleepThreadDirect()
1176 void OS_SleepThread(OSThreadQueue *queue) in OS_SleepThread() argument
1187 if (queue) in OS_SleepThread()
1189 *queue |= (OSThreadQueue)(1UL << currentThread->id); in OS_SleepThread()
1200 if (queue) in OS_SleepThread()
1202 currentThread->queue = queue; in OS_SleepThread()
1203 OSi_InsertLinkToQueue(queue, currentThread); in OS_SleepThread()
1222 void OS_WakeupThread(OSThreadQueue *queue) in OS_WakeupThread() argument
1230 SDK_ASSERT(queue); in OS_WakeupThread()
1234 mask = (u32)*queue; in OS_WakeupThread()
1249 OS_InitThreadQueue(queue); in OS_WakeupThread()
1253 if (queue->head) in OS_WakeupThread()
1255 while (queue->head) in OS_WakeupThread()
1257 OSThread *thread = OSi_RemoveLinkFromQueue(queue); in OS_WakeupThread()
1260 thread->queue = NULL; in OS_WakeupThread()
1264 OS_InitThreadQueue(queue); in OS_WakeupThread()
1441 (thread->queue) ? thread->queue->head : (OSThread *)1, in OS_DumpThreadList()
1442 (thread->queue) ? thread->queue->tail : (OSThread *)1, thread->link.prev, in OS_DumpThreadList()