summaryrefslogtreecommitdiff
path: root/include/my_pthread.h
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2018-09-21 16:04:16 +0400
committerSergey Vojtovich <svoj@mariadb.org>2018-10-05 14:37:15 +0400
commit1655053ac1c0b175d860defa2819b29642f664a7 (patch)
treec821c2034d43ff5f967af5fd2775522d96e25583 /include/my_pthread.h
parente855912733287d496cb2f429c8019005aaac9d0a (diff)
downloadmariadb-git-1655053ac1c0b175d860defa2819b29642f664a7.tar.gz
MDEV-17200 - pthread_detach called for already detached threads
pthread_detach_this_thread() was intended to be defined to something meaningful only on some ancient unixes, which don't have pthread_attr_setdetachstate() defined. Otherwise, on normal unixes, threads are created detached in the first place. This was broken in 0f01bf267680244ec488adaf65a42838756ed48e so that we started calling pthread_detach() for already detached threads. Intention was to detach aria checkpoint thread. However in 87007dc2f71634cc460271eb277ad851ec69c04b aria service threads were made joinable with appropriate handling, which makes breaking revision unneccessary. Revert remnants of 0f01bf267680244ec488adaf65a42838756ed48e, so that pthread_detach_this_thread() is meaningful only on some ancient unixes again.
Diffstat (limited to 'include/my_pthread.h')
-rw-r--r--include/my_pthread.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 6b830ca36d2..ae2f912f979 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -184,7 +184,7 @@ int pthread_cancel(pthread_t thread);
#define pthread_key(T,V) pthread_key_t V
#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V))
#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
-#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); }
+#define pthread_detach_this_thread()
#define pthread_handler_t EXTERNC void *
typedef void *(* pthread_handler)(void *);