[754] in Pthreads mailing list archive
threads, Xlib and HP-UX
daemon@ATHENA.MIT.EDU (Jarle Langbraaten)
Wed Feb 18 10:12:32 1998
From: etojarl@eto.ericsson.se (Jarle Langbraaten)
Date: Wed, 18 Feb 1998 16:10:02 +0100
To: pthreads@MIT.EDU
Cc: etojarl@eto.ericsson.se
Hi Chris,
I saw your name and address on a HP web-site concerning threads and X11R6.
I'm having a problem with threads and X11R6 on HP-UX 10.20, which I would like
to discuss.
I am writing an application for both Solaris and HP-UX with two threads, each
containing a XEvent loop.
The code is as follows:
:
pthread_t tId;
int main(int argc, char **argv)
{
:
:
#ifdef sun
Status status = XInitThreads();
void *parg = NULL;
pthread_create (&tId, NULL, AxsuiProgress::main, parg);
#endif
#ifdef __hpux
pthread_attr_t pattr;
pthread_addr_t parg = NULL;
pthread_startroutine_t startRoutine = (pthread_startroutine_t)AxsuiProgress::main;
pthread_create (&tId, pthread_attr_default, startRoutine, parg);
#endif
:
:
On Solaris this works perfect, but on HP-UX I get the error
"Xlib: unexpected async reply", since I do not run
Status status = XInitThreads();
I cannot find any equivalent to XInitThreads() in HP-UX 10.20 X11R6.
Do you know if there is a way to solve this?
Best Regards
Jarle Langbraaten, Ericsson AS, Norway