/[gentoo-alt]/trunk/prefix-overlay/dev-db/postgresql/files/postgresql-8.1.0-sh.patch
Gentoo

Contents of /trunk/prefix-overlay/dev-db/postgresql/files/postgresql-8.1.0-sh.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 889 - (show annotations) (download)
Wed Nov 23 17:45:11 2005 UTC (8 years, 5 months ago) by kito
File size: 618 byte(s)
postgresql-8.1.0 initial import.
1 --- src/include/storage/s_lock.h~ 2005-01-01 07:03:42.000000000 +0900
2 +++ src/include/storage/s_lock.h 2005-08-17 23:09:19.000000000 +0900
3 @@ -239,6 +239,31 @@
4 #endif /* __s390__ || __s390x__ */
5
6
7 +#if defined(__sh__)
8 +#define HAS_TEST_AND_SET
9 +
10 +typedef unsigned char slock_t;
11 +
12 +#define TAS(lock) tas(lock)
13 +
14 +static __inline__ int
15 +tas(volatile slock_t *lock)
16 +{
17 + register int _res = 1;
18 +
19 + __asm__ __volatile__(
20 + "tas.b @%1\n\t"
21 + "movt %0\n\t"
22 + "xor #1,%0"
23 +: "=z"(_res)
24 +: "r"(lock)
25 +: "t","memory");
26 + return _res;
27 +}
28 +
29 +#endif /* __sh__ */
30 +
31 +
32 #if defined(__sparc__)
33 #define HAS_TEST_AND_SET
34

  ViewVC Help
Powered by ViewVC 1.1.20