*BSD News Article 46764


Return to BSD News archive

Xref: sserve comp.unix.solaris:41496 comp.unix.internals:8779 comp.unix.programmer:27003 comp.unix.sco.programmer:412 comp.os.linux.announce:3783 comp.unix.bsd.freebsd.misc:3138
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.sprintlink.net!demon!plug.news.pipex.net!pipex!soap.news.pipex.net!pipex!dish.news.pipex.net!pipex!sunic!sunic.sunet.se!news.funet.fi!news.helsinki.fi!not-for-mail
From: mueller@nu.cs.fsu.edu (Frank Mueller)
Newsgroups: comp.unix.solaris,comp.unix.internals,comp.unix.programmer,comp.unix.sco.programmer,comp.os.linux.announce,comp.unix.bsd.freebsd.misc
Subject: POSIX Threads package for ix86 and SPARC
Followup-To: comp.unix.solaris,comp.unix.internals,comp.unix.programmer,comp.unix.sco.programmer,comp.os.linux.development.apps,comp.unix.bsd.freebsd.misc
Date: 12 Jul 1995 17:44:24 +0300
Organization: Florida State University Computer Science
Lines: 178
Sender: wirzeniu@cc.helsinki.fi
Approved: linux-announce@news.ornl.gov (Lars Wirzenius)
Distribution: inet
Message-ID: <3u0n48$89l@kruuna.helsinki.fi>
References: <3tarhp$39e@gwsun.medinf.mu-luebeck.de> <QjyUYVy00YUyAL31dE@andrew.cmu.edu>
NNTP-Posting-Host: kruuna.helsinki.fi
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Keywords: POSIX, threads

We are happy to announce the release of the FSU Pthreads library package V2.6.
This release is the first one to include support for ix86-based UNIX versions
(Linux, FreeBAS, SCO). The support for SunOS and Solaris continures with bug
fixes as it has for the past years. 

Why use this package? It is more complete, tested over years on the SPARC,
and impelements more of the POSIX Threads standard than most other packages
-- and it's free!

Note to newbies: Get the ftp-able sources, uncompres, untar, type
  cd threads/src
  ./configure
and read the interface document and maybe the SERF paper to get started.
Notice that the ix86 requires calling pthread_init() as the first thing    
in main().

--------------------------------------------------------------------------------

Smallest possible program:

#include <pthread.h>

void new_thread(arg)
  int *arg;
{
  printf("new thread argument = %d\n", *arg);
}

main()
{
  pthread_t th;
  int i = 1;

  pthread_init();

  pthread_create(&th, NULL, (pthread_func_t) new_thread, &i);
  pthread_join(th, NULL);
  pthread_detach(&th);
}


--------------------------------------------------------------------------------


``A Library Implementation of POSIX Threads under SunOS/Solaris'', Version 2.6

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
internet#: 128.186.121.114
directory: /pub/PART
files:     pthreads.tar.Z, pthreads_serf92.ps.Z, pthreads_usenix93.ps.Z,
	   pthreads_interface.ps.Z, rtoss94.ps.Z, pthreads_tr94-091.ps.Z

mail-list: mueller@uzu.cs.fsu.edu	Subject: subscribe-pthreads
WWW:       http://www.cs.fsu.edu/~mueller

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
- via WWW URL "http://www.cs.fsu.edu/~mueller/bin/pthreads-form.cgi"
- or by sending e-mail to "mueller@uzu.cs.fsu.edu" 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.]

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 and SunOS 4.1.x or Solaris. 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:

  .bug fix: [sig]setjmp() register flush added since caller may change
   his stack point after the call.
  .bug fix: early wakeups under Solaris (SIGALRM) are requeued (Sun's bug).
  .bug fix: struct mutex under Solaris 2.4 caused conflict, fixed
   (problem reported by: Steve Osselton <so@prismtech.co.uk>).
  .bug fix: -D_REENTRANT under Solaris 2.4 caused conflict, fixed
   (problem reported by: Steve Osselton <so@prismtech.co.uk>).

  .draft-specific compile flags dropped (e.g. DRAFT5).
  .ports to ix86 architecture: Linux, FreeBSD, SCO UNIX
   (thanks to [olaf,guenter,gabi]@logware.de and Logware GmbH).
  .non-process-blocking, only thread-blocking I/O (-DIO compile flag)
   supported for ix86 via I/O server thread via polling upon requests.

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.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, wait, waitpid
   (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 our own (new) runtime-system for an Ada compiler (Verdix).
But we do not make any claims about the completeness or correctness of
this implementation.

(C)OPYRIGHT NOTICE:

   Copyright (C) 1992, 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

-- 
Frank Mueller   E-Mail: mueller@cs.fsu.edu   WWW: http://www.cs.fsu.edu/~mueller

--
Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov
PLEASE remember Keywords: and a short description of the software.