#At file:///home/jonas/src/telco-6.3/
2733 Jonas Oreland 2008-11-05
ndb - fix affinity-handling on solaris
modified:
configure.in
storage/ndb/src/common/portlib/NdbThread.c
=== modified file 'configure.in'
--- a/configure.in 2008-10-28 19:40:45 +0000
+++ b/configure.in 2008-11-05 08:58:35 +0000
@@ -2098,8 +2098,7 @@ AC_TRY_LINK(
int policy = 0;
pid_t tid = (unsigned)syscall(SYS_gettid);
tid = getpid();
- int ret = sched_setaffinity(tid, sizeof(unsigned long),
- (const cpu_set_t*)p);
+ int ret = sched_setaffinity(tid, sizeof(* p), p);
ret = sched_setscheduler(tid, policy, &loc_sched_param);],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_LINUX_SCHEDULING, [1], [Linux scheduling/locking function]),
@@ -2111,10 +2110,9 @@ AC_TRY_LINK(
#include <sys/lwp.h>
#include <sys/processor.h>
#include <sys/procset.h>],
- [processor_id_t *pid = (processor_id_t *)0;
- processor_id_t cpu_id = (processor_id_t)0;
- id_t tid = _lw_self();
- int ret = processor_bind(P_LWPID, tid, cpu_id, bind);],
+ [processorid_t cpu_id = (processorid_t)0;
+ id_t tid = _lwp_self();
+ int ret = processor_bind(P_LWPID, tid, cpu_id, 0);],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SOLARIS_AFFINITY, [1], [Solaris affinity function]),
AC_MSG_RESULT(no))
=== modified file 'storage/ndb/src/common/portlib/NdbThread.c'
--- a/storage/ndb/src/common/portlib/NdbThread.c 2008-03-27 18:07:50 +0000
+++ b/storage/ndb/src/common/portlib/NdbThread.c 2008-11-05 08:58:35 +0000
@@ -269,7 +269,7 @@ NdbThread_getThreadId()
#else
#ifdef HAVE_SOLARIS_AFFINITY
id_t tid;
- tid = _lw_self();
+ tid = _lwp_self();
return tid;
#else
return 0;
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (jonas:2733) | Jonas Oreland | 5 Nov |