pub fn awaken_one(&self) -> bool {
        let mut q = self.q.lock();

        // This loop will discard dead processes
        while let Some(pid) = q.pop_front() {
            if let Some(process) = process::by_id(pid) {
                if scheduler::awaken(process).is_ok() {
                    // Since we woke this process up, it should be the last to
                    // wake up next time (assuming it doesn't remove itself from
                    // the queue before then)
                    q.push_back(pid);

                    // We were able to wake a process
                    return true;
                }
            }
        }

        // No processes waiting
        false
    }
/// Awaken a single process waiting on this wait queue.
///
/// The process that we awaken will be moved to the end of the queue.
///
/// Returns true if a process was awakened, otherwise false if the queue was
/// empty.
Awaken a single process waiting on this wait queue.
The process that we awaken will be moved to the end of the queue.

Returns true if a process was awakened, otherwise false if the queue was
empty.
Awaken a single process waiting on this wait queue . The process that we awaken will be moved to the end of the queue . Returns true if a process was awakened otherwise false if the queue was empty .
pub fn awaken_one(&self) -> bool {
        let mut q = self.q.lock();
        // This loop will discard dead processes
        while let Some(pid) = q.pop_front() {
            if let Some(process) = process::by_id(pid) {
                if scheduler::awaken(process).is_ok() {
                    // Since we woke this process up, it should be the last to
                    // wake up next time (assuming it doesn't remove itself from
                    // the queue before then)
                    q.push_back(pid);
                    // We were able to wake a process
                    return true;
                }
            }
        }
        // No processes waiting
        false
    }
pub fn awaken_one ( & self ) -> bool { let mut q = self . q . lock ( ) ; // This loop will discard dead processes while let Some ( pid ) = q . pop_front ( ) { if let Some ( process ) = process :: by_id ( pid ) { if scheduler :: awaken ( process ) . is_ok ( ) { // Since we woke this process up, it should be the last to // wake up next time (assuming it doesn't remove itself from // the queue before then) q . push_back ( pid ) ; // We were able to wake a process return true ; } } } // No processes waiting false }
Awaken a single process waiting on this wait queue.
Awaken a single process waiting on this wait queue .
&self