Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc0cd32d

Browse files
committed
Add ARM32 support by Andrew McMurry
1 parenta01dfe7 commitc0cd32d

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

‎src/include/port/bsd.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
#defineHAS_TEST_AND_SET
2525
#endif
2626

27+
#if defined(__arm32__)
28+
#defineHAS_TEST_AND_SET
29+
#endif
30+
2731
#if defined(__powerpc__)
2832
#defineHAS_TEST_AND_SET
2933
typedefunsignedintslock_t;

‎src/include/storage/s_lock.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.58 1999/02/1323:22:09 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.59 1999/04/1317:42:26 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -124,6 +124,22 @@ __asm__("lock; xchgb %0,%1": "=q"(_res), "=m"(*lock):"0"(_res));
124124

125125

126126

127+
#if defined(__arm32__)
128+
#defineTAS(lock) tas(lock)
129+
130+
static __inline__int
131+
tas(volatileslock_t*lock)
132+
{
133+
registerslock_t_res=1;
134+
135+
__asm__("swpb %0, %0, [%3]":"=r"(_res),"=m"(*lock):"0"(_res),"r" (lock));
136+
return (int)_res;
137+
}
138+
139+
#endif/* __arm32__ */
140+
141+
142+
127143
#if defined(sparc)
128144
#defineTAS(lock) tas(lock)
129145

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp