Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: tatsu_s@apollo.hp.com (Seiichi Tatsukawa)
Subject: Re: X and DCE-RPC ? Please Help!
Date: Wed, 6 Jul 1994 18:47:57 GMT	[thread overview]
Message-ID: <CsJ87y.7M8@apollo.hp.com> (raw)
In-Reply-To: 2uvgc5$4i2@uropax.contrib.de

In article <2uvgc5$4i2@uropax.contrib.de> suckow@uropax.contrib.de (Ralf Suckow) writes:
>Is it possible to make an X (more precisely: Motif) application 
>receiving X events to be a DCE-RPC client and/or server, 
>i.e. to send and receive DCE remote procedure calls?

Yes, it is possible with some restrictions. For instance,
cdsbrowser shipped with HP DCE is a Motif application/DCE client.

>1. If we use a single-threaded process, how can we integrate
>   the code of both systems that receives events and rpcs
>   from a number of sockets, if we don't have access to the
>   dce listening routines in the RPC runtime library?
>   How can we make the process to receive asynchroneous
>   X events while being in a synchroneous DCE-RPC
>   (a number of little threads doing RPC)?

You can't have a single-threaded process because the RPC runtime
always creates a few threads.

>2. If we use a multi-threaded process, and we run two threads,
>   one listening for DCE-RPC's, the other for X events,
>   - how can we get the X software to use jacket routines
>     for system calls (like select), and do we need to do this?

If you are using DCE on top of the system's native Pthread,
probably select() is thread-aware and you don't need to do
anything.

If you are using DCE with CMA, you either rebuild the Xlib with
CMA headers, i.e., pthread.h, by yourself, or get the
thread-aware (CMA-integrated) libc from your DCE vendor. HP ships
the thread-aware reentrant libc with HP DCE. So does IBM, I
believe.

>   - if both X and RPC-runtime use jacket routines for
>     the receiving system calls, don't they possibly get 
>     dead-locked in certain circumstances? Their algorithms
>     are not synchronized to each other in the resource
>     allocation orders etc.

Probably, just using CMA wrappers is not enough. You'll need a
thread-aware reentrant libc. Otherwise, you'll end up doing
mutex_lock/unlock by yourself.

>   - can we access X-related data and libraries from outside
>     the X thread, i.e. is it possible to make X (and Motif)
>     thread-safe?

Of course, you can make X (and Motif) thread-safe by rewriting
the library codes. :-) Easier approach is to have a dedicated
thread making X (and Motif) calls and synchronize access to the
global data by using mutexes.

There is still a problem. The use of signal() by Xlib can
interfere the threads' use of signal handlers.

---  Seiichi
-- 

     + Seiichi Tatsukawa (^[$BN)@n@:0l^[(B) tatsu_s@ch.hp.com +
     +    Hewlett-Packard/Open Systems Software Division      +


      parent reply	other threads:[~1994-07-06 18:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-06-30 22:18 X and DCE-RPC ? Please Help! Ralf Suckow
1994-07-06 11:08 ` Peter Klotz
1994-07-06 18:47 ` Seiichi Tatsukawa [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox