Re: await & asleep
From: Scott Long (scottl_at_samsco.org)
Date: 07/27/05
- Previous message: Daniel Eischen: "RE: await & asleep"
- In reply to: Daniel Eischen: "RE: await & asleep"
- Next in thread: Daniel Eischen: "Re: await & asleep"
- Reply: Daniel Eischen: "Re: await & asleep"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 27 Jul 2005 10:35:01 -0600 To: Daniel Eischen <deischen@freebsd.org>
Daniel Eischen wrote:
> On Wed, 27 Jul 2005, Norbert Koch wrote:
>
>
>>>>The functions await() and asleep() in kern_synch.c
>>>>are marked as EXPERIMENTAL/UNTESTED.
>>>>Is this comment still valid? Does anyone have used
>>>>those functions successfully? Should I better not
>>>>use them in my device driver code for RELENG_4?
>>>>How do I correctly cancel a request (as I should do
>>>>according to the man page): "asleep (NULL, 0, NULL, 0)"?
>>>
>>>The await family was removed in 5.x and beyond, so trying to
>>>use them in 4.x will make your driver very unportable. There
>>>are better ways than await to handle delayed events.
>
>
> Well, there's tsleep() and wakeup() for FreeBSD < 5.0. Other
> than that, what else can you do? These functions are deprecated
> in 5.x and 6.x in favor of condvar(9) and mutex(9), so you should
> really use those instead of tsleep() and wakeup().
>
> It seems the kernel in -current is still using tsleep() and
> wakeup() in some places. I thought we got rid of all these...
>
???? Can you explain why tsleep and wakeup should no longer be
used? I wasn't aware that they were formally deprecated.
Scott
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Daniel Eischen: "RE: await & asleep"
- In reply to: Daniel Eischen: "RE: await & asleep"
- Next in thread: Daniel Eischen: "Re: await & asleep"
- Reply: Daniel Eischen: "Re: await & asleep"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- RE: await & asleep
... >> are better ways than await to handle delayed events. ... there's tsleep()
and wakeup() for FreeBSD < 5.0. ... (freebsd-hackers) - Re: await & asleep
... On Wed, 27 Jul 2005, Scott Long wrote: ... Can you explain why tsleep
and wakeup should no longer be ... To unsubscribe, ... (freebsd-hackers) - Re: [linux-pm] [patch] pm: fix runtime powermanagements /sys interface
... I agree that wakeup would ... always be caused by some single device, not by
multiple devices. ... You implied that when a system wakes up, ... scott
preece ... (Linux-Kernel) - Re: [linux-pm] [RFC] userland swsusp
... Is the acpi problem with PWRF used over PWRC and PWRF not sending ...
events (hence no wakeup) solved? ... To unsubscribe from this list: send the line
"unsubscribe linux-kernel" in ... (Linux-Kernel) - Re: locking in a device driver
... if you tsleep with signals enabled, the periodic timer will go ... device and
trying to use another method to wait instead of tsleep(). ... To unsubscribe, ...
(freebsd-hackers)