This is the mail archive of the
mailing list for the Cygwin project.
RE: port of omniorb
- To: cygwin at cygwin dot com
- Subject: RE: port of omniorb
- From: "Fleischer, Karsten (K.)" <kfleisc1 at getrag-ford dot com>
- Date: Wed, 4 Apr 2001 08:37:50 -0400
I had a closer look at OmniORB's posix.cc source file.
There is a macro "PthreadSupportThreadPriority" which toggles use of thread
priority. If undefined,following functions are never needed:
Here are the functions that are always needed:
The following are available on some OS's only. Alternatives for other OS's
are given, just have to choose the right one.
These are used only if we have a pthread draft 4 implementation:
Otherwise these are used instead:
The following have different calling conventions along different versions of
the pthread draft:
X> pthread_create (draft 4: second arg is pthread_attr_t, otherwise
X> pthread_detach (draft <= : arg is pthread_t *, otherwise pthread_t)
O> pthread_getspecific (draft <= 6: void return type, needs second arg of
type void **; draft > 6: void * return type, no second arg)
X> pthread_yield (if draft == 6: called with NULL arg, elif draft < 9: no
arg, else: call sched_yield)
These two are called with second arg = 0 for draft version != 4. With draft
version 4 the second arg is
This one is used only if draft version == 8:
This one is used only if NeedPthreadInit is defined
This one, the only you marked as "can't be done", is used only if
Which pthread draft version do we have on Cygwin? At least 8, I think...
Undefining the NoNanoSleep macro gets rid of pthread_delay_np. This forces
use of the nanosleep function instead in omni_thread::sleep.
Nothing has to be done to get rid of pthread_get_expiration_np. Use of
clock_gettime in omni_thread::get_time will happen automatically.
So for building OmniORB one has to
- undefine PthreadSupportThreadPriority
- undefine NeedPthreadInit
- define PthreadDraftVersion to 8(?)
- undefine NoNanoSleep
in the makefile.
This is done by setting
OMNITHREAD_POSIX_CPPFLAGS = -UPthreadSupportThreadPriority -UNeedPthreadInit
in the platform specific makefile.
The only change which is necessarily needed in posix.cc is to change line
#if !defined(__linux__) && !defined(__CYGWIN__)
Hope this helps...
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple