T.R | Title | User | Personal Name | Date | Lines |
---|
1891.1 | start | SDSVAX::SWEENEY | The Finite Voyage | Mon Dec 11 1989 17:37 | 9 |
| Although the documentation doesn't have much to say about it, calls to
Xlib according to folklore are ast-reentrant.
Whether this is accomplished by merely disabling/enabling ast's in some
common routine, I do not know.
If you have to ask "What is an X event" no satisfying answer can be
entered into this conference. Instead go to the Scheiffler, Gettys,
Newman book, The X Window System.
|
1891.2 | | DECWIN::FISHER | Burns Fisher 381-1466, ZKO3-4/W23 | Tue Dec 12 1989 15:14 | 13 |
| Xlib is indeed ast reentrant. Critical sections all turn off asts in a tricky,
but fast way.
What .0 may be asking about is the trick of porting an AST-driven program to
DECWindows by having the ast routines send messages using the X routine
SendEvent and then having the client reading events in user mode and dispatching
on them either to the appropriate X routine or to the routine which will act on
the receipt of an AST.
As .1 said, if you don't know what an X Event is, better get the Digital Press
book and come back with questions.
Burns
|
1891.3 | To run AST's on the X EVENT QUEUE | FREZEN::PROJECTS | | Tue Dec 12 1989 19:17 | 13 |
|
This is 0.
I know what an X event is... what I want to do is take a group of
routines attached to efn's and route them (synchronize their execution)
thru the X event queue so they won't collide. All I have to do is
mutually exclude one routine with any other events invoked from the
mainloop.
I'm a little foggy on your statements on XLIB being reentrant...
could you expand on that.
I also saw a decwindows routine XtAddinput... have you used it at all?
|
1891.4 | | SDSVAX::SWEENEY | The Finite Voyage | Wed Dec 13 1989 09:40 | 17 |
| You appear to be confusing X and X Toolkit Intrinsics and this is at
the root of your problem.
The X event queue is a creature of X. X defines only the XNextEvent
and other event queue manipulation routines.
The "mainloop" is a creature of X Toolkit Intrinsics (Xt routines). It
defines the _dispatch_ mechanism for each event.
A common practice is to set a VMS event flag (and IOSB) inside an AST
routine so that a non-AST routine will be dispatched through the main
loop.
Getting a VMS event flag (and IOSB) associated with this non-AST
routine is what XtAppAddInput does. Examples of the usage of this
routine are in the EXAMPLES conference.
|
1891.5 | To run AST's on the X EVENT QUEUE | FREZEN::PROJECTS | | Wed Dec 13 1989 11:59 | 6 |
|
Hi SDSVAX::SWEENEY "The Finite Voyage"
thankx
|
1891.6 | Since I just wrapped up a baselevel, I've got leisure time to pick nits... | RTL::BUTENHOF | Better Living Through Concurrency! | Tue Dec 19 1989 09:55 | 15 |
| .2: Being in a group that is HIGHLY concerned about re-entrancy (since we have
these wonderful little threads which we'd ideally like to see proceeding in
parallel), I just can never let statements like "Xlib is AST reentrant" slip by
without comment. Xlib ISN'T reentrant. Rather, it takes steps to prevent any
possibility of rentry! T'ain't the same thing a'tall. With ASTs, that's a
reasonable approximation, and often the only workable solution... but not all
parallel reentrancy is ASTs, and locking out other threads from the entire Xlib
library is probably NOT a reasonable approximation of reentrancy.
I know, I know... that's excess flamage, since you were just replying to a
question on ASTs. Still... I don't want anyone to get complacent about this!
Threads are here, they'll be getting bigger and brighter, and I want everyone
coding libraries to start worrying! :-)
/dave
|
1891.7 | | DECWIN::FISHER | Burns Fisher 381-1466, ZKO3-4/W23 | Wed Dec 20 1989 15:18 | 4 |
| re .6: No problem...we all have our hot buttons. Thanks for the
clarification.
Burns
|
1891.8 | Threads! | OXNARD::HAYNES | Charles Haynes | Thu Dec 21 1989 00:03 | 6 |
| Re: .6
Hear! Hear! Now if I only had a LANGUAGE and an O/S that supported them...
... maybe next release!
-- Charles
|
1891.9 | | QUARK::LIONEL | Free advice is worth every cent | Thu Dec 21 1989 11:12 | 5 |
| Re: .8
You do. Ada (and LISP, I think) on VMS.
Steve
|
1891.10 | Thanks for the (free) advice | OXNARD::HAYNES | Charles Haynes | Sun Dec 24 1989 21:04 | 4 |
| Not to get into ADA (or VMS) bashing here. But ADA tasks ain't threads.
I want better synchronization than rendezvous (among other things).
-- Charles
|