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 77b76fe commit 0245c75Copy full SHA for 0245c75
src/include/storage/s_lock.h
@@ -559,6 +559,30 @@ tas(volatile slock_t *lock)
559
#endif /* (__mc68000__ || __m68k__) && __linux__ */
560
561
562
+/* Motorola 88k */
563
+#if defined(__m88k__)
564
+#define HAS_TEST_AND_SET
565
+
566
+typedef unsigned int slock_t;
567
568
+#define TAS(lock) tas(lock)
569
570
+static __inline__ int
571
+tas(volatile slock_t *lock)
572
+{
573
+ register slock_t _res = 1;
574
575
+ __asm__ __volatile__(
576
+ " xmem %0, %2, %%r0 \n"
577
+: "+r"(_res), "+m"(*lock)
578
+: "r"(lock)
579
+: "memory");
580
+ return (int) _res;
581
+}
582
583
+#endif /* __m88k__ */
584
585
586
/*
587
* VAXen -- even multiprocessor ones
588
* (thanks to Tom Ivar Helbekkmo)
0 commit comments