From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,eb16c447b2139225 X-Google-Attributes: gid103376,public From: Simon Wright Subject: Re: Rational APEX Ada95 w/ X11R6 Date: 1999/06/17 Message-ID: #1/1 X-Deja-AN: 490563557 X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 References: <929466176.893.35@news.remarQ.com> <7k6cr9$qk$1@nnrp1.deja.com> X-Trace: news.demon.co.uk 929600837 nnrp-06:24732 NO-IDENT pogner.demon.co.uk:158.152.70.98 Organization: At Home Newsgroups: comp.lang.ada X-Complaints-To: abuse@demon.net Date: 1999-06-17T00:00:00+00:00 List-Id: Matthew Heaney writes: > I think he is refering to the fact that in R6, you can run the X main > loop inside its own thread. > > How do you do this in Ada95? In other words, how can you run the X main > loop inside its own Ada task? > > Does R6 specify what kind of thread runs the main loop? I thought it > specified a "Posix thread." If so, how do you guarantee that an Ada > task maps to a Posix thread? It has always been possible to run the X main loop in a task (well, in DEC VAX Ada 83, Sunsoft (VADS), GNAT on Solaris, Linux, OSF anyway). The problems arise if you want other threads to access the Display(s) that your main loop is controlling. X11 doesn't have a main loop, does it? This an Xt function .. > Stay away from thick bindings that "synchronize access so that calls are > task-safe." This doesn't work. Stay away from thick bindings. Stay > away from bindings. If you build X11R6 with threads enabled, which is the default on some Linux platforms, and you initialize thread support in X and Xt, then calls are task-safe. > No. All the C calls to X/Motif can be done by a thin C layer, called by > a high-level infrastructure written in Ada95. There's no need for Ada > bindings to the toolkit directly. Or you could rewrite the whole binding in Ada :-) I did this for (the most interesting 25% of) X11R5 Xlib for Rational R1000 some years ago, an interesting exercise but really only useful to make people sit up and take notice. -- Simon Wright Work Email: simon.j.wright@gecm.com Alenia Marconi Systems Voice: +44(0)1705-701778 Integrated Systems Division FAX: +44(0)1705-701800