*****************************************************************************
NOTE:

This version is a modified version of FSU pthreads to get FSU threads more
Posix.  The major change is that most thread functions now returns
the error code instead of setting the errno variable and return -1.
This version is tested on SCO 3.2v4.2.

****************************************************************************

``A Library Implementation of POSIX Threads for the SPARC / ix86'', Version 3.9

The PART (POSIX / Ada-Runtime Project) is happy to announce a new
release of the C sources of the Pthreads library.

ftp-site:  ftp.cs.fsu.edu
directory: /pub/PART/PTHREADS
files:     pthreads.tar.gz OR pthreads.zip OR pthreads.tar.Z,
mirror:    http://www.informatik.hu-berlin.de/~mueller/ftp/pub/PART/ 

papers:
WWW USA  : http://www.cs.fsu.edu/~mueller/pthreads
WWW Europe:http://www.informatik.hu-berlin.de/~mueller/pthreads
ftp-site:  ftp.cs.fsu.edu
directory: /pub/PART/publications
files:	   pthreads_serf92.ps.Z, pthreads_usenix93.ps.Z,
	   pthreads_interface.ps.Z, rtoss94.ps.Z, pthreads_tr94-091.ps.Z

mail-list: mueller@informatik.hu-berlin.de	Subject: subscribe-pthreads
WWW USA  : http://www.cs.fsu.edu/~mueller/projects.html
WWW Europe:http://www.informatik.hu-berlin.de/~mueller/projects.html

There is also a Pthreads mailing list distributing information about
new releases, bug patches and related issues. You can subscribe to the
mailing list either
- by sending e-mail to "mueller@informatik.hu-berlin.de" with the
  subject line "subscribe-pthreads". [If your local mailer inserts an incorrect
  return address, send mail message with a different subject and include
  your correct e-mail address.]
- [CURRENTLY NOT SUPPORTED: or via WWW URL
  "http://www.informatik.hu-berlin.de/~mueller/bin/pthreads-form.cgi"]

As part of the PART project we have been designing and implementing a
library package of preemptive threads which is compliant with POSIX
1003.4a Draft 6. A description of the interface for our Pthreads
library is also available on ftp. Our implementation is limited to the
Sun SPARC architecture under SunOS 4.1.x / Solaris 2.x as well as
Intel ix86 architecture under Linux, SCO, FreeBSD or DOS. We do not
make any use of Sun's light-weight processes to achieve better
performance (with one I/O-related exception).

What's NEW:

  .Fixed bug in signal in SCO OpenServer. Returns previous handler.

  .Fixed bug with SIGCHLD handling in SCO OpenServer.

  .Fixed bug with signal handling in SCO OpenServer. In SCO version previous
   to SCO OpenServer 5.0.4 ERESTART was implemented in dynamic linker code.
   In new versions 5.0.4 and 5.0.5 this is implemented in kernel. We were
   waiting with poll with a large timer but this prevent correct signal
   handling.

  .Fixed bug in pthread_cancel_timed_sigwait with DEF_RR move free timer
   after enable thread.

  .Unified SCO versin and official FSU version. Add flag MYSQL to enable
   MYSQL work in SCO.

  .Added DRAFT7 to enable pthread DRAFT7 call. The default is DRAFT6, that
   is the version originally provided with pthread. DRAFT7 is used to keep
   compatibility with MySQL.

  .bug fix: Fixed a problem with ACE toolkit and GNU malloc library.
   This problem was causing we will mix the two mallocs packages!!
   Causing pthread kernel crash when a thread exited.
   (problem by: Arturo Montes <mitosys@colomsat.net.co>

  .Change sco/*.S files to use SCO AS. Add SCO_AS to Makefile to compile
   .S files with SCO assembler. Now we not need GDS. This new code can
   be compiled with Skunkware 97 and new versions.

  .bug fix: Fixed an evil bug in pthread_sched. When a detached thread end
   and we receive two signal in pthread_sched and new thread was rescheduled
   we wipe out the temporary stack to handle the signal.
   (problem by: Arturo Montes <mitosys@colomsat.net.co>

  .bug fix: Fixed a bug in pthread_nanosleep, checking of timer was doing 
   without kernel mode protection.
   (problem by: Arturo Montes <mitosys@colomsat.net.co>

  .bug fix: Fixed a bug with pthread_cond_timedwait and DEF_RR when
   cancelling and ASYNC_TIMER. We must to remove the ASYNC_TIMER before the
   setup the new SYNC_TIMER, because we were having a loop in pthread_cancel_
   time_sigwait. (problem by: Arturo Montes <mitosys@colomsat.net.co>

  .bug fix: Make stdio a reentrant library for SCO OpenServer.
   (problem by: Arturo Montes <mitosys@colomsat.net.co>

  .bug fix: When making context switching in SAVE_CONTEXT exist the possibi-
   lity in very busy system that context switching can not be done, causing
   a possible loop in kernel. (problem by: Arturo Montes <mitosys@colomsat.net.co>

  .bug fix: when a timer was cancelled, for example ASYNC TIMER was
   cancelled for a cond_timedwait or select, if the cond timer was
   less than the async timer, we are deleting the cond timer, causing
   a kernel corruption. (problem by: Arturo Montes <mitosys@colomsat.net.co>

  .bug fix: when programming an ASYNC TIMER we not add the current
   clock time. This cause a continuous reprogramming of ASYNCTIMER.
   (problem by: Arturo Montes <mitosys@colomsat.net.co>

  .merge of code with FSU-threads 3.5, by Monty <monty@tcx.se>
   Fixed that all pthread functions return errno instead of setting
   the errno variable (required by Posix).

  .bug fix: when cancelling a timer from a SIGALRM we was calculating bad
   the new threads waiting for I/O, this caused stack corruption and a
   possible core dump. This problem only occur for synchronous I/O.
   (problem by: Arturo Montes <mitosys@colomsat.net.co>

  .bug fix: when cancelling ASYNCTIMER, had the possibility that a thread
   making a cond_timedwait or a select with timeout (SYNCTIMER) could be
   blocked forever. This problem only occur when we use DEF_RR flag.
   (problem by: Arturo Montes <mitosys@colomsat.net.co>

  .bug fix: make functions in sco/*.S files pic. Now dynamic linking of 
   this functions must work ok.
   (problem by: Arturo Montes <mitosys@colomsat.net.co>
  
  .bug fix: in poll_fd_to_fd_set we doing a bad calculation of how_many
   descriptors ready in set.
   (problem by: Arturo Montes <mitosys@colomsat.net.co>

  .bug fix: in handle_thread_signal being twice called for the same thread
   bumping thread control causing a loop in thread kernel.
   (problem by: Monty <monty@tcx.se>

  .update: select, accept, connect, read and write now are interruptible.
  (Thanks to: Arturo Montes <mitosys@colomsat.net.co>)

  .update: connect now is a multithread system call.
  (Thanks to: Arturo Montes <mitosys@colomsat.net.co>)

  .update: Now we can to use POLL system call to handling synchronous I/O.
   Can use synchronous I/O with platforms supporting POLL system call.
  (Thanks to: Arturo Montes <mitosys@colomsat.net.co>)

  .update: A best support for synchronous I/O. Now are I/O thread system
   call are interrumpible.
  (Thanks to: Arturo Montes <mitosys@colomsat.net.co>)

  .new: wait and waitpid now are POSIX.4a.
  (Thanks to: Arturo Montes <mitosys@colomsat.net.co>)

  .update: select thread-blocking for SunOS and Linux
   (problem by: Dirk Ohst  <ohst@informatik.uni-siegen.de>)

  .bug fix: signal() prototype in pthread.h cond. compilation

The following features are included in the current implementation:
-from POSIX.4a:
  .thread management: initializing, creating, joining, exiting, and
   destroying threads
  .synchronization: mutual exclusion, condition variables
  .thread-specific data
  .thread priority scheduling: priority management, preemptive
   priority scheduling (FIFO, RR),
   mutex priority ceilings through stack resource policy (SRP)
  .signals: signal handlers, synchronous and asynchronous wait for
   signals, masking and sending of signals, sleep, long jumps
  .cancellation: cleanup handlers, asynchronous, synchronous, and
   disabled interruptability.
-from POSIX.4:
  .timers: nanosleep, read clock, priority scheduling bounds
-from POSIX.4a:
  .process control: wait, waitpid
-from POSIX.1:
  .synchronous I/O for threads (I/O only blocks current thread, not process)
-others:
  .perverted scheduling for debugging (MUT_SWITCH, RR_SWITCH, RAND_SWITCH)
  .stack overflow check causes signal (optional STACK_CHECK)
  .graceful handling of stack overflow (optional SIGNAL_STACK)
  .repeated inclusion of header files prevented

The support is currently being extended to include:
-from POSIX.4a:
  .draft 10 upgrade
  .mutex priority inheritance / priority ceiling emulation protocol
  .reentrant functions
  .process control: fork.
   (The above functions are not supported for threads. Their semantics
    is whatever UNIX semantics for processes is. Consequently, a fork
    will fork another process with ALL threads being duplicated, not
    just the executing thread as required by POSIX.4a.
    The functions exec and _exit behave as required without any
    change, i.e. the UNIX process level semantics for these functions
    is also adequate for threads.)
-from POSIX.4:
  .asynchronous I/O for threads
  .asynchronous timer objects
-other:
  .heap memory pools

The current scheduling policies are strict priority scheduling
(according to POSIX.4a FIFO scheduling) which preempts when signals
are caught or round-robin (RR scheduling) which changes context to
another thread of the same priority after a time-slice of 20msec.
Besides asynchronous delivery of signals, context switches only occur
where required by the priority policy, e.g. when resources (mutexes)
are locked etc.

"The current implementation has been tested and used as a base to
implement the GNu Ada Runtime Library (GNARL) for the Gnu NYU Ada
Translator (GNAT, see ftp://ftp.cs.nyu.edu/pub/gnat/).  But we do not
make any claims about the completeness or correctness of this
implementation.

(C)OPYRIGHT NOTICE:

Copyright (C) 1992, 1993, 1994, 1995, 1996 the Florida State University
   Distributed by the Florida State University under the terms of the
   GNU Library General Public License.

This file is part of Pthreads.

Pthreads is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation (version 2).

Pthreads is distributed "AS IS" in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public
License along with Pthreads; see the file COPYING.  If not, write
to the Free Software Foundation, 675 Mass Ave, Cambridge,
MA 02139, USA.

Report problems and direct all questions to:

  pthreads-bugs@ada.cs.fsu.edu
