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
The following reply was made to PR lib/58729; it has been noted by GNATS.
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Cc:
Subject: Re: lib/58729: container_of is not documented or available in userland
Date: Tue, 8 Oct 2024 14:28:33 +0000
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