[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: guaranteed up-to-date BDB backup?

> -----Original Message-----
> From: Hallvard B Furuseth [mailto:h.b.furuseth@usit.uio.no]

> Thanks.
> Do you happen to know if Linux supports shared mutexes?
> I can't see anything about it in the pthread mutex manpages.

That depends on the version of LinuxThreads you're using. I've worked with up
to version 2.2.4 and it is not supported. However that's OK on Intel at
least, because BerkeleyDB has specific assembly-code support for fast mutexes
on Intel boxes.

In general you can check for support by seeing if your system has the
pthread_mutexattr_setpshared() function, and whether it works or not. On
glibc up to 2.1.x this function doesn't exist. On glibc 2.2.4 it exists but
always returns failure if you try to set the shared attribute.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support