Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 134168 | Differences between
and this patch

Collapse All | Expand All

(-)postgresql-8.1.4/src/include/storage/s_lock.h (+24 lines)
Lines 299-304 tas(volatile slock_t *lock) Link Here
299
299
300
#endif	 /* __s390__ || __s390x__ */
300
#endif	 /* __s390__ || __s390x__ */
301
301
302
#if defined(__sh__)
303
#define HAS_TEST_AND_SET
304
305
typedef unsigned char slock_t;
306
307
#define TAS(lock) tas(lock)
308
309
static __inline__ int
310
tas(volatile slock_t *lock)
311
{
312
       register int _res = 1;
313
314
       __asm__ __volatile__(
315
               "tas.b  @%1\n\t"
316
               "movt   %0\n\t"
317
               "xor    #1,%0"
318
:              "=z"(_res)
319
:              "r"(lock)
320
:              "t","memory");
321
       return _res;
322
}
323
324
#endif  /* __sh__ */
325
302
326
303
#if defined(__sparc__)
327
#if defined(__sparc__)
304
#define HAS_TEST_AND_SET
328
#define HAS_TEST_AND_SET

Return to bug 134168