Re: tsleep(9): add global "nowake" channel

2020-12-23 Thread Scott Cheloha
On Thu, Dec 24, 2020 at 12:24:01AM +0100, Patrick Wildt wrote: > Am Wed, Dec 23, 2020 at 05:04:23PM -0600 schrieb Scott Cheloha: > > On Wed, Dec 23, 2020 at 02:42:18PM -0700, Theo de Raadt wrote: > > > I agree. This chunk below is really gross and does not follow the > > > special wakeup channel m

Re: tsleep(9): add global "nowake" channel

2020-12-23 Thread Patrick Wildt
Am Wed, Dec 23, 2020 at 05:04:23PM -0600 schrieb Scott Cheloha: > On Wed, Dec 23, 2020 at 02:42:18PM -0700, Theo de Raadt wrote: > > I agree. This chunk below is really gross and does not follow the > > special wakeup channel metaphor. > > > > It is *entirely clear* that a &channel called "nowake

Re: tsleep(9): add global "nowake" channel

2020-12-23 Thread Scott Cheloha
On Wed, Dec 23, 2020 at 02:42:18PM -0700, Theo de Raadt wrote: > I agree. This chunk below is really gross and does not follow the > special wakeup channel metaphor. > > It is *entirely clear* that a &channel called "nowake" has no wakeup. > Like duh. > > > +/* > > + * nowake is a global sleep c

Re: tsleep(9): add global "nowake" channel

2020-12-23 Thread Theo de Raadt
I agree. This chunk below is really gross and does not follow the special wakeup channel metaphor. It is *entirely clear* that a &channel called "nowake" has no wakeup. Like duh. > +/* > + * nowake is a global sleep channel for threads that do not want > + * to receive wakeup(9) broadcasts. > +

Re: tsleep(9): add global "nowake" channel

2020-12-23 Thread Mark Kettenis
> Date: Wed, 23 Dec 2020 14:59:02 -0600 > From: Scott Cheloha > > Okay, let's try one more time. > > This patch adds a global sleep channel, "nowake", for sleeping threads > that don't want to receive wakeup(9) broadcasts. > > You use it like this: > > #include > > tsleep(nowake,

tsleep(9): add global "nowake" channel

2020-12-23 Thread Scott Cheloha
Okay, let's try one more time. This patch adds a global sleep channel, "nowake", for sleeping threads that don't want to receive wakeup(9) broadcasts. You use it like this: #include tsleep(nowake, ...); I've added additional assertions to tsleep, msleep, and rwsleep that ensur