freebsd-skq/include
jb e071fcc31a 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
protocols 64bit clean now 1998-11-08 08:27:16 +00:00
rpc
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
elf-hints.h
elf.h
err.h Don't forget to use the appropriate __printf*like attribute for verr* 1998-11-22 05:12:27 +00:00
fnmatch.h
fstab.h
fts.h
glob.h
grp.h
histedit.h
ieeefp.h Use __i386__ instead of i386 in an ifdef. 1999-03-05 18:15:05 +00:00
iso646.h
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
link.h
locale.h
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
nl_types.h
nlist.h
objformat.h
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
rune.h
runetype.h
setjmp.h
sgtty.h
signal.h
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
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
vis.h