66
66
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
67
67
* Portions Copyright (c) 1994, Regents of the University of California
68
68
*
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 $
70
70
*
71
71
*-------------------------------------------------------------------------
72
72
*/
108
108
*/
109
109
110
110
111
- #ifdef __i386__
111
+ #ifdef __i386__ /* 32-bit i386 */
112
112
#define HAS_TEST_AND_SET
113
113
114
114
typedef unsignedchar slock_t ;
@@ -214,8 +214,7 @@ spin_delay(void)
214
214
#endif /* __x86_64__ */
215
215
216
216
217
- #if defined(__ia64__ )|| defined(__ia64 )
218
- /* Intel Itanium */
217
+ #if defined(__ia64__ )|| defined(__ia64 )/* Intel Itanium */
219
218
#define HAS_TEST_AND_SET
220
219
221
220
typedef unsignedint slock_t ;
@@ -276,8 +275,8 @@ tas(volatile slock_t *lock)
276
275
#endif /* __arm__ */
277
276
278
277
279
- #if defined(__s390__ )|| defined(__s390x__ )
280
278
/* S/390 and S/390x Linux (32- and 64-bit zSeries) */
279
+ #if defined(__s390__ )|| defined(__s390x__ )
281
280
#define HAS_TEST_AND_SET
282
281
283
282
typedef unsignedint slock_t ;
@@ -300,7 +299,7 @@ tas(volatile slock_t *lock)
300
299
#endif /* __s390__ || __s390x__ */
301
300
302
301
303
- #if defined(__sparc__ )
302
+ #if defined(__sparc__ )/* Sparc */
304
303
#define HAS_TEST_AND_SET
305
304
306
305
typedef unsignedchar slock_t ;
@@ -323,6 +322,7 @@ tas(volatile slock_t *lock)
323
322
#endif /* __sparc__ */
324
323
325
324
325
+ /* PowerPC */
326
326
#if defined(__ppc__ )|| defined(__powerpc__ )|| defined(__powerpc64__ )
327
327
#define HAS_TEST_AND_SET
328
328
@@ -366,14 +366,15 @@ tas(volatile slock_t *lock)
366
366
/* PowerPC S_UNLOCK is almost standard but requires a "sync" instruction */
367
367
#define S_UNLOCK (lock )\
368
368
do \
369
- {\
369
+ { \
370
370
__asm__ __volatile__ ("sync \n"); \
371
371
*((volatile slock_t *) (lock)) = 0; \
372
372
} while (0)
373
373
374
374
#endif /* powerpc */
375
375
376
376
377
+ /* Linux Motorola 68k */
377
378
#if (defined(__mc68000__ )|| defined(__m68k__ ))&& defined(__linux__ )
378
379
#define HAS_TEST_AND_SET
379
380
@@ -399,11 +400,11 @@ tas(volatile slock_t *lock)
399
400
#endif /* (__mc68000__ || __m68k__) && __linux__ */
400
401
401
402
402
- #if defined(__vax__ )
403
403
/*
404
404
* VAXen -- even multiprocessor ones
405
405
* (thanks to Tom Ivar Helbekkmo)
406
406
*/
407
+ #if defined(__vax__ )
407
408
#define HAS_TEST_AND_SET
408
409
409
410
typedef unsignedchar slock_t ;
@@ -429,7 +430,7 @@ tas(volatile slock_t *lock)
429
430
#endif /* __vax__ */
430
431
431
432
432
- #if defined(__ns32k__ )
433
+ #if defined(__ns32k__ )/* National Semiconductor 32K */
433
434
#define HAS_TEST_AND_SET
434
435
435
436
typedef unsignedchar slock_t ;
@@ -453,7 +454,7 @@ tas(volatile slock_t *lock)
453
454
#endif /* __ns32k__ */
454
455
455
456
456
- #if defined(__alpha )|| defined(__alpha__ )
457
+ #if defined(__alpha )|| defined(__alpha__ )/* Alpha */
457
458
/*
458
459
* Correct multi-processor locking methods are explained in section 5.5.3
459
460
* of the Alpha AXP Architecture Handbook, which at this writing can be
499
500
#endif /* __alpha || __alpha__ */
500
501
501
502
502
- #if defined(__mips__ )&& !defined(__sgi )
503
+ #if defined(__mips__ )&& !defined(__sgi )/* non-SGI MIPS */
503
504
/* Note: on SGI we use the OS' mutex ABI, see below */
504
505
/* Note: R10000 processors require a separate SYNC */
505
506
#define HAS_TEST_AND_SET
553
554
/* These live in s_lock.c, but only for gcc */
554
555
555
556
556
- #if defined(__m68k__ )&& !defined(__linux__ )
557
+ #if defined(__m68k__ )&& !defined(__linux__ )/* non-Linux Motorola 68k */
557
558
#define HAS_TEST_AND_SET
558
559
559
560
typedef unsignedchar slock_t ;