Re: TIMEOUT_INITIALIZER() for src/sys/dev.c to avoid timeout_initialized()

2013-12-09 Thread Theo de Raadt
> On Mon, Dec 09, 2013 at 01:55:53PM +1000, David Gwynne wrote: > > this is a demonstration of using TIMEOUT_INITIALIZED(). > > > > because we know the timeout is always set up correctly, we dont > > have to test for it all over the place. > > > > [a bit of snipping...] > > > - if (timeout_in

Re: TIMEOUT_INITIALIZER() for src/sys/dev.c to avoid timeout_initialized()

2013-12-09 Thread Bret Lambert
On Mon, Dec 09, 2013 at 10:18:06PM +1000, David Gwynne wrote: > > On 9 Dec 2013, at 10:01 pm, David Gwynne wrote: > > > > > On 9 Dec 2013, at 6:59 pm, Bret Lambert wrote: > > > >> On Mon, Dec 09, 2013 at 01:55:53PM +1000, David Gwynne wrote: > >>> this is a demonstration of using TIMEOUT_INIT

Re: TIMEOUT_INITIALIZER() for src/sys/dev.c to avoid timeout_initialized()

2013-12-09 Thread David Gwynne
On 9 Dec 2013, at 10:01 pm, David Gwynne wrote: > > On 9 Dec 2013, at 6:59 pm, Bret Lambert wrote: > >> On Mon, Dec 09, 2013 at 01:55:53PM +1000, David Gwynne wrote: >>> this is a demonstration of using TIMEOUT_INITIALIZED(). >>> >>> because we know the timeout is always set up correctly, we

Re: TIMEOUT_INITIALIZER() for src/sys/dev.c to avoid timeout_initialized()

2013-12-09 Thread David Gwynne
On 9 Dec 2013, at 6:59 pm, Bret Lambert wrote: > On Mon, Dec 09, 2013 at 01:55:53PM +1000, David Gwynne wrote: >> this is a demonstration of using TIMEOUT_INITIALIZED(). >> >> because we know the timeout is always set up correctly, we dont >> have to test for it all over the place. >> > > [a

Re: TIMEOUT_INITIALIZER() for src/sys/dev.c to avoid timeout_initialized()

2013-12-09 Thread Bret Lambert
On Mon, Dec 09, 2013 at 01:55:53PM +1000, David Gwynne wrote: > this is a demonstration of using TIMEOUT_INITIALIZED(). > > because we know the timeout is always set up correctly, we dont > have to test for it all over the place. > [a bit of snipping...] > - if (timeout_initialized(&rnd_tim

TIMEOUT_INITIALIZER() for src/sys/dev.c to avoid timeout_initialized()

2013-12-08 Thread David Gwynne
this is a demonstration of using TIMEOUT_INITIALIZED(). because we know the timeout is always set up correctly, we dont have to test for it all over the place. Index: rnd.c === RCS file: /cvs/src/sys/dev/rnd.c,v retrieving revision 1