Skip to content

Commit caf6e9d

Browse files
committed
Have configure --without-spinlocks actually not use spinlock code, even
if supported by the cpu.
1 parent 69f2e9b commit caf6e9d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/include/storage/s_lock.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
6464
* Portions Copyright (c) 1994, Regents of the University of California
6565
*
66-
* $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.120 2003/12/23 03:31:30 momjian Exp $
66+
* $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.121 2003/12/23 03:52:10 momjian Exp $
6767
*
6868
*-------------------------------------------------------------------------
6969
*/
@@ -72,6 +72,7 @@
7272

7373
#include "storage/pg_sema.h"
7474

75+
#ifdef HAVE_SPINLOCKS /* skip spinlocks if requested */
7576

7677
#if defined(__GNUC__) || defined(__ICC)
7778
/*************************************************************************
@@ -438,7 +439,7 @@ typedef unsigned char slock_t;
438439
* Uses non-gcc inline assembly:
439440
*/
440441

441-
#if !defined(HAS_TEST_AND_SET)
442+
#if !defined(HAS_TEST_AND_SET) /* We didn't trigger above, let's try here */
442443

443444
#if defined(USE_UNIVEL_CC)
444445
typedef unsigned char slock_t;
@@ -604,6 +605,7 @@ typedef unsigned char slock_t;
604605

605606
#endif /* !defined(HAS_TEST_AND_SET */
606607

608+
#endif /* HAVE_SPINLOCKS */
607609

608610

609611
#ifndef HAS_TEST_AND_SET

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