apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucian Adrian Grijincu" <lucian.griji...@gmail.com>
Subject Re: Interprocess semaphores and read/write locks
Date Fri, 02 Nov 2007 20:31:58 GMT
On Nov 2, 2007 6:29 PM, Guenter Knauf <fuankg@apache.org> wrote:
> Hi Lucian,
> > As of now APR only supports interprocess locks and shared memory.
> > I'd like to add interprocess semaphores and read/write locks to APR,
> > but I only know how to do this on Linux/Windows.
>
> > Is there any interest in such a feature and if yes, can somebody with
> > knowledge of other architectures say whether or not such features are
> > implementable on those other platforms?
> I can say that NetWare supports semaphores; this is from semaphore.h:
>
> int sem_init     ( sem_t *sem, int pshared, unsigned int value );

Just to be sure I'm interpreting this right: for this semaphore to be
used in multiple processes it must lie in a shared memory area, isn't
it?

> int sem_destroy  ( sem_t *sem );
> int sem_getvalue ( sem_t *sem, int      *sval );
> int sem_post     ( sem_t *sem );
> int sem_wait     ( sem_t *sem );
> int sem_trywait  ( sem_t *sem );
> int sem_timedwait( sem_t *sem, const struct timespec *abstime );
>
> You should explain a bit more what APIs you propose to implement, and what they can do
then;
> that would help in getting feedback....
>

I'm looking into what limitations other platforms have and I'll come
up with a common denominator these days.

Thanks,
Lucian

Mime
View raw message