src/kernel/task/threads.c
/**
 * @note wakeup all the sleeping thread running on queue.
 * @param queue
 * @param queue_lock
 */
@note wakeup all the sleeping thread running on queue.
@param queue
@param queue_lock
@note wakeup all the sleeping thread running on queue . @param queue @param queue_lock
void wakeup_all_on_queue(queue_t * queue ,spinlock_t * queue_lock){
    ASSERT(queue_lock!=0);
    while(true){
        node_t * node=queue_get(queue);
        if(node==NULL){
            return;
        }
        thread_t * thread = node->data;
        threads_set_status(thread,THREADS_RUNNABLE);
        scheduler_add(thread);
    }
}
void wakeup_all_on_queue ( queue_t * queue , spinlock_t * queue_lock ) { ASSERT ( queue_lock != 0 ) ; while ( true ) { node_t * node = queue_get ( queue ) ; if ( node == NULL ) { return ; } thread_t * thread = node -> data ; threads_set_status ( thread , THREADS_RUNNABLE ) ; scheduler_add ( thread ) ; } }
@note wakeup all the sleeping thread running on queue.
@note wakeup all the sleeping thread running on queue .