RE: waking up a single process from the wait queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Raghu

What you can do is you can add the process to a separate wait queue instead
of adding it 
to default wait queue and then wakeup this process.

So you can define a wait queue as
	wait_queue_head_t	wq;

And you can add a process to wait queue using
	init_waitqueue_head(&wq);
	interruptible_sleep_on(&wq);
Now you can wake up this process using
	wake_up_interruptible(&wq);

HTS
-Aniruddha

-----Original Message-----
From: Raghu R. Arur [mailto:rra2002@cs.columbia.edu]
Sent: Monday, December 02, 2002 4:35 AM
To: kernelnewbies@nl.linux.org
Subject: waking up a single process from the wait queue



 HI,

  How can we wake up only a single process from the wait queue??? we use 
wake_up to wake up the processes from the wait queue.. but wake_up wakes 
up all the processes on the wait queue. 

  it invokes wake_up_common() which wakes up nr exclusive tasks and all 
non exclusive tasks... so how can we make wait queue to have exclusive 
tasks...

 thanks,
raghu

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux