Hello,
I think that there is a small problem in ooRexx 4.0 trunk:

common/platform/unix/SysThread.cpp

...
// create a new thread and attach to an activity
void SysThread::createThread(void)
{
    pthread_attr_t  newThreadAttr;
    int schedpolicy, maxpri, minpri;
    struct sched_param schedparam;

    // Create an attr block for Thread.
    pthread_attr_init(&newThreadAttr);
#if defined(LINUX) ||  defined(OPSYS_SUN) || defined(AIX)
    /* scheduling on two threads controlled by the result method of the */
    /* message object do not work properly without an enhanced priority */
    pthread_getschedparam(pthread_self(), &schedpolicy, &schedparam);
#ifdef _POSIX_PRIORITY_SCHEDULING
    maxpri = sched_get_priority_max(schedpolicy);
    minpri = sched_get_priority_min(schedpolicy);
#endif
    schedparam.sched_priority = (minpri + maxpri) / 2;
...

If _POSIX_PRIORITY_SCHEDULING is not defined then minpri / maxpri is
undefined.
Should we move the "schedparam.sched_priority = (minpri + maxpri) / 2;"
in the
#ifdef _POSIX_PRIORITY_SCHEDULING or should we use a default value for
schedparam.sched_priority if _POSIX_PRIORITY_SCHEDULING is not defined.

If we move it then the original values would be used in case
_POSIX_PRIORITY_SCHEDULING  is not defined....

Bye
  Rainer

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to