Thread (32 messages) flat view 32 messages, 7 authors, 2021-10-12

RE: [RFC][PATCH] rcu: Use typeof(p) instead of typeof(*p) *

From: David Laight <hidden>
Date: 2021-10-11 08:34:19
Also in: lkml, netfilter-devel, rcu

From: Steven Rostedt
Sent: 05 October 2021 22:25
...
Basically (one alternative I was looking at) was simply passing around a
void pointer. Not sure how the RCU macros would handle that. But to
completely abstract it out, I was thinking of just returning void * and
accepting void *, but I didn't want to do that because now we just lost any
kind of type checking done by the compiler. The tricks I was playing was to
keep some kind of type checking.
Yes, don't use 'void *'.
Sun used it for all the pointers in their DDI/DKI - made it impossible
to ensure you were passing in the right type of 'token'.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help