|
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.138 2005/08/27 16:22:48 tgl Exp $ |
| 69 | + * $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.139 2005/08/28 18:26:01 tgl Exp $ |
70 | 70 | *
|
71 | 71 | *-------------------------------------------------------------------------
|
72 | 72 | */
|
@@ -487,6 +487,14 @@ tas(volatile slock_t *lock)
|
487 | 487 | return_res;
|
488 | 488 | }
|
489 | 489 |
|
| 490 | +/* MIPS S_UNLOCK is almost standard but requires a "sync" instruction */ |
| 491 | +#defineS_UNLOCK(lock)\ |
| 492 | +do \ |
| 493 | +{\ |
| 494 | +__asm__ __volatile__ ("sync \n"); \ |
| 495 | +*((volatile slock_t *) (lock)) = 0; \ |
| 496 | +} while (0) |
| 497 | + |
490 | 498 | #endif/* __mips__ && !__sgi */
|
491 | 499 |
|
492 | 500 |
|
|