Page MenuHomeFreeBSD

LinuxKPI: Add linux/container_of.h header
ClosedPublic

Authored by wulf on Nov 28 2023, 8:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 8, 11:32 AM
Unknown Object (File)
Wed, May 8, 11:31 AM
Unknown Object (File)
Wed, May 8, 11:31 AM
Unknown Object (File)
Wed, May 8, 11:31 AM
Unknown Object (File)
Wed, May 8, 9:26 AM
Unknown Object (File)
Tue, May 7, 3:05 AM
Unknown Object (File)
Apr 6 2024, 11:28 AM
Unknown Object (File)
Mar 21 2024, 3:44 AM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

wulf requested review of this revision.Nov 28 2023, 8:47 PM
This revision is now accepted and ready to land.Nov 29 2023, 6:09 AM
bz requested changes to this revision.Dec 8 2023, 5:01 PM
bz added inline comments.
sys/compat/linuxkpi/common/include/linux/container_of.h
2

I am not sure you can do that given the majority of the file was taken from a different Copyright and Licensed file.

4

_LINUXKPI_LINUX_..

9

Also please really preserve the original wrapping. In general our implementation and adjustments are older than the ones I looked up in OpenBSD so please preserve them.

11

Either way you need to include something here (also for offsetoff and uintptr_t above).

typeof lives in compiler.h; funny enough we have a TYPEOF_MEMBER in sys/sys/stats.h but __typeof() could just be used?

This revision now requires changes to proceed.Dec 8 2023, 5:01 PM
wulf edited the summary of this revision. (Show Details)

Add LINUXKPI to guard #define
Use FreeBSD container_of implementation
typeof -> __typeof
Not based on OpenBSD version now

wulf marked 4 inline comments as done.Dec 9 2023, 9:58 AM

Add prequisite includes

remove duplicated typeof_member from linux/kernel.h

This revision is now accepted and ready to land.Dec 12 2023, 1:43 AM