diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2010-09-15 10:06:21 +0000 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2010-09-15 10:06:21 +0000 |
commit | 236b6bc29e532822a366b56404ecaf1d906229bf (patch) | |
tree | 451f5001ad5179bf8ff566e467b30b9cfa005962 /src/include | |
parent | 1eab7a560d09fcd7314acd46ded955a37a262683 (diff) | |
download | postgresql-236b6bc29e532822a366b56404ecaf1d906229bf.tar.gz postgresql-236b6bc29e532822a366b56404ecaf1d906229bf.zip |
Simplify Windows implementation of latches. There's no need to keep a
dynamic pool of event handles, we can permanently assign one for each
shared latch. Thanks to that, we no longer need a separate shared memory
block for latches, and we don't need to know in advance how many shared
latches there is, so you no longer need to remember to update
NumSharedLatches when you introduce a new latch to the system.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/storage/latch.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/include/storage/latch.h b/src/include/storage/latch.h index 2c697741e4d..0c0b01ca19c 100644 --- a/src/include/storage/latch.h +++ b/src/include/storage/latch.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/latch.h,v 1.1 2010/09/11 15:48:04 heikki Exp $ + * $PostgreSQL: pgsql/src/include/storage/latch.h,v 1.2 2010/09/15 10:06:21 heikki Exp $ * *------------------------------------------------------------------------- */ @@ -25,9 +25,8 @@ typedef struct { sig_atomic_t is_set; bool is_shared; -#ifndef WIN32 int owner_pid; -#else +#ifdef WIN32 HANDLE event; #endif } Latch; @@ -46,9 +45,6 @@ extern void SetLatch(volatile Latch *latch); extern void ResetLatch(volatile Latch *latch); #define TestLatch(latch) (((volatile Latch *) latch)->is_set) -extern Size LatchShmemSize(void); -extern void LatchShmemInit(void); - /* * Unix implementation uses SIGUSR1 for inter-process signaling, Win32 doesn't * need this. |