Page MenuHomeFreeBSD

Get rid of the requirement to include SysV IPC headers with _KERNEL defined in ipcrm by introducing a number of _WANT_foo defines.
ClosedPublic

Authored by brooks on Feb 8 2018, 7:57 PM.
Tags
None
Referenced Files
F84283243: D14271.diff
Tue, May 21, 8:29 PM
Unknown Object (File)
Mon, May 20, 3:51 PM
Unknown Object (File)
Mar 18 2024, 8:32 AM
Unknown Object (File)
Dec 20 2023, 7:35 AM
Unknown Object (File)
Dec 18 2023, 6:15 PM
Unknown Object (File)
Dec 8 2023, 2:49 AM
Unknown Object (File)
Nov 6 2023, 11:09 AM
Unknown Object (File)
Nov 6 2023, 1:12 AM
Subscribers

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14880
Build 14992: arc lint + arc unit

Event Timeline

Rebase to remove already committed changes.

sys/sys/msg.h
130

I would perhaps use slightly-less fine-grained macros. E.g. a single _WANT_SYSVMSG for this file.

  • Replace assorted _WANT defines with _WANT_SYSV(IPC|MSG_SEM_SHM)_INTERNALS.
sys/sys/msg.h
151

You can drop this and the above #endif now I think?

171

Maybe blank lines around the #else as there is in sem.h (and then keep the blank line before the #endif)? I find that a bit easier to read.

sys/sys/sem.h
121

Here as well.

132

Here.

sys/sys/shm.h
124

Can collapse this #endif and #if.

130

I think for this I would actually prefer to always use the 'struct vm_object;' forward declare and then use 'struct vm_object *' instead of 'vm_object_t'. I feel like we do this in some other places in the kernel where we export a structure to userland, e.g. for 'td_kstack_obj' in 'struct thread'. That would mean you wouldn't need the #include of <vm/vm.h> or the #ifdef at all.

usr.bin/ipcs/ipc.h
71

Oh wow, that was gross (ipcs depending on the kernel externs)

brooks marked 8 inline comments as done.
  • Consolidate ifdef blocks.

Tidied up. Thanks for the suggestions.

This revision is now accepted and ready to land.Feb 16 2018, 12:07 AM
This revision was automatically updated to reflect the committed changes.