diff options
author | unknown <monty@mysql.com> | 2004-05-26 19:12:49 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-05-26 19:12:49 +0300 |
commit | 30bffb0213dbc5b52823b167de71dd96aff1bf16 (patch) | |
tree | 45397c78051c557e55bc9b5df93c68604da6a451 /mysys/my_pthread.c | |
parent | 1d482780b0da780a02067735cff8cd8f555236e9 (diff) | |
download | mariadb-git-30bffb0213dbc5b52823b167de71dd96aff1bf16.tar.gz |
Changed prototype of killed_ptr() to make it more portable
Applied patches for Netware
innobase/include/os0thread.h:
Applied patches for Netware
innobase/os/os0thread.c:
Applied patches for Netware
libmysql/libmysql.c:
Applied patches for Netware
libmysql/libmysql.def:
Applied patches for Netware
myisam/myisamchk.c:
Applied patches for Netware
Changed prototype of killed_ptr() to make it more portable
myisam/myisamdef.h:
Applied patches for Netware
Changed prototype of killed_ptr() to make it more portable
mysql-test/t/rpl_relayspace-slave.opt:
Applied patches for Netware
mysys/my_pthread.c:
Applied patches for Netware
mysys/my_static.h:
Portability fix
netware/BUILD/compile-linux-tools:
Applied patches for Netware
Changed prototype of killed_ptr() to make it more portable
netware/BUILD/mwenv:
Applied patches for Netware
Changed prototype of killed_ptr() to make it more portable
netware/BUILD/nwbootstrap:
Applied patches for Netware
Changed prototype of killed_ptr() to make it more portable
netware/my_manage.c:
Applied patches for Netware
Changed prototype of killed_ptr() to make it more portable
netware/mysql_fix_privilege_tables.pl:
Applied patches for Netware
Changed prototype of killed_ptr() to make it more portable
netware/mysql_test_run.c:
Applied patches for Netware
Changed prototype of killed_ptr() to make it more portable
netware/static_init_db.sql:
Applied patches for Netware
Changed prototype of killed_ptr() to make it more portable
scripts/make_binary_distribution.sh:
Applied patches for Netware
Changed prototype of killed_ptr() to make it more portable
sql/filesort.cc:
Changed prototype of killed_ptr() to make it more portable
sql/ha_myisam.cc:
Changed prototype of killed_ptr() to make it more portable
sql/mysqld.cc:
Fixed some typos for Netware
sql/sql_bitmap.h:
Applied patches for Netware
sql/sql_class.h:
Changed prototype of killed_ptr() to make it more portable
sql/sql_insert.cc:
safety fix
strings/my_strtoll10.c:
Added comment
Diffstat (limited to 'mysys/my_pthread.c')
-rw-r--r-- | mysys/my_pthread.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c index 2667c0670d8..d721418ffa1 100644 --- a/mysys/my_pthread.c +++ b/mysys/my_pthread.c @@ -98,25 +98,23 @@ void *my_pthread_getspecific_imp(pthread_key_t key) #undef pthread_exit void my_pthread_exit(void *status) { - NXThreadId_t tid = NXThreadGetId(); + NXThreadId_t tid; NXContext_t ctx; - char name[PATH_MAX] = ""; - - /* Do not call pthread_exit if it is not a LibC thread */ - if (tid != 0) - { - 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); - } - } + char name[NX_MAX_OBJECT_NAME_LEN+1] = ""; + + tid= NXThreadGetId(); + if (tid == NX_INVALID_THREAD_ID || !tid) + return; + if (NXThreadGetContext(tid, &ctx) || + NXContextGetName(ctx, name, sizeof(name)-1)) + return; + + /* + "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 |