m32r tas() implementation - Mailing list pgsql-ports

From Martin Pitt
Subject m32r tas() implementation
Date
Msg-id 20070414185459.GF5920@piware.de
Whole thread Raw
Responses Re: m32r tas() implementation  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: m32r tas() implementation  (Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>)
Re: m32r tas() implementation  (Bruce Momjian <bruce@momjian.us>)
Re: m32r tas() implementation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-ports
Hi PostgreSQL developers,

Kazuhiro Inaoka recently sent me a tas() implementation for the m32r
architecture [1]. It applies cleanly to 8.2.3 and seems otherwise
harmless. Do you consider applying it upstream?

Thank you,

Martin

[1] http://en.wikipedia.org/wiki/M32R

--
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org
diff -Nur postgresql-8.2/build-tree/postgresql-8.2.3/src/include/storage/s_lock.h
postgresql-8.2.new/build-tree/postgresql-8.2.3/src/include/storage/s_lock.h
--- postgresql-8.2.3/src/include/storage/s_lock.h    2006-06-08 00:24:45.000000000 +0200
+++ postgresql-8.2.3/src/include/storage/s_lock.h    2007-04-14 20:50:07.000000000 +0200
@@ -566,6 +566,15 @@
 #endif


+#if defined(__m32r__)
+#include <sys/tas.h>
+#define HAS_TEST_AND_SET
+
+typedef int slock_t;
+#define TAS(lock) tas(lock)
+
+#endif
+
 #endif    /* __GNUC__ */



Attachment

pgsql-ports by date:

Previous
From: "Pankaj"
Date:
Subject: Porting Postgresql to Windows - problems
Next
From: Tom Lane
Date:
Subject: Re: m32r tas() implementation