10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ede45c commit f3bd00cCopy full SHA for f3bd00c
src/include/storage/s_lock.h
@@ -543,6 +543,30 @@ tas(volatile slock_t *lock)
543
#endif /* (__mc68000__ || __m68k__) && __linux__ */
544
545
546
+/* Motorola 88k */
547
+#if defined(__m88k__)
548
+#define HAS_TEST_AND_SET
549
+
550
+typedef unsigned int slock_t;
551
552
+#define TAS(lock) tas(lock)
553
554
+static __inline__ int
555
+tas(volatile slock_t *lock)
556
+{
557
+ register slock_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
570
/*
571
* VAXen -- even multiprocessor ones
572
* (thanks to Tom Ivar Helbekkmo)
0 commit comments