Thread (39 messages) 39 messages, 7 authors, 2017-05-23

Re: [PATCH 2/9] timers: provide a "modern" variant of timers

From: 'Christoph Hellwig' <hch@lst.de>
Date: 2017-05-21 06:57:53
Also in: linux-s390, lkml

On Fri, May 19, 2017 at 10:48:51AM +0000, David Laight wrote:
From: Christoph Hellwig
quoted
Sent: 16 May 2017 12:48

The new callback gets a pointer to the timer_list itself, which can
then be used to get the containing structure using container_of
instead of casting from and to unsigned long all the time.
What about sensible drivers that put some other value in the 'data'
field?
They will add the equivalent of the data field into the containing
structure of the timer.  Just like we do for all other kernel interfaces
using the container_of patter, which includes just about every
primitive designed in the last 15 years.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help