Re: How to sleep a kernel thread?

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Sat Jun 03 2000 - 14:25:06 EDT

  • Next message: H. Peter Anvin: "Re: Does /var/shm still need to be mounted?"

    Francis GALIEGUE wrote:
    >
    > You may then use the normal sleep_on() and wake_up(), instead of
    > interruptible_sleep_on() and wake_up_interruptible().

    No!!!
    Noone should use sleep_on() in new code. Avoid sleep_on(), there is one
    special case where sleep_on is safe, but most users could lock up.

    Either use wait_event(), or if you need a spinlock then build your own
    wait_event_spinlock() function [see <linux/raid/md.h>].

    --
    	Manfred
    

    - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat Jun 03 2000 - 14:31:51 EDT