Bug 113172 - Definition for _POSIX_THREAD_PROCESS_SHARED missing ?
Summary: Definition for _POSIX_THREAD_PROCESS_SHARED missing ?
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc-kernheaders
Version: 3.0
Hardware: i686
OS: Linux
low
low
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
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:
Environment:
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; 
T312461)

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 
unistd.h.

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:
Always

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

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.

Thanks
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.