mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1-tmp
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0 configure.in: Auto merged include/config-win.h: Auto merged include/m_string.h: Auto merged include/my_pthread.h: Auto merged myisam/mi_search.c: Auto merged mysql-test/r/cast.result: Auto merged mysql-test/t/cast.test: Auto merged mysql-test/t/select.test: Auto merged mysys/my_pthread.c: Auto merged mysys/thr_alarm.c: Auto merged netware/pack_isam.def: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged strings/ctype-big5.c: Auto merged strings/ctype-tis620.c: Auto merged strings/xml.c: Auto merged vio/vio.c: Auto merged vio/viosocket.c: Auto merged mysql-test/r/select.result: Merged from 4.1. netware/BUILD/mwenv: Merged from 4.1. scripts/make_binary_distribution.sh: Merged from 4.1. sql/mysqld.cc: Merged from 4.1. sql/sql_show.cc: Merged from 4.1. strings/my_strtoll10.c: Merged from 4.1.
This commit is contained in:
@ -292,8 +292,6 @@ extern int my_pthread_create_detached;
|
||||
#undef HAVE_PTHREAD_RWLOCK_RDLOCK
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
#define sigset(A,B) pthread_signal((A),(void (*)(int)) (B))
|
||||
#define signal(A,B) pthread_signal((A),(void (*)(int)) (B))
|
||||
#define my_pthread_attr_setprio(A,B)
|
||||
#endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */
|
||||
|
||||
@ -325,14 +323,26 @@ extern int my_pthread_cond_init(pthread_cond_t *mp,
|
||||
#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
|
||||
int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
|
||||
#endif
|
||||
#if !defined(HAVE_SIGSET) && !defined(HAVE_mit_thread) && !defined(sigset)
|
||||
#define sigset(A,B) do { struct sigaction s; sigset_t set; \
|
||||
sigemptyset(&set); \
|
||||
s.sa_handler = (B); \
|
||||
s.sa_mask = set; \
|
||||
s.sa_flags = 0; \
|
||||
sigaction((A), &s, (struct sigaction *) NULL); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/*
|
||||
We define my_sigset() and use that instead of the system sigset() so that
|
||||
we can favor an implementation based on sigaction(). On some systems, such
|
||||
as Mac OS X, sigset() results in flags such as SA_RESTART being set, and
|
||||
we want to make sure that no such flags are set.
|
||||
*/
|
||||
#if defined(HAVE_SIGACTION) && !defined(my_sigset)
|
||||
#define my_sigset(A,B) do { struct sigaction s; sigset_t set; \
|
||||
sigemptyset(&set); \
|
||||
s.sa_handler = (B); \
|
||||
s.sa_mask = set; \
|
||||
s.sa_flags = 0; \
|
||||
sigaction((A), &s, (struct sigaction *) NULL); \
|
||||
} while (0)
|
||||
#elif defined(HAVE_SIGSET) && !defined(my_sigset)
|
||||
#define my_sigset(A,B) sigset((A),(B))
|
||||
#elif !defined(my_sigset)
|
||||
#define my_sigset(A,B) signal((A),(B))
|
||||
#endif
|
||||
|
||||
#ifndef my_pthread_setprio
|
||||
@ -412,16 +422,13 @@ struct tm *gmtime_r(const time_t *clock, struct tm *res);
|
||||
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DARWIN_THREADS
|
||||
#ifdef HAVE_DARWIN5_THREADS
|
||||
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
|
||||
#define pthread_kill(A,B) pthread_dummy(0)
|
||||
#define pthread_condattr_init(A) pthread_dummy(0)
|
||||
#define pthread_condattr_destroy(A) pthread_dummy(0)
|
||||
#define pthread_signal(A,B) pthread_dummy(0)
|
||||
#undef pthread_detach_this_thread
|
||||
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); }
|
||||
#undef sigset
|
||||
#define sigset(A,B) pthread_signal((A),(void (*)(int)) (B))
|
||||
#endif
|
||||
|
||||
#if ((defined(HAVE_PTHREAD_ATTR_CREATE) && !defined(HAVE_SIGWAIT)) || defined(HAVE_DEC_3_2_THREADS)) && !defined(HAVE_CTHREADS_WRAPPER)
|
||||
|
Reference in New Issue
Block a user