mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Add support for Motorola 88K to s_lock.h.
Apparently there are still people out there who care about this old architecture. They probably care about dusty versions of Postgres too, 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
This commit is contained in:
		@@ -543,6 +543,30 @@ tas(volatile slock_t *lock)
 | 
				
			|||||||
#endif	 /* (__mc68000__ || __m68k__) && __linux__ */
 | 
					#endif	 /* (__mc68000__ || __m68k__) && __linux__ */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Motorola 88k */
 | 
				
			||||||
 | 
					#if defined(__m88k__)
 | 
				
			||||||
 | 
					#define HAS_TEST_AND_SET
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef unsigned int slock_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define TAS(lock) tas(lock)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static __inline__ int
 | 
				
			||||||
 | 
					tas(volatile slock_t *lock)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						register slock_t _res = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						__asm__ __volatile__(
 | 
				
			||||||
 | 
							"	xmem	%0, %2, %%r0	\n"
 | 
				
			||||||
 | 
					:		"+r"(_res), "+m"(*lock)
 | 
				
			||||||
 | 
					:		"r"(lock)
 | 
				
			||||||
 | 
					:		"memory");
 | 
				
			||||||
 | 
						return (int) _res;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif	 /* __m88k__ */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * VAXen -- even multiprocessor ones
 | 
					 * VAXen -- even multiprocessor ones
 | 
				
			||||||
 * (thanks to Tom Ivar Helbekkmo)
 | 
					 * (thanks to Tom Ivar Helbekkmo)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user