httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <man...@raleigh.ibm.com>
Subject Is flockfile() usable?
Date Tue, 13 Apr 1999 21:11:06 GMT
On Tue, Apr 13, 1999 at 11:43:20AM -0700, Dean Gaudet wrote:
> Which gets us back to the argument about how to do the accepts :) 

Which brings me to a question on dealing with a select-accept model.

flock and it's friends, lock files per-process, meaning that every
thread in a process has the lock as far as its concerned.

I'm reading the O'Reilly pthreads book, and it mentions a set of
functions: flockfile(), ftrylockfile(), and funlockfile(), which are
defined by the pthreads standard (p. 181, table 5-2). These functions
are supposed to allow locking per-thread. Naturally, these would be
much simpler to use than dealing with both an pthread_mutex and an
flock/fcntl.

Does anyone know if these functions are reliably supported on pthreads
platforms? Will they do the job?

Manoj

Mime
View raw message