Page MenuHomeFreeBSD

pthread: Make pthread_np.h self-contained
AcceptedPublic

Authored by markj on Wed, May 6, 5:27 PM.
Tags
None
Referenced Files
F156007865: D56857.id177323.diff
Sun, May 10, 5:27 AM
F155952400: D56857.id177323.diff
Sat, May 9, 10:50 PM
F155875210: D56857.id177320.diff
Sat, May 9, 1:45 PM
F155867068: D56857.id177323.diff
Sat, May 9, 12:00 PM
F155864981: D56857.diff
Sat, May 9, 11:30 AM
Unknown Object (File)
Fri, May 8, 11:01 PM
Unknown Object (File)
Fri, May 8, 7:15 PM
Unknown Object (File)
Fri, May 8, 7:15 PM
Subscribers

Details

Reviewers
kib
Summary

Including param.h from a standard header is inappropriate. param.h
defines all sorts of crap which collides with commonly used identifiers.
I discovered this while trying to build an old version of QEMU which
polluted its namespace by including pthread_np.h->sys/param.h, which
defines FSCALE, which breaks QEMU code.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 72859
Build 69742: arc lint + arc unit

Event Timeline

markj requested review of this revision.Wed, May 6, 5:27 PM
include/pthread_np.h
37

I think this must be sys/types.h.

In the man pages, pthread_attr_getaffinity_np() is documented to take size_t. It is natural for consumer to conclude that including pthread_np.h implies availability of size_t.

Then the change of size_t to __size_t in prototypes can be reverted.

Include sys/types.h instead of sys/_types.h

This revision is now accepted and ready to land.Wed, May 6, 7:14 PM