Re: Sleeping thread not receive signal until it wakes up

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Luong Ngo <luong.ngo@...>
Cc: <linux-kernel@...>
Date: Wednesday, March 7, 2007 - 9:19 am

On Wed, 7 Mar 2007, Luong Ngo wrote:


Later versions of the kernel lock the kernel when an ioctl() is
entered. This means that if you sleep in the ioctl(), nothing
will get scheduled.

You can do the following (possibly unsafe) in your ioctl():

     int locked = kernel_locked();

     ......... code
     ......... code

     if(locked)  // Before sleeping section
        unlock_kernel();
     .......... sleeping code
     if(locked)  // After sleeping section
         lock_kernel();



Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 on an i686 machine (5592.71 BogoMips).
New book: http://www.AbominableFirebug.com/
_


****************************************************************
The information transmitted in this message is confidential and may be privileged.  Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited.  If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Sleeping thread not receive signal until it wakes up, linux-os (Dick Johnson), (Wed Mar 7, 9:19 am)
Re: Sleeping thread not receive signal until it wakes up, Jan Engelhardt, (Wed Mar 7, 4:20 pm)
Re: Sleeping thread not receive signal until it wakes up, linux-os (Dick Johnson), (Wed Mar 7, 4:08 pm)
Re: Sleeping thread not receive signal until it wakes up, linux-os (Dick Johnson), (Thu Mar 8, 9:01 am)
Re: Sleeping thread not receive signal until it wakes up, Thomas Gleixner, (Thu Mar 8, 9:53 am)
Re: Sleeping thread not receive signal until it wakes up, Sergey Vlasov, (Fri Mar 9, 10:58 am)