summaryrefslogtreecommitdiff
path: root/mysys/my_pthread.c
diff options
context:
space:
mode:
authorunknown <greg@mysql.com>2003-04-24 20:48:54 -0400
committerunknown <greg@mysql.com>2003-04-24 20:48:54 -0400
commitae5e364c19dba6c87e2fed60df1ee4c417e1f893 (patch)
treec36594ab694e521b8b9f7a633e650af1857c88f4 /mysys/my_pthread.c
parent1a01f0ff08b2e22602605d59e009d19500f9fb75 (diff)
downloadmariadb-git-ae5e364c19dba6c87e2fed60df1ee4c417e1f893.tar.gz
Changes from Novell for NetWare platform
include/my_pthread.h: Consolidated NetWare pthread_exit() changes. mysys/mf_path.c: NetWare needs a semicolon path delimiter. mysys/my_pthread.c: Consolidated NetWare pthread_exit() changes. sql/mini_client.cc: Modified to match my_connect(). sql/mysqld.cc: Consolidated NetWare pthread_exit() changes. sql/slave.cc: Consolidated NetWare pthread_exit() changes. sql/sql_load.cc: Stat properites should not be checked here on NetWare.
Diffstat (limited to 'mysys/my_pthread.c')
-rw-r--r--mysys/my_pthread.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 1eb15d92bc9..f88a884a1bc 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -90,6 +90,29 @@ void *my_pthread_getspecific_imp(pthread_key_t key)
}
#endif
+#ifdef __NETWARE__
+/*
+don't kill the LibC Reaper thread or the main thread
+*/
+#include <nks/thread.h>
+void my_pthread_exit(void *status)
+{
+#undef pthread_exit
+ NXThreadId_t tid = NXThreadGetId();
+ NXContext_t ctx;
+ char name[PATH_MAX] = "";
+
+ NXThreadGetContext(tid, &ctx);
+ NXContextGetName(ctx, name, PATH_MAX);
+
+ // "MYSQLD.NLM's LibC Reaper" or "MYSQLD.NLM's main thread"
+ // with a debug build of LibC the reaper can have different names
+ if (!strindex(name, "\'s"))
+ {
+ pthread_exit(status);
+ }
+}
+#endif
/* Some functions for RTS threads, AIX, Siemens Unix and UnixWare 7
(and DEC OSF/1 3.2 too) */