Index: thread/thr_attr.c =================================================================== RCS file: /cvs/src/lib/libthread_xu/thread/thr_attr.c,v retrieving revision 1.8 diff -u -p -r1.8 thr_attr.c --- thread/thr_attr.c 3 May 2007 23:08:34 -0000 1.8 +++ thread/thr_attr.c 14 Jul 2008 18:10:42 -0000 @@ -380,13 +380,17 @@ if ((attr == NULL) || (*attr == NULL)) ret = EINVAL; else if (param == NULL) { ret = ENOTSUP; - } else if ((param->sched_priority < THR_MIN_PRIORITY) || - (param->sched_priority > THR_MAX_PRIORITY)) { - /* Return an unsupported value error. */ - ret = ENOTSUP; - } else - (*attr)->prio = param->sched_priority; - + } else { + int minv = sched_get_priority_min((*attr)->sched_policy); + int maxv = sched_get_priority_max((*attr)->sched_policy); + if (minv == -1 || maxv == -1 || + param->sched_priority < minv || + param->sched_priority > maxv) { + ret = ENOTSUP; + } else { + (*attr)->prio = param->sched_priority; + } + } return(ret); } Index: thread/thr_mutex_protocol.c =================================================================== RCS file: /cvs/src/lib/libthread_xu/thread/thr_mutex_protocol.c,v retrieving revision 1.3 diff -u -p -r1.3 thr_mutex_protocol.c --- thread/thr_mutex_protocol.c 6 Apr 2006 13:03:09 -0000 1.3 +++ thread/thr_mutex_protocol.c 14 Jul 2008 18:10:57 -0000 @@ -62,7 +62,7 @@ (protocol < PTHREAD_PRIO_NONE) || ( ret = EINVAL; else { (*mattr)->m_protocol = protocol; - (*mattr)->m_ceiling = THR_MAX_PRIORITY; + (*mattr)->m_ceiling = THR_MUTEX_CEIL_PRIORITY; } return(ret); } Index: thread/thr_private.h =================================================================== RCS file: /cvs/src/lib/libthread_xu/thread/thr_private.h,v retrieving revision 1.18 diff -u -p -r1.18 thr_private.h --- thread/thr_private.h 14 Apr 2008 20:12:41 -0000 1.18 +++ thread/thr_private.h 14 Jul 2008 18:07:33 -0000 @@ -277,15 +277,8 @@ * * The approach taken is that, within each class, signal delivery * always has priority over thread execution. */ -#define THR_DEFAULT_PRIORITY 15 -#define THR_MIN_PRIORITY 0 -#define THR_MAX_PRIORITY 31 /* 0x1F */ -#define THR_SIGNAL_PRIORITY 32 /* 0x20 */ -#define THR_RT_PRIORITY 64 /* 0x40 */ -#define THR_FIRST_PRIORITY THR_MIN_PRIORITY -#define THR_LAST_PRIORITY \ - (THR_MAX_PRIORITY + THR_SIGNAL_PRIORITY + THR_RT_PRIORITY) -#define THR_BASE_PRIORITY(prio) ((prio) & THR_MAX_PRIORITY) +#define THR_DEFAULT_PRIORITY 0 +#define THR_MUTEX_CEIL_PRIORITY 31 /* dummy */ /* * Time slice period in microseconds.