Skip to content

Commit 93dc5a2

Browse files
committed
Set maximum semaphore count to 32767 instead of 1. Fixes
errorcode 298 when unlocking a semaphore more than once. Per report from Marcin Waldowski.
1 parent 152b77a commit 93dc5a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/port/win32_sema.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $PostgreSQL: pgsql/src/backend/port/win32_sema.c,v 1.4 2007/01/05 22:19:35 momjian Exp $
9+
* $PostgreSQL: pgsql/src/backend/port/win32_sema.c,v 1.5 2007/04/24 12:25:18 mha Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -82,7 +82,7 @@ PGSemaphoreCreate(PGSemaphore sema)
8282
sec_attrs.bInheritHandle = TRUE;
8383

8484
/* We don't need a named semaphore */
85-
cur_handle = CreateSemaphore(&sec_attrs, 1, 1, NULL);
85+
cur_handle = CreateSemaphore(&sec_attrs, 1, 32767, NULL);
8686
if (cur_handle)
8787
{
8888
/* Successfully done */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy