NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/58729: container_of is not documented or available in userland



Small complication: container_of is defined in libkern.h and uses
offsetof which, for the kernel, is also defined in libkern.h.

So just moving container_of to another header file would create a
circular dependency (libkern.h uses sys/container_of.h for
container_of, and is used by sys/container_of.h for offsetof).

To avoid that, we could:

(a) split offsetof into another header file (maybe we should add
    sys/stddef.h), or

(b) update all container_of users in kernel to use sys/container_of.h
    explicitly so libkern.h doesn't have to expose container_of
    itself.


Home | Main Index | Thread Index | Old Index