httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martijn Koster <...@webcrawler.com>
Subject Re: [PATCH] SysV semaphores
Date Wed, 06 Aug 1997 14:13:27 GMT
On Wed, Aug 06, 1997 at 04:34:14AM -0700, Dean Gaudet wrote:

> And to make things even better, the posix stuff has far fewer gotchas than
> sysv semaphores.

Yes, but to further depress you...

Not all posix threads implementations are created equal.  For example,
your code doesn't compile under Irix (6.2,6.3,6.4) because
pthread_mutexattr_setpshared is unresolved. In pthread.h we read:

  #undef _POSIX_THREAD_PROCESS_SHARED
  #ifdef _POSIX_THREAD_PROCESS_SHARED
  int pthread_mutexattr_getpshared(const pthread_mutexattr_t *, int *);
  int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int);
  #endif

and 

  nm libpthread.so | grep pthread_mutexatt_setpshared

gives zilch. I can't see another to set those attributes either.


On FreeBSD-current, pthread.h doesn't define PTHREAD_PROCESS_SHARED,
and:

  nm libc_r.* | grep pthread_mutexattr

doesn't turn up much either.


On Solaris flock appears lost, and I don't care enough to familiarise
myself with the compat situation. The others give:

time-FCNTL 10 10:       0.020793
time-FCNTL 10 100:      0.096622
time-FCNTL 10 1000:     0.581571
time-FCNTL 10 10000:    6.108506
time-SEM 10 10:         0.011974
time-SEM 10 100:        0.023080
time-SEM 10 1000:       0.255623
time-SEM 10 10000:      2.532605
time-PTHREAD 10 10:     0.026186
time-PTHREAD 10 100:    0.026672
time-PTHREAD 10 1000:   0.027417
time-PTHREAD 10 10000:  0.977714

-- Martijn Koster, m.koster@pobox.com


Mime
View raw message