From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10b6ac,eafed89bc01ad3bd X-Google-Attributes: gid10b6ac,public X-Google-Thread: f678f,eafed89bc01ad3bd X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1994-07-06 12:35:41 PST Newsgroups: comp.unix.osf.misc,comp.windows.x.motif Path: bga.com!news.sprintlink.net!hookup!swrinde!sdd.hp.com!apollo.hp.com!netnews From: tatsu_s@apollo.hp.com (Seiichi Tatsukawa) Subject: Re: X and DCE-RPC ? Please Help! Sender: usenet@apollo.hp.com (Usenet News) Message-ID: Date: Wed, 6 Jul 1994 18:47:57 GMT Distribution: inet References: <2uvgc5$4i2@uropax.contrib.de> Nntp-Posting-Host: kumi.ch.apollo.hp.com Organization: Hewlett-Packard Corporation, Chelmsford, MA Xref: bga.com comp.unix.osf.misc:652 comp.windows.x.motif:6969 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 +