Spinlock code
| From: | Rasmus Lerdorf | Date: | Mon, 11 Dec 2006 02:18:59 +0000 |
| Subject: | Spinlock code | ||
| Groups: | php.apc.dev | ||
| Request: | Send a blank email to php-apc-dev+get-32@lists.php.net to get a copy of this message | ||
Anybody feel like taking a shot at implementing spinlocks? I have been
looking through the Postgres-8.2 code and I talked a bit with Bruce
Momjian about their implementation and I think we could lift a good
amount of code to get portable spinlocks from them.
See:
postgresql-8.2.0/src/include/storage/s_lock.h
And also see how they are used in:
postgresql-8.2.0/src/backend/storage/lmgr/lwlock.c
PostgreSQL is completely BSD-licensed, so it is a good place to steal
code from.
-Rasmus