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

Commitf3bd00c

Browse files
committed
Add support for Motorola 88K to s_lock.h.
Apparently there are still people out there who care about this oldarchitecture. They probably care about dusty versions of Postgrestoo, so back-patch to all supported branches.David Carlier (from a patch being carried by OpenBSD packagers)Discussion:https://postgr.es/m/CA+XhMqzwFSGVU7MEnfhCecc8YdP98tigXzzpd0AAdwaGwaVXEA@mail.gmail.com
1 parent2ede45c commitf3bd00c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

‎src/include/storage/s_lock.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,30 @@ tas(volatile slock_t *lock)
543543
#endif/* (__mc68000__ || __m68k__) && __linux__ */
544544

545545

546+
/* Motorola 88k */
547+
#if defined(__m88k__)
548+
#defineHAS_TEST_AND_SET
549+
550+
typedefunsignedintslock_t;
551+
552+
#defineTAS(lock) tas(lock)
553+
554+
static __inline__int
555+
tas(volatileslock_t*lock)
556+
{
557+
registerslock_t_res=1;
558+
559+
__asm__ __volatile__(
560+
"xmem%0, %2, %%r0\n"
561+
:"+r"(_res),"+m"(*lock)
562+
:"r"(lock)
563+
:"memory");
564+
return (int)_res;
565+
}
566+
567+
#endif/* __m88k__ */
568+
569+
546570
/*
547571
* VAXen -- even multiprocessor ones
548572
* (thanks to Tom Ivar Helbekkmo)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp