From nobody  Wed Jul 29 01:24:02 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id BAA09920;
          Wed, 29 Jul 1998 01:24:02 -0700 (PDT)
          (envelope-from nobody)
Message-Id: <199807290824.BAA09920@hub.freebsd.org>
Date: Wed, 29 Jul 1998 01:24:02 -0700 (PDT)
From: gdc@xenetic.fi
To: freebsd-gnats-submit@freebsd.org
Subject: Bugs in macro definitions of pthreads.
X-Send-Pr-Version: www-1.0

>Number:         7426
>Category:       i386
>Synopsis:       Bugs in macro definitions of pthreads.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 29 01:30:01 PDT 1998
>Closed-Date:    Wed Dec 15 23:54:25 PST 1999
>Last-Modified:  Thu Dec 16 13:53:50 PST 1999
>Originator:     Dado Colussi
>Release:        current (1998-07-25)
>Organization:
Xenetic Oy
>Environment:
FreeBSD tuska.xenetic.fi 3.0-19980725-SNAP FreeBSD 3.0-19980725-SNAP #0: Mon Jul 27 00:35:04 EEST 1998     root@tuska.xenetic.fi:/usr/src/sys/compile/SMP-TUSKA  i386
>Description:
_POSIX_THREADS macro should be defined in unistd.h instead of pthread.h.
_PTHREAD_THREAD_SAFE_FUNCTIONS shouldn't be defined at all since the
functions it claims to be available do not exist.
PTHREAD_MUTEX_INITIALIZER does not exist.

For verification, consult Butenhof's Programming with POSIX threads,
section 3.2.1 "Creating and destroying a mutex" on page 49,
section 9.1 "POSIX 1003.1c-1995 options" on page 307 and
section 9.3.11 "Thread-safe functions" on page 388.
>How-To-Repeat:

>Fix:
Move the _POSIX_THREADS macro from pthread.h to unistd.h.
Move the _PTHREAD_THREAD_SAFE_FUNCTIONS to unistd.h and
comment it out.
I don't know how the PTHREAD_MUTEX_INITIALIZER should be
implemented, but some of your team members should know it.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended 
State-Changed-By: phk 
State-Changed-When: Fri Jul 31 01:48:11 PDT 1998 
State-Changed-Why:  
awaiting comitter 
State-Changed-From-To: suspended->closed 
State-Changed-By: jasone 
State-Changed-When: Wed Dec 15 23:54:25 PST 1999 
State-Changed-Why:  
_POSIX_THREADS definition moved to unistd.h. 
_POSIX_THREAD_SAFE_FUNCTIONS undefined (breaks POSIX compliance in two ways, 
but we're already non-compliant). 
PTHREAD_MUTEX_INITIALIZER has apparently been added since this PR was filed. 
>Unformatted:
