Yes a "semaphore" is very portable (at least within Unix environments).
You can also use "flock()" on a file. Another trick is just to create
and destroy a file as a sort of gate condition.

                        - Matt

Alan Cox wrote:
> 
> > pthread_mutex_xxxx, but this is for threads.  Do I use a semaphore?  Seems
> > like overkill; I just need a binary yes or no lock.
> 
> Portably you use a semaphore. If you want to be faster and non portable you
> can use shared memory regions and tricks but those may not work on all cpus
> 
> --
> To unsubscribe:
> mail -s unsubscribe [EMAIL PROTECTED] < /dev/null
begin:vcard 
n:Fahrner;Matt
tel;pager:(603) 639-4142
tel;fax:(603) 443-6190
tel;work:(603) 448-4100 xt 5150
x-mozilla-html:FALSE
url:http://www.gizzy.com/matt
org:Burlington Coat Factory Warehouse;MIS Networking
version:2.1
email;internet:[EMAIL PROTECTED]
title:Manager of Networking
adr;quoted-printable:;;2 South Park St.=0D=0AWillis House;Lebanon;NH;03766;USA
x-mozilla-cpt:;-3648
fn:Matt Fahrner
end:vcard

Reply via email to