Dear user-level-threaders,
I wonder if anyone could help me out on a user thread related problem I'm
having. Please reply direct to [EMAIL PROTECTED] as I am not a member of
the pth-users list. Thanks!
I have written a large system that employs a user level thread package that I
wrote myself. Its the usual sort of thing using setjmp/ longjmp type calls. It
runs fine on SunOS/SPARC, the system I wrote it on initially, but problems
arise when it is ported to other systems (please don't suggest I change to pth
-- my code is too tightly bound in :-().
More specifically, I get the following problems:
1. On Linux systems with gcc (2.8.1) programs crash when they call certain
glibc routines -- select() and poll() are examples. I'm using exactly the same
code/ compiler as on the working SunOS version. I've also tried writing my own
versions of setjmp/ longjmp in assembler -- but the problem remains the same.
2. On Win32 systems parts of the system written in C are fine, but I get
crashes when using C++ code (g++). Can you think of any obvious reasons for
this? For example, is there anything you know of in typical C++ runtimes that
rely on static shared variables analogous to errno? Or, is the stack used
differently somehow?
Both the systems that don't work happen to be 80x86 systems, of course. Is
there anything extra I should be aware of on this architecture -- e.g., any
non-obvious registers that should be saved or floating point state etc??
I'd be grateful for any help or insights.
Thanks!
Geoff
Dr Geoff Coulson,
Senior Lecturer,
Distributed Multimedia Research Group,
Lancaster University,
Lancaster LA1 4YR,
England
email: [EMAIL PROTECTED]
tel: +1524 593054
fax: +1524 593608
http://www.comp.lancs.ac.uk/computing/staff/geoff.html
______________________________________________________________________
GNU Portable Threads (Pth) http://www.gnu.org/software/pth/
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager (Majordomo) [EMAIL PROTECTED]