Home | History | Annotate | Download | only in include
History log of /src/include/sched.h
RevisionDateAuthorComments
 1.15  01-Aug-2022  wiz sched.h: keep __clone() visible under _NETBSD_SOURCE
 1.14  01-Aug-2022  wiz sched.h: format comment to follow KNF

requested by thorpej@
 1.13  01-Aug-2022  wiz sched.h: Linux documents clone and __clone as only available
when_GNU_SOURCE is defined - follow suit.

Ok martin@
 1.12  11-Jan-2009  christos branches: 1.12.52;
merge christos-time_t
 1.11  31-Oct-2008  rmind branches: 1.11.2;
Add sched_getaffinity_np() and sched_setaffinity_np() wrappers, mainly
for compatibility purposes.
 1.10  15-Jun-2008  rmind branches: 1.10.4;
Remove few no longer relevant comments.
 1.9  28-Apr-2008  martin branches: 1.9.2; 1.9.4;
Remove clause 3 and 4 from TNF licenses
 1.8  09-Oct-2005  kleink branches: 1.8.18;
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.
 1.7  03-Feb-2005  perry branches: 1.7.2;
de-__P -- the hack is long since useless. Discussed with christos,
matt, kleink, others. Approved by christos.
 1.6  13-Dec-2004  nathanw __libc_thr_yield() signature now matches sched_yield().
Pointed out by Kouichirou Hiratsuka on current-users.
 1.5  10-Dec-2004  nathanw 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.
 1.4  08-Jul-2003  itojun branches: 1.4.4;
prototype must not have variable name
 1.3  28-Apr-2003  bjh21 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.
 1.2  18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1  17-Jul-2001  thorpej branches: 1.1.2;
A <sched.h> file, which provides the clone(2) prototypes, in order
to be compatible with Linux.
 1.1.2.9  18-Dec-2002  thorpej Move sched_param and policies into sys/sched.h, and give SCHED_OTHER
the value 0.
 1.1.2.8  11-Nov-2002  skrll Define SCHED_OTHER and remove SCHED_DEFAULT.
 1.1.2.7  08-Nov-2002  skrll Pull in sys/cdefs.h
 1.1.2.6  29-Oct-2002  thorpej Make this safe for C++.
 1.1.2.5  11-Apr-2002  thorpej _LIB_PTHREAD_SCHED_H -> _SCHED_H_
 1.1.2.4  23-Feb-2002  gmcgarry It's back with the pthreads bits.
 1.1.2.3  23-Feb-2002  gmcgarry sched.h is now part of the pthread library
 1.1.2.2  08-Oct-2001  nathanw Catch up to -current.
 1.1.2.1  17-Jul-2001  nathanw file sched.h was added on branch nathanw_sa on 2001-10-08 20:13:46 +0000
 1.4.4.1  28-Oct-2005  jmc Pullup from trunk 1.7->1.8
 1.7.2.1  10-Oct-2005  tron Pull up following revision(s) (requested by kleink in ticket #875):
include/sched.h: revision 1.8
lib/libpthread/sched.c: revision 1.4
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.
 1.8.18.2  17-Jun-2008  yamt sync with head.
 1.8.18.1  18-May-2008  yamt sync with head.
 1.9.4.1  18-Jun-2008  simonb Sync with head.
 1.9.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.10.4.1  12-Nov-2008  snj Pull up following revision(s) (requested by rmind in ticket #47):
lib/libc/sys/sched.c: revision 1.2
include/sched.h: revision 1.11
Add sched_getaffinity_np() and sched_setaffinity_np() wrappers, mainly
for compatibility purposes.
 1.11.2.2  05-Jan-2009  christos version sched_rr_get_interval
 1.11.2.1  31-Oct-2008  christos file sched.h was added on branch christos-time_t on 2009-01-05 01:29:15 +0000
 1.12.52.1  03-Aug-2022  martin Pull up following revision(s) (requested by wiz in ticket #1484):

lib/libc/sys/clone.2: revision 1.14
lib/libc/sys/clone.2: revision 1.15
include/sched.h: revision 1.13
include/sched.h: revision 1.14
include/sched.h: revision 1.15

Remove mentions of CLONE_PID and CLONE_STOPPED

CLONE_PID was removed in Linux 2.5.15 and recycled for
CLONE_PIDFD since Linux 5.2.
CLONE_STOPPED was removed in Linux 2.6.38 and recycled
for CLONE_NEWCGROUP since Linux 4.6.

sched.h: Linux documents clone and __clone as only available
when_GNU_SOURCE is defined - follow suit.
Ok martin@

clone(2): document that _GNU_SOURCE must be defined for the prototypes
sched.h: format comment to follow KNF
requested by thorpej@
sched.h: keep __clone() visible under _NETBSD_SOURCE

RSS XML Feed