[omniORB] AIX
Gary D. Duzan
gdd0@gte.com
Wed, 05 Jan 2000 12:54:23 -0500
I don't think AIX 4.3 really supports nanosleep() properly.
Most articles I've read on the topic suggest using the "select on
empty fdsets with timeout" trick for AIX. usleep() should work,
but you may need to link in libbsd_r to get it. I don't think you
should need any patches, but we're still on AIX 4.2.1 in our group.
I expect we'll upgrade in the coming months, so I'll have more to
say on the matter then.
Gary Duzan
GTE Laboratories
In Message <200001051741.MAA21551@desmond.imagine_ny.com> ,
Boris Khanales <boris@imagine-sw.com> wrote:
=>I've sent out question about omni_thread::sleep.
=>There is some more info:
=>
=>I've changed powerpc_aix_4.2.mk
=>OMNITHREAD_POSIX_CPPFLAGS = -DNoNanoSleep -DPthreadDraftVersion=10
=>Than I had to add
=>#if defined(__aix__)
=>#include <unistd.h>
=>#endif
=>in posix.cc othrwise it doesn't compile.
=>As you can see I'm using
=>#elif defined(__linux__) || defined(__aix__)
=>
=> if (secs > 2000) {
=> ::sleep(secs);
=> } else {
=> usleep(secs * 1000000 + (nanosecs / 1000));
=> }
=>
=>#else
=>for sleep implementation.
=>
=>The "normal" implementation is
=>#ifndef NoNanoSleep
=>
=> if (nanosleep(&rqts, (timespec*)NULL) != 0)
=> throw omni_thread_fatal(errno);
=>#else
=>but it always throws exception.
=>
=>I'm not AIX user/developer and I do not think I've done
=>right things. If sombody has any idea about right way of doing
=>it, I'd love to know. If i'm missin some patches or ...
=>
=>Thank You.
=>
=>