mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
MDEV-8241: Debug build on Windows is broken: error LNK2019: unresolved external symbol pthread_detach referenced in function ma_checkpoint_init
pthread_detach() replaced with pthread_detach_this_thread() pthread_detach_this_thread() definition fixed
This commit is contained in:
@@ -182,7 +182,7 @@ int pthread_cancel(pthread_t thread);
|
|||||||
#define pthread_key(T,V) pthread_key_t V
|
#define pthread_key(T,V) pthread_key_t V
|
||||||
#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(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 my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
|
||||||
#define pthread_detach_this_thread()
|
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); }
|
||||||
#define pthread_handler_t EXTERNC void *
|
#define pthread_handler_t EXTERNC void *
|
||||||
typedef void *(* pthread_handler)(void *);
|
typedef void *(* pthread_handler)(void *);
|
||||||
|
|
||||||
|
@@ -340,7 +340,6 @@ int ma_checkpoint_init(ulong interval)
|
|||||||
{
|
{
|
||||||
/* thread lives, will have to be killed */
|
/* thread lives, will have to be killed */
|
||||||
checkpoint_control.status= THREAD_RUNNING;
|
checkpoint_control.status= THREAD_RUNNING;
|
||||||
pthread_detach(th);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DBUG_RETURN(res);
|
DBUG_RETURN(res);
|
||||||
@@ -574,6 +573,8 @@ pthread_handler_t ma_checkpoint_background(void *arg)
|
|||||||
sleeps= 1;
|
sleeps= 1;
|
||||||
pages_to_flush_before_next_checkpoint= 0;
|
pages_to_flush_before_next_checkpoint= 0;
|
||||||
|
|
||||||
|
pthread_detach_this_thread();
|
||||||
|
|
||||||
for(;;) /* iterations of checkpoints and dirty page flushing */
|
for(;;) /* iterations of checkpoints and dirty page flushing */
|
||||||
{
|
{
|
||||||
#if 0 /* good for testing, to do a lot of checkpoints, finds a lot of bugs */
|
#if 0 /* good for testing, to do a lot of checkpoints, finds a lot of bugs */
|
||||||
|
Reference in New Issue
Block a user