Re: [Monetdb-developers] [Monetdb-checkins] MonetDB/src/gdk gdk_system.mx, , 1.103, 1.104
On Thu, Jul 19, 2007 at 03:55:14PM +0000, Fabian wrote:
Update of /cvsroot/monetdb/MonetDB/src/gdk In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4085
Modified Files: gdk_system.mx Log Message: - added MT_join_thread to wait for a thread to exit - don't rely on the Apple compiler, but rely on the Mach-O system instead when trying to get around missing semaphore functionalities
OK, but shouldn't it be "__MACH__" instead of "__MACH_O__":
========
monet@horizon::/tmp> uname -a
--------
Darwin horizon.cs.umass.edu 8.10.0 Darwin Kernel Version 8.10.0: Wed May 23 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC Power Macintosh powerpc
========
monet@horizon::/tmp> cat x.c
--------
#include
Index: gdk_system.mx =================================================================== RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_system.mx,v retrieving revision 1.103 retrieving revision 1.104 diff -u -d -r1.103 -r1.104 --- gdk_system.mx 2 May 2007 16:17:00 -0000 1.103 +++ gdk_system.mx 19 Jul 2007 15:55:11 -0000 1.104 @@ -143,6 +143,7 @@ gdk_export void MT_exit_thread(int status); gdk_export void MT_global_exit(int status); gdk_export MT_Id MT_getpid(void); +gdk_export int MT_join_thread(MT_Id t); gdk_export int MT_kill_thread(MT_Id t);
#ifdef HAVE_PTHREAD_SIGMASK @@ -187,7 +188,7 @@
@- MT Semaphore API @h -#if defined(_AIX) || defined(__APPLE_CC__) +#if defined(_AIX) || defined(__MACH_O__) typedef struct { int cnt; pthread_mutex_t mutex; @@ -425,6 +426,12 @@ pthread_exit(&st); }
+int +MT_join_thread(MT_Id t) +{ + return pthread_join((pthread_t)(t - 1), NULL); +} +
int MT_kill_thread(MT_Id t) @@ -439,7 +446,7 @@ #endif }
-#if defined(_AIX) || defined(__APPLE_CC__) +#if defined(_AIX) || defined(__MACH_O__) void pthread_sema_init(pthread_sema_t *s, int flag, int nresources) {
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Monetdb-checkins mailing list Monetdb-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |
On 24-07-2007 13:36:22 +0200, Stefan Manegold wrote:
On Thu, Jul 19, 2007 at 03:55:14PM +0000, Fabian wrote:
Update of /cvsroot/monetdb/MonetDB/src/gdk In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4085
Modified Files: gdk_system.mx Log Message: - added MT_join_thread to wait for a thread to exit - don't rely on the Apple compiler, but rely on the Mach-O system instead when trying to get around missing semaphore functionalities
OK, but shouldn't it be "__MACH__" instead of "__MACH_O__":
Right!
*Maybe*, that would help to get client tests on MacOS X / Darwin (on PowerPC) working, again ...
I missed that, sorry.
participants (2)
-
Fabian Groffen
-
Stefan Manegold