Page MenuHomeFreeBSD

LinuxKPI: implement __UNIQUE_ID() macro
ClosedPublic

Authored by wulf on Wed, Sep 16, 5:38 PM.
Tags
None
Referenced Files
F175373012: D59733.id186947.diff
Sat, Oct 10, 9:18 AM
F175309836: D59733.diff
Fri, Oct 9, 8:50 PM
Unknown Object (File)
Thu, Oct 8, 9:57 PM
Unknown Object (File)
Thu, Oct 8, 8:40 PM
Unknown Object (File)
Thu, Oct 8, 8:15 AM
Unknown Object (File)
Wed, Oct 7, 9:32 AM
Unknown Object (File)
Tue, Oct 6, 4:49 AM
Unknown Object (File)
Mon, Oct 5, 9:22 PM
Subscribers

Details

Diff Detail

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

Event Timeline

wulf requested review of this revision.Wed, Sep 16, 5:38 PM
emaste added inline comments.
sys/compat/linuxkpi/common/include/linux/compiler.h
100–102

Do we have any compilers that don't provide __COUNTER__?
We can perhaps just omit this.

This revision is now accepted and ready to land.Wed, Sep 16, 5:45 PM
bz requested changes to this revision.Wed, Sep 16, 7:37 PM
bz added inline comments.
sys/compat/linuxkpi/common/include/linux/compiler.h
100–102

We are using __COUNTER__ elsewhere in LinuxKPI (and sys/sys) unconditionally. So this should really go away.

104

Linux documents the format as: __UNIQUE_ID_<name>_<__COUNTER__>

This revision now requires changes to proceed.Wed, Sep 16, 7:37 PM
sys/compat/linuxkpi/common/include/linux/compiler.h
104

I was thinking it doesn't really matter, but I suppose it is worth putting it into some __ namespace to avoid possible conflict with a real symbol.

Add __UNIQUE_ID_ prefix per @bz request

This revision is now accepted and ready to land.Wed, Sep 16, 9:51 PM
This revision was automatically updated to reflect the committed changes.