httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Temme <scte...@covalent.net>
Subject Accept locking test code strangeness
Date Tue, 09 Oct 2001 23:44:07 GMT
Hi all,

I am currently running some tests at the Open Source Development Lab
<http://www.osdl.org/> to try to determine which locking method is the most
efficient on large multi-processor boxes running linux. I'm using the
time-sem.c program in apache-1.3/src/test which runs fine, only the pthread
mutex case does not work. What happens is that, at runtime in the following
snippet (around line 305):

    if (pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED)) {
        perror ("pthread_mutexattr_setpshared");
        exit (1);
    }

the pthread_mutexattr_setpshared call returns 38 (ENOSYS, function not
implemented) but does not set errno... Shouldn't I expect the function call
to return -1 in case of distress and to find something like ENOSYS in errno?
This is on linux 2.4.8.

Now I am no pthreads wizard, but shouldn't this just work? Or is the
pthreads implementation in linux less-than-complete? I did get Apache itself
to run with pthread mutex accept locking without protest or core files.

Any advice appreciated,

Sander

-- 
Covalent Technologies                             sctemme@covalent.net
Engineering group                                Voice: (415) 536 5214
645 Howard St.                                     Fax: (415) 536 5210
San Francisco CA 94105

   PGP Fingerprint: 1E74 4E58 DFAC 2CF5 6A03  5531 AFB1 96AF B584 0AB1

=======================================================
This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message
=======================================================


Mime
View raw message