Skip site navigation (1) Skip section navigation (2)

Re: darwin pgsql patches

From: Peter Bierman <bierman(at)apple(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: darwin pgsql patches
Date: 2000-12-05 22:16:25
Message-ID: v03130301b653151295a2@[17.202.21.230] (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-patches
At 2:46 PM -0500 12/5/00, Tom Lane wrote:
>Hm.  It's clearly possible to base Postgres's semaphore stuff on unnamed
>Posix semaphores living in the shared memory area (which eliminates the
>issue of inheritance by child processes).  You'd need to revise the API
>presented by ipc.c so that it doesn't depend on semaphore IDs and keys.

Heh. True, but unfortunately Apple hasn't implemented _unnamed_ POSIX semaphores yet. (Please don't shoot the messenger, I'll kill myself.)

But my patch to ipc.c to use named semaphores is actually pretty compact. It conditionalizes the function bodies of IpcSemaphoreLock and related, and it changes the typedef of a IpcSemaphoreId from a int to a long, so I just pass the key used to create the semaphore back as the semid.

-pmb

--
"Every time you provide an option, you're asking the user to make a decision.
 That means they will have to think about something and decide about it.
 It's not necessarily a bad thing, but, in general, you should always try to
 minimize the number of decisions that people have to make."
 http://joel.editthispage.com/stories/storyReader$51



In response to

pgsql-patches by date

Next:From: Michael ForkDate: 2000-12-06 05:00:09
Subject: Diff to fix SQLForeignKeys in ODBC
Previous:From: Peter EisentrautDate: 2000-12-05 21:48:39
Subject: Re: darwin pgsql patches

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group