Porting 1.0.b1 to hpux 10.10

Godmar Back gback at cs.utah.edu
Fri Jul 24 08:30:43 PDT 1998


 Hi Pavel,

> 
> I also have problem with threads on HP-UX 10.20. What I would propose is
> "./configure --with-threads=unix-internal". 
>

What's the problem with jthreads?  One thing I noticed when playing with HP-UX
9.x was that if you put a fd that points to a pseudo-tty (i.e., your stdin/
stdout/stderr in your xterm) into non-blocking, asynchronous mode, it will
stay there if you simply exit.  This will cause the shell's reads to return
zero, which means the shell thinks its terminal is failing.  Usually, it
terminates and closes your xterm.  To work around this, I added a 
restore_fds_and_exit function which is called atexit as well as SIGINT,
SIGTERM.  That means, of course, that SIGKILL will not work.

Does anybody know why HP-UX shows that kind of weird behavior?  I know
AIX does the same thing.  Solaris is a weird child in this respect: there
is only screws up the actual terminal if you use O_ASYNC or FIOASYNC  
(one of the two, I don't remember which off-hand.)

The second main difference between internal threads and jthreads is that
jthreads use the virtual alarm timer to implement preemption.  If that's
causing problems, you can turn that off with -vmdebug JTHREADNOPREEMPT,
or simply change the first parameter to jthread_init in internal.c to
be always false.  As far as jmpbuf offsets etc. goes, internal and jthreads
should be identical.  Of course, that's always a source of potential problems.
Usually, these problems manifest themselves when a thread gets scheduled
for the first time.

	- Godmar



More information about the kaffe mailing list