From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Nailah Ogeer <ogeer(at)cs(dot)queensu(dot)ca> |
Cc: | pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org, Neil Conway <neilc(at)samurai(dot)com> |
Subject: | Re: [HACKERS] Semaphores |
Date: | 2003-10-24 15:49:06 |
Message-ID: | 200310241549.h9OFn6u01994@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Chapman | 2003-10-24 15:51:27 | [OT] Choosing a scripting language. |
Previous Message | Network Administrator | 2003-10-24 15:46:04 | Re: HTML generation with PL/PgSQL |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-10-24 15:57:34 | Re: Call for port reports |
Previous Message | Adam Witney | 2003-10-24 15:48:37 | Re: Call for port reports |