Page MenuHomeFreeBSD

inotify: Move 'td' to the first argument of kern_inotify_*
ClosedPublic

Authored by jhb on Wed, Sep 30, 2:37 PM.

Details

Summary

This is consistent with other system call helpers.

Sponsored by: AFRL, DARPA

Diff Detail

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

Event Timeline

jhb requested review of this revision.Wed, Sep 30, 2:37 PM

The kern_* helpers are also not declared in syscallsubr.h which is where we put the prototypes for all the other kern_* and user_* helpers. (If we want to make that change, we should really actually axe syscallsubr.h instead of doing a split-brain thing IMO.)

In D60173#1380762, @jhb wrote:

The kern_* helpers are also not declared in syscallsubr.h which is where we put the prototypes for all the other kern_* and user_* helpers.

I'm fine with moving them to syscallsubr.h.

(If we want to make that change, we should really actually axe syscallsubr.h instead of doing a split-brain thing IMO.)

Sorry I don't really follow what you mean here.

This revision is now accepted and ready to land.Wed, Sep 30, 2:46 PM
In D60173#1380762, @jhb wrote:

The kern_* helpers are also not declared in syscallsubr.h which is where we put the prototypes for all the other kern_* and user_* helpers.

I'm fine with moving them to syscallsubr.h.

(If we want to make that change, we should really actually axe syscallsubr.h instead of doing a split-brain thing IMO.)

Sorry I don't really follow what you mean here.

Oh, there has been some thought about moving kern_* to their respective headers instead. I can see arguments both ways. I originally created syscallsubr.h when I was killing the stackgap (this horrid thing where the linuxulator would allocate space on your stack for arguments it needed to modify like pathnames and construct a native uap structure and call sys_foo() and I implemented kern_foo() instead to avoid all that) and at the time just wanted to isolate all this compat shim stuff off to the side. The other view is that kern_* sometimes need types, etc. defined in the respective header so moving them to the individual headers is more natural. I assumed (perhaps incorrectly) you were in favor of moving away from syscallsubr.h. I can be convinced, but I'd rather us do that as a conscious change/choice if we do so is all.

In D60173#1380771, @jhb wrote:
In D60173#1380762, @jhb wrote:

The kern_* helpers are also not declared in syscallsubr.h which is where we put the prototypes for all the other kern_* and user_* helpers.

I'm fine with moving them to syscallsubr.h.

(If we want to make that change, we should really actually axe syscallsubr.h instead of doing a split-brain thing IMO.)

Sorry I don't really follow what you mean here.

Oh, there has been some thought about moving kern_* to their respective headers instead. I can see arguments both ways. I originally created syscallsubr.h when I was killing the stackgap (this horrid thing where the linuxulator would allocate space on your stack for arguments it needed to modify like pathnames and construct a native uap structure and call sys_foo() and I implemented kern_foo() instead to avoid all that) and at the time just wanted to isolate all this compat shim stuff off to the side. The other view is that kern_* sometimes need types, etc. defined in the respective header so moving them to the individual headers is more natural. I assumed (perhaps incorrectly) you were in favor of moving away from syscallsubr.h. I can be convinced, but I'd rather us do that as a conscious change/choice if we do so is all.

Ah, no, it wasn't really deliberate on my part, I think I had forgotten that syscallsubr.h existed. I think having these prototypes in their own headers is more natural, but I don't object to moving kern_inotify if only for consistency.