Nailah Ogeer wrote:
> Hi all,
> Just wanted to know how postgres handles semaphores. Was hoping that i can
> can use the locks defined in lwlock.h and lwlock.c . If i create a new
> lock and then use LockAcquire and
> LockRelease when I want a process to start and stop will this work?
Uh, well, we usually try to get a lock via a test-and-set assembly
language call into shared memory, and if we fail, we then get a
semaphore and wait for someone to wake us up.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073