On Mon, Jan 14, 2013 at 11:46 AM, Schrober wrote:
> I wondered why the container_of implementation is so complicated.
>
> #define container_of(ptr, type, member) ({ \
> const typeof( ((type *)0)->member ) *__mptr = (ptr);\
> (type *)( (char *)__mptr -
Schrober writes:
> Hi,
>
> I wondered why the container_of implementation is so complicated.
>
> #define container_of(ptr, type, member) ({ \
> const typeof( ((type *)0)->member ) *__mptr = (ptr);\
> (type *)( (char *)__mptr - offsetof(type,member) );})
>
Hi,
I wondered why the container_of implementation is so complicated.
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr);\
(type *)( (char *)__mptr - offsetof(type,member) );})
isn't the __mptr not
Hi,
I wondered why the container_of implementation is so complicated.
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)-member ) *__mptr = (ptr);\
(type *)( (char *)__mptr - offsetof(type,member) );})
isn't the __mptr not
Schrober writes:
Hi,
I wondered why the container_of implementation is so complicated.
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)-member ) *__mptr = (ptr);\
(type *)( (char *)__mptr - offsetof(type,member) );})
isn't
On Mon, Jan 14, 2013 at 11:46 AM, Schrober franzschro...@yahoo.de wrote:
I wondered why the container_of implementation is so complicated.
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)-member ) *__mptr = (ptr);\
(type *)( (char
6 matches
Mail list logo