Hi all,
    I have got the answer of the problem.
    After wait_event_interruptible(...); in the kernel thread, there is a 
statement like this:

    if (signal_pending(current))
        complete_and_exit(...);

    the problem is in Linux-2.6.15, the signal_pending(current) returns false, 
even I send a signal to the sleeping kernel thread, so that the kernel thread 
will loop forever.......
    
    So, now the problem is why signal_pending(current) returns false in my 
condition in Linux-2.6.15, with catting /proc/pidofthread/status, the SigPnd is 
000000000000, while ShdPnd is not zero.
    I think as for killing a kernel thread, Linux-2.6 will set another variable 
ShdPnd, instead of SigPnd.
    Would you like to give me more details?
    Thank you and regards,

                SiMitel
        26-Feb-2007

Tao Wang <[EMAIL PROTECTED]> wrote: Hi all,
     I am now writing a kernel module for linux2.6.16. And I can insert it 
properly. But I can not rmmod it. I found that the kernel thread created by the 
module can not continue to run after wait_event_interruptible(my_wq, condition);
 
     The mod_exit() is something like:
 mod_exit()
 {
     condition = true;
     wake_up_interruptible(&my_wq);
 }
 
     When I use interruptible_sleep_on(&my_wq) instead of 
wait_event_interruptible(my_wq, condition); I can rmmod the module, but get a 
kernel oops.
     Would you like to help me with it?
     Thank you and regards,
         Feb-25-2007
    

---------------------------------
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! 
Games._______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

 
---------------------------------
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to