httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sťbastien Bonnegent <>
Subject Do you know apr_anylock_t ?
Date Thu, 22 Aug 2002 12:38:50 GMT
Ian Holsman wrote:
IH> Sébastien Bonnegent wrote:
IH> > Hi,
IH> > 
IH> > My purpose is sharing a data structure.
IH> > For example with an array:
IH> > - httpd creation, my_array is empty
IH> > - there are 8 servers launched
IH> > - server1 add an entry named (X)
IH> > - server5 add an entry
IH> > - server3 read an entry
IH> > - server7 remove the (X) entry
IH> > After this, my_array contains one line which is the server5 entry.
IH> > 
IH> you will need to create a shared memory area to put your structure in,
IH> and have some kind of locking mechanism to ensure you don't have any
IH> race conditions.

sure, to lock the shared memory area, I have to use the apr_anylock_t structure
but I haven't found documentation on the different lock type...
and it seems that this structure is not very used in the apache source...

Are there someone who know the different lock type ?

IH> have a look at apr-utils/misc/apr_rmm.c & apr_queue.c for an idea on
IH> what it required.

thank you. I haven't found apr_queue.c but apr_rmm.c is perfect.

seß - sinad
GPG uid: 0xCB92591D  ICQ: 60143970
LINUX - because life is too short to reboot !
-- Fortune:
Q:	Why should you always serve a Southern Carolina football man
	soup in a plate?
A:	'Cause if you give him a bowl, he'll throw it away.
View raw message