LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   need information about wait_event_interruptible ( ) ? (https://www.linuxquestions.org/questions/linux-kernel-70/need-information-about-wait_event_interruptible-701616/)

tanniru 02-02-2009 07:08 AM

need information about wait_event_interruptible ( ) ?
 
Hi,

DDG says wait_event_interruptible( )puts your process to sleep, which can interruptible by signals.

If I use this call in a char device driver ioctl( ) implementation, will this function puts entire process into sleep mode?

Is there any function which puts only thread (not process) to sleep ?

Thanks for your help.

sundialsvcs 02-03-2009 09:18 AM

Kernel implementations of threading do vary, e.g. between 2.4 and 2.6. But as you will see from a cursory examination of the source code, "a process is effectively 'a collection of threads.' " The basic dispatchable-unit is a thread.

tanniru 02-04-2009 12:03 AM

Quote:

Originally Posted by sundialsvcs (Post 3430402)
Kernel implementations of threading do vary, e.g. between 2.4 and 2.6. But as you will see from a cursory examination of the source code, "a process is effectively 'a collection of threads.' " The basic dispatchable-unit is a thread.

I am working on Linux 2.6 kernel. Below is my requirement:
My user application is a multi-thread program. From one of the thread, I am calling ioctl to the driver, driver ioctl implementation can go to sleep in waiting for an event to occur. During this time, from another user thread if user sends an ioctl to the driver, which is non-blocking driver should be able to process the ioctl.

Implementation: For the above requirement I am thinking of using wait_event_interruptible system call. But, definition of wait_event_interruptible() says it puts the process to sleep. Is there any implementation similar to wait_event_interruptible(), which can put only a thread to sleep not a process.???

Thanks for your help.


All times are GMT -5. The time now is 05:28 AM.