Skip to content

Commit 70cab22

Browse files
committed
Update ASM comments.
1 parent 25af534 commit 70cab22

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

src/include/storage/s_lock.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
6767
* Portions Copyright (c) 1994, Regents of the University of California
6868
*
69-
* $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.142 2005/10/11 20:41:32 tgl Exp $
69+
* $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.143 2005/12/17 20:15:43 momjian Exp $
7070
*
7171
*-------------------------------------------------------------------------
7272
*/
@@ -108,7 +108,7 @@
108108
*/
109109

110110

111-
#ifdef __i386__
111+
#ifdef __i386__ /* 32-bit i386 */
112112
#define HAS_TEST_AND_SET
113113

114114
typedef unsigned char slock_t;
@@ -214,8 +214,7 @@ spin_delay(void)
214214
#endif /* __x86_64__ */
215215

216216

217-
#if defined(__ia64__) || defined(__ia64)
218-
/* Intel Itanium */
217+
#if defined(__ia64__) || defined(__ia64) /* Intel Itanium */
219218
#define HAS_TEST_AND_SET
220219

221220
typedef unsigned int slock_t;
@@ -276,8 +275,8 @@ tas(volatile slock_t *lock)
276275
#endif /* __arm__ */
277276

278277

279-
#if defined(__s390__) || defined(__s390x__)
280278
/* S/390 and S/390x Linux (32- and 64-bit zSeries) */
279+
#if defined(__s390__) || defined(__s390x__)
281280
#define HAS_TEST_AND_SET
282281

283282
typedef unsigned int slock_t;
@@ -300,7 +299,7 @@ tas(volatile slock_t *lock)
300299
#endif /* __s390__ || __s390x__ */
301300

302301

303-
#if defined(__sparc__)
302+
#if defined(__sparc__) /* Sparc */
304303
#define HAS_TEST_AND_SET
305304

306305
typedef unsigned char slock_t;
@@ -323,6 +322,7 @@ tas(volatile slock_t *lock)
323322
#endif /* __sparc__ */
324323

325324

325+
/* PowerPC */
326326
#if defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__)
327327
#define HAS_TEST_AND_SET
328328

@@ -366,14 +366,15 @@ tas(volatile slock_t *lock)
366366
/* PowerPC S_UNLOCK is almost standard but requires a "sync" instruction */
367367
#define S_UNLOCK(lock) \
368368
do \
369-
{\
369+
{ \
370370
__asm__ __volatile__ (" sync \n"); \
371371
*((volatile slock_t *) (lock)) = 0; \
372372
} while (0)
373373

374374
#endif /* powerpc */
375375

376376

377+
/* Linux Motorola 68k */
377378
#if (defined(__mc68000__) || defined(__m68k__)) && defined(__linux__)
378379
#define HAS_TEST_AND_SET
379380

@@ -399,11 +400,11 @@ tas(volatile slock_t *lock)
399400
#endif /* (__mc68000__ || __m68k__) && __linux__ */
400401

401402

402-
#if defined(__vax__)
403403
/*
404404
* VAXen -- even multiprocessor ones
405405
* (thanks to Tom Ivar Helbekkmo)
406406
*/
407+
#if defined(__vax__)
407408
#define HAS_TEST_AND_SET
408409

409410
typedef unsigned char slock_t;
@@ -429,7 +430,7 @@ tas(volatile slock_t *lock)
429430
#endif /* __vax__ */
430431

431432

432-
#if defined(__ns32k__)
433+
#if defined(__ns32k__) /* National Semiconductor 32K */
433434
#define HAS_TEST_AND_SET
434435

435436
typedef unsigned char slock_t;
@@ -453,7 +454,7 @@ tas(volatile slock_t *lock)
453454
#endif /* __ns32k__ */
454455

455456

456-
#if defined(__alpha) || defined(__alpha__)
457+
#if defined(__alpha) || defined(__alpha__) /* Alpha */
457458
/*
458459
* Correct multi-processor locking methods are explained in section 5.5.3
459460
* of the Alpha AXP Architecture Handbook, which at this writing can be
@@ -499,7 +500,7 @@ do \
499500
#endif /* __alpha || __alpha__ */
500501

501502

502-
#if defined(__mips__) && !defined(__sgi)
503+
#if defined(__mips__) && !defined(__sgi) /* non-SGI MIPS */
503504
/* Note: on SGI we use the OS' mutex ABI, see below */
504505
/* Note: R10000 processors require a separate SYNC */
505506
#define HAS_TEST_AND_SET
@@ -553,7 +554,7 @@ do \
553554
/* These live in s_lock.c, but only for gcc */
554555

555556

556-
#if defined(__m68k__) && !defined(__linux__)
557+
#if defined(__m68k__) && !defined(__linux__) /* non-Linux Motorola 68k */
557558
#define HAS_TEST_AND_SET
558559

559560
typedef unsigned char slock_t;

0 commit comments

Comments
 (0)