* query: multi-threaded use of X by Ada tasks
@ 1989-05-02 16:08 IBRAHIM Bertrand
0 siblings, 0 replies; only message in thread
From: IBRAHIM Bertrand @ 1989-05-02 16:08 UTC (permalink / raw)
I am working on a computer aided learning project at the University
of Geneva using the X-windows Xray toolkit with an Ada interface on a SUN 3/60
workstation. I'm having a problem with multi-threaded access to the toolkit
and low-level X windows primitives.
My Ada program has several tasks which call into the Ada interface to Xrlib
which, in turn, calls the toolkit's C routines. Everything worked fine until I
put a call to XGet_Geometry() into one of the tasks. This caused the window
manager to hang and anonymous run-time error to appear: "sequence lost."
I could make everything fine again by embedding the XGet_Geometry() call
inside an Ada "rendezvous", thus suspending the other tasks for the duration
of the call. I could also make it work by surrounding all toolkit calls with
"Wait" and "Signal" calls to a semaphore task, thus confirming that the
toolkit won't support multi-threaded access.
The C code for each X Windows primitive locks and unlocks the display with
the macros "LockDisplay" and "UnlockDisplay" which, in my copy of the X Windows
source, are empty macros which do nothing. The manual says that these macros
can be defined for systems which want to support multi-threaded access.
My question is how can I make the Xray toolkit and the low-level
X Windows primitives support multi-threaded access? How are "LockDisplay" and
"UnlockDisplay" supposed to be implemented? (The C code can't possibly know
about Ada tasks.) Is there anyone else using the Ada interface who has
encountered this problem? I would appreciate any suggestions or comments.
I am using X11R2 on a Sun 3/60 running SUNOS3.5. The release of the Xray toolkit
is the one that arrived with the X11R2 tapes.
Thanks for any help.
Bertrand Ibrahim
to BITNET to MHS
from
BITNET IBRAHIM@CGEUGE51 ibrahim@uni2a.unige.ch
INTERNET IBRAHIM%CGEUGE51@CUNYVM.CUNY.EDU ibrahim%uni2a.unige.ch@ubc.csnet
MHS ibrahim@uni2a.unige.ch
JANET ibrahim%uni2a.unige.ch@uk.ac.ean-relay
from UUCP to UUCP : cernvax!cui!bertrand.uucp
mcvax!cernvax!cui!bertrand.uucp
cui!bertrand@cernvax.UUCP
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1989-05-02 16:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1989-05-02 16:08 query: multi-threaded use of X by Ada tasks IBRAHIM Bertrand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox