freebsd-skq/include
John Birrell b847980f15 o Runnable threads are now maintained in priority queues. The
implementation requires two things:

      1.) The priority queues must be protected during insertion
          and removal of threads.  Since the kernel scheduler
          must modify the priority queues, a spinlock for
          protection cannot be used.   The functions
          _thread_kern_sched_defer() and _thread_kern_sched_undefer()
          were added to {un}defer kernel scheduler activation.

      2.) A thread (active) priority change can be performed only
          when the thread is removed from the priority queue.  The
          implementation uses a threads active priority when
          inserting it into the queue.

    A by-product is that thread switches are much faster.  A
    separate queue is used for waiting and/or blocked threads,
    and it is searched at most 2 times in the kernel scheduler
    when there are active threads.  It should be possible to
    reduce this to once by combining polling of threads waiting
    on I/O with the loop that looks for timed out threads and
    the minimum timeout value.

  o Functions to defer kernel scheduler activation were added.  These
    are _thread_kern_sched_defer() and _thread_kern_sched_undefer()
    and may be called recursively.  These routines do not block the
    scheduling signal, but latch its occurrence.  The signal handler
    will not call the kernel scheduler when the running thread has
    deferred scheduling, but it will be called when running thread
    undefers scheduling.

  o Added support for _POSIX_THREAD_PRIORITY_SCHEDULING.  All the
    POSIX routines required by this should now be implemented.
    One note, SCHED_OTHER, SCHED_FIFO, and SCHED_RR are required
    to be defined by including pthread.h.  These defines are currently
    in sched.h.  I modified pthread.h to include sched.h but don't
    know if this is the proper thing to do.

  o Added support for priority protection and inheritence mutexes.
    This allows definition of _POSIX_THREAD_PRIO_PROTECT and
    _POSIX_THREAD_PRIO_INHERIT.

  o Added additional error checks required by POSIX for mutexes and
    condition variables.

  o Provided a wrapper for sigpending which is marked as a hidden
    syscall.

  o Added a non-portable function as a debugging aid to allow an
    application to monitor thread context switches.  An application
    can install a routine that gets called everytime a thread
    (explicitly created by the application) gets context switched.
    The routine gets passed the pthread IDs of the threads that are
    being switched in and out.  I found this useful, but we can
    get rid of it if you want.

Submitted by: Dan Eischen <eischen@vigrid.com>
1999-03-23 05:11:30 +00:00
..
arpa Update nameserver interface to bind-8.1.2 levels. We do not use IRS (yet?) 1998-06-11 08:55:17 +00:00
protocols 64bit clean now 1998-11-08 08:27:16 +00:00
rpc #ifdef out DES ioctls which don't exist in FreeBSD. These originated 1998-09-26 01:29:51 +00:00
rpcsvc Make rcsid a const char[] instead of char[] to avoid compiler warnings 1998-12-06 08:15:08 +00:00
_ctype.h
a.out.h
ar.h
assert.h
bitstring.h
ctype.h
db.h
dirent.h
disktab.h
dlfcn.h Replace bogus "@(#)err.h 8.1 (Berkeley) 6/2/93" with RCS Id keyword. 1998-02-11 05:19:10 +00:00
elf-hints.h Add hints file structures and defines. 1998-09-05 00:53:53 +00:00
elf.h Add hints file structures and defines. 1998-09-05 00:53:53 +00:00
err.h Don't forget to use the appropriate __printf*like attribute for verr* 1998-11-22 05:12:27 +00:00
fnmatch.h Removed _POSIX_SOURCE ifdefs. This is not a POSIX.1 header. 1998-02-25 02:15:59 +00:00
fstab.h
fts.h
glob.h Removed _POSIX_SOURCE ifdefs. This is not a POSIX.1 header. 1998-02-25 02:15:59 +00:00
grp.h
histedit.h
ieeefp.h Use __i386__ instead of i386 in an ifdef. 1999-03-05 18:15:05 +00:00
iso646.h Fixed garbage after comment after #endif. Fixed reversed sense of same 1998-08-03 10:59:02 +00:00
kvm.h Removed evil typedef kvm_swap_t and all uses of it (not many). 1999-01-27 11:29:15 +00:00
limits.h Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B and 1998-03-28 11:51:01 +00:00
link.h Add GDB support for ELF shared libs. 1998-05-23 15:17:53 +00:00
locale.h Basic support for LC_MESSAGES 1998-04-29 22:39:56 +00:00
Makefile Nuke old copies of /usr/include/timepps.h 1999-03-22 12:58:15 +00:00
malloc.h
math.h
memory.h
mpool.h
ndbm.h
netdb.h Update nameserver interface to bind-8.1.2 levels. We do not use IRS (yet?) 1998-06-11 08:55:17 +00:00
nl_types.h Prototypes/typedefs cleanup 1998-04-30 10:09:58 +00:00
nlist.h
objformat.h Add a new library function getobjformat(). It checks all the 1998-09-09 01:21:25 +00:00
paths.h Move nologin from /etc to /var/run. This means one less file that has 1999-01-11 09:07:42 +00:00
pthread_np.h o Runnable threads are now maintained in priority queues. The 1999-03-23 05:11:30 +00:00
pthread.h o Runnable threads are now maintained in priority queues. The 1999-03-23 05:11:30 +00:00
pwd.h Use the correct type for uid and gid in struct passwd. Document it. 1999-01-18 02:14:20 +00:00
ranlib.h
regex.h
regexp.h
resolv.h Remove the extern decl of ``h_errno''. It's already 1998-09-07 19:54:08 +00:00
rune.h
runetype.h
setjmp.h Suggested by: bde 1998-01-20 09:09:24 +00:00
sgtty.h
signal.h Add the prototype for sigwait(). 1998-08-25 11:08:22 +00:00
stab.h
stddef.h
stdio.h Added functions fseeko() and ftello() (from susv2). 1999-02-08 21:32:38 +00:00
stdlib.h Little reorganization: 1998-12-19 00:02:34 +00:00
strhash.h
string.h Add a prototype for strtok_r(). 1999-01-20 21:21:26 +00:00
stringlist.h
strings.h
struct.h
sysexits.h
tar.h
time.h Make ctime_r, asctime_r, gmtime_r, and localtime_r available in libc. 1999-01-04 20:45:20 +00:00
timers.h
ttyent.h MF22: prototype fix. 1998-07-16 00:10:14 +00:00
unistd.h optreset is a POSIX extension, make it visible in POSIX_SOURCE scope. 1999-01-11 11:32:35 +00:00
utime.h
utmp.h ut_time is a time_t, not a long. 1998-05-10 21:13:30 +00:00
vis.h