Bug 113172 - Definition for _POSIX_THREAD_PROCESS_SHARED missing ?
Summary: Definition for _POSIX_THREAD_PROCESS_SHARED missing ?
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc-kernheaders
Version: 3.0
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2004-01-09 09:14 UTC by Martin Michalecz
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2004-01-09 12:51:56 UTC

Attachments (Terms of Use)

Description Martin Michalecz 2004-01-09 09:14:57 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; 

Description of problem:
ES 3 supports Native POSIX Thread Library (NPTL). Thus 
pthread_condattr_setpshared is supports. If this (optional) Posix 
features are available and support shared processes 
_POSIX_THREAD_PROCESS_SHARED should be defined after including 

That's my knowlegde (This might be incorrect. Sorry if so.)

In any case _POSIX_THREAD_PROCESS_SHARED is not defined.

-) Is my knowlegde incorrect ?
-) Does I have to include some other *.h file (ptherad.h does not 
defione it either, grep did not find a match) ?
-) Does ES 3 *NOT* support condition variables across processes ?
-) Or is the definition simply missing ?

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Compile a source including <unistd.h>
2.Check presence using #ifdef ...

Actual Results:  _POSIX_THREAD_PROCESS_SHARED is not defined

Expected Results:  _POSIX_THREAD_PROCESS_SHARED should be defined

Additional info:

Comment 1 Martin Michalecz 2004-01-09 12:40:19 UTC
It looks like **I** make some mistake. I located alternate 
includefiles at /usr/include/nptl. 
In /usr/include/nptl/bits/posix_opt.h the desired #define is 
included. But I could not detect (until now) how to correctly include 
this file. I added -I /usr/include/nptl, but this does not work. I do 
not like to directly include some file from deeper directories and I 
think switching to ntpl must work withou editing sources (as long as 
no documented changes are required). I do not expect editing sources 
is required to get the correct includes.

Please could someone give me some advice - or a pointer to the 
correct documentation.

Martin Michalecz

Comment 2 Martin Michalecz 2004-01-09 12:51:56 UTC
--------------- PLEASE CLOSE ----------------

There was a simple typo in the include string.
Adding -I/usr/include/nptl solves the problem.

So if there is no information to be added from Redhat's side,
this "bug" can be closed.

Sorry for the effort I caused at your site.

Comment 3 Jakub Jelinek 2004-01-09 13:49:12 UTC
When you don't use -I/usr/include/nptl -L/usr/lib/nptl, the resulting
program will run with both NPTL and LinuxThreads.  Because LT
doesn't support pshared primitives, _POSIX_THREAD_PROCESS_SHARED
is not defined on purpose.
If you build with -I/usr/include/nptl -L/usr/lib/nptl, ie. build
a NPTL only program, then it is defined.

Note You need to log in before you can comment on or make changes to this bug.