Question about wait queue

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

 



Hi list,
 
When reading the kernel codes, I get confused about the following questions:
 
1. Within the struct __wait_queue, there is a pointer "wait_queue_func_t". Is it true that in most cases it is pointed to "default_wake_function" ?
 
2. The "default_wake_function" actually wake up the current task by invoking "try_to_wake_up". I create a simple wait_queque like structure, with only a spin_lock, a task pointer and a list head. Then the question is can I wake up a task in such a simple wait queue by simply doing something like "current->state = TASK_RUNNING" and remove the task from the queue?
 
Maybe the questions are naive or even not good questions, but any hint will be really appreciated.
 
TIA
 
justin

[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