#
7adb4107 |
| 12-Feb-2022 |
riastradh <riastradh@NetBSD.org> |
libpthread: Move namespacing include to top of .c files.
Stuff like libc's namespace.h, or atomic_op_namespace.h, which does namespacing tricks like `#define atomic_cas_uint _atomic_cas_uint', has t
libpthread: Move namespacing include to top of .c files.
Stuff like libc's namespace.h, or atomic_op_namespace.h, which does namespacing tricks like `#define atomic_cas_uint _atomic_cas_uint', has to go at the top of each .c file. If it goes in the middle, it might be too late to affect the declarations, and result in compile errors.
I tripped over this by including <sys/atomic.h> in mips <machine/lock.h>.
(Maybe we should create a new pthread_namespace.h file for the purpose, but this'll do for now.)
show more ...
|