Commit Graph

8 Commits

Author SHA1 Message Date
kleink 34ef731cb3 Change the sched_*() functions to return -1 and set errno to ENOSYS
(per the standard) instead of returning ENOSYS.  Noted by Ian Zagorskih
in PR kern/30970.
2005-10-09 11:17:28 +00:00
perry 19b7469a00 de-__P -- the hack is long since useless. Discussed with christos,
matt, kleink, others. Approved by christos.
2005-02-03 04:39:32 +00:00
nathanw 30b299d965 __libc_thr_yield() signature now matches sched_yield().
Pointed out by Kouichirou Hiratsuka on current-users.
2004-12-13 16:08:12 +00:00
nathanw 0eaa8971b7 Use CPP macros to cause many libpthread functions used by applications
to be transformed into the do-nothing-when-libpthread-isn't-linked libc
stub names. This will permit library code that uses <pthread.h> and pthread
functions "defensively" to not need to link against libpthread and not need
to be patched to the threadlib.h API.
2004-12-10 16:40:40 +00:00
itojun 04392e7f81 prototype must not have variable name 2003-07-08 05:39:23 +00:00
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
thorpej 08fd7e9bb7 Merge the nathanw_sa branch. 2003-01-18 18:05:05 +00:00
thorpej da143054a0 A <sched.h> file, which provides the clone(2) prototypes, in order
to be compatible with Linux.
2001-07-17 03:04:16 +00:00