Bug 113172 - Definition for _POSIX_THREAD_PROCESS_SHARED missing ?
Definition for _POSIX_THREAD_PROCESS_SHARED missing ?
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc-kernheaders (Show other bugs)
3.0
i686 Linux
low Severity low
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-09 04:14 EST by Martin Michalecz
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-09 07:51:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Michalecz 2004-01-09 04:14:57 EST
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 07:40:19 EST
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 07:51:56 EST
--------------- 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 08:49:12 EST
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.