# At a local mysql-5.1-bugteam repository of davi
2768 Davi Arnaut 2009-02-03
Bug#42524: Function pthread_setschedprio() is defined but seems broken on i5/OS PASE
The problem is that MySQL use of pthread_setschedprio is not
supported i5/OS and the default system behavior for unsupported
calls is to emit a SIGILL signal which causes the server to
abort.
The solution is to treat the pthread_setschedprio as inexistent
when compiling binaries to i5/OS. This also does not invalidate
the fix for bug 38477 as the only supported dispatch class is
SCHED_OTHER (which is passed to pthread_setschedparam).
modified:
configure.in
per-file messages:
configure.in
Skip pthread_setschedprio check on i5/OS.
=== modified file 'configure.in'
--- a/configure.in 2009-01-30 13:57:02 +0000
+++ b/configure.in 2009-02-03 23:52:36 +0000
@@ -2048,7 +2048,7 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bs
mkstemp mlockall perror poll pread pthread_attr_create mmap mmap64 getpagesize \
pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
- pthread_key_delete pthread_rwlock_rdlock pthread_setprio pthread_setschedprio \
+ pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
realpath rename rint rwlock_init setupterm \
shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \
@@ -2071,6 +2071,15 @@ case "$target" in
;;
esac
+case "$mysql_cv_sys_os" in
+ OS400) # i5/OS (OS/400) emits a SIGILL (Function not implemented) when
+ # unsupported priority values are passed to pthread_setschedprio.
+ # Since the only supported value is 1, treat it as inexistent.
+ ;;
+ *) AC_CHECK_FUNCS(pthread_setschedprio)
+ ;;
+esac
+
# Check that isinf() is available in math.h and can be used in both C and C++
# code
AC_MSG_CHECKING(for isinf in <math.h>)
| Thread |
|---|
| • bzr commit into mysql-5.1-bugteam branch (davi:2768) Bug#42524 | Davi Arnaut | 4 Feb 2009 |