summaryrefslogtreecommitdiff
path: root/include/my_pthread.h.rej
diff options
context:
space:
mode:
authorunknown <istruewing@chilla.local>2007-01-29 18:47:46 +0100
committerunknown <istruewing@chilla.local>2007-01-29 18:47:46 +0100
commit1042a25a7fe0ecb94af989524796b4619ba31751 (patch)
treed5baa9f433ccab67349d65f3e71a37dfb9ef45b2 /include/my_pthread.h.rej
parent92a7c1ed9c6dec1fee17a830fdabe9272d6692bd (diff)
parentd308799383bdbcaad568c9844b34708462dd74e7 (diff)
downloadmariadb-git-1042a25a7fe0ecb94af989524796b4619ba31751.tar.gz
Merge chilla.local:/home/mydev/mysql-4.1-axmrg
into chilla.local:/home/mydev/mysql-5.0-axmrg BUILD/SETUP.sh: Auto merged configure.in: Auto merged include/my_global.h: Auto merged include/thr_alarm.h: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/symlink.result: Auto merged mysql-test/t/myisam.test: Auto merged mysql-test/t/symlink.test: Auto merged mysys/my_pthread.c: Auto merged sql/item_func.cc: Auto merged include/my_pthread.h: Manual merged mysql-test/r/myisam.result: Manual merged mysys/thr_alarm.c: Manual merged sql/ha_ndbcluster.cc: Manual merged sql/mysqld.cc: Manual merged
Diffstat (limited to 'include/my_pthread.h.rej')
-rw-r--r--include/my_pthread.h.rej80
1 files changed, 80 insertions, 0 deletions
diff --git a/include/my_pthread.h.rej b/include/my_pthread.h.rej
new file mode 100644
index 00000000000..1f73655b0bd
--- /dev/null
+++ b/include/my_pthread.h.rej
@@ -0,0 +1,80 @@
+***************
+*** 286,293 ****
+ #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) */
+
+--- 294,301 ----
+ #undef HAVE_PTHREAD_RWLOCK_RDLOCK
+ #undef HAVE_SNPRINTF
+
+! #define my_sigset(A,B) pthread_signal((A),(void (*)(int)) (B))
+! #define my_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) */
+
+***************
+*** 324,337 ****
+ #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)
+ #endif
+
+ #ifndef my_pthread_setprio
+--- 332,358 ----
+ #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
+!
+! /*
+! 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; int rc; \
+! DBUG_ASSERT((A) != 0); \
+! sigemptyset(&set); \
+! s.sa_handler = (B); \
+! s.sa_mask = set; \
+! s.sa_flags = 0; \
+! rc= sigaction((A), &s, (struct sigaction *) NULL); \
+! DBUG_ASSERT(rc == 0); \
+ } 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
+***************
+*** 416,422 ****
+ #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)
+--- 437,443 ----
+ #undef pthread_detach_this_thread
+ #define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); }
+ #undef sigset
+! #define my_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)