tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: DCE RPC and POSIX 1003.1
@ 2001-10-04 13:46 Rustam T. Usmanov
  0 siblings, 0 replies; only message in thread
From: Rustam T. Usmanov @ 2001-10-04 13:46 UTC (permalink / raw)
  To: tru64-unix-managers

Original question:

> Digital UNIX 4.0D, DCE 3.1.
> 
> Developing DCE RPC enabled program implies that I forced to use POSIX
> 1003.4a/d4 threads interfaces (-threads linker option).
> 
> Is there any way to use POSIX 1003.1c interfaces in such applications? In
> particular I would like to use pthread_rwlock_*.

and irrefragable answer from David Butenhof <David.Butenhof@compaq.com>:

There's no problem mixing the DCE thread and POSIX thread interfaces within 
the same program. The only restriction is that you can't use both within 
the same file. (I.e., you can't include both the real <pthread.h> and 
<dce/pthread.h>... and any file compiled with -threads will cause 
<pthread.h> to "chain" to <dce/pthread.h>.)

If there are any DCE-based interfaces you use that export or import 
"objects" from the thread API, such as pthread_t, pthread_mutex_t, or so 
forth, you also have to be careful because while the type names are the 
same the STRUCTURE of those types is very different. They're not 
interchangeable. Still, DCE thread code that happens to be running in a 
POSIX thread can synchronize using DCE thread mutexes; and your POSIX code 
could use the POSIX rwlock interfaces in a thread created using DCE 
pthread_create().

DCE thread operations can operate on POSIX threads (and vise versa) as long 
as they can get (or have been given) the proper type of pthread_t for the 
thread. A DCE library can use the DCE thread pthread_self() to get a DCE 
pthread_t for a thread created using POSIX pthread_create(), for example, 
and change its priority. But if given the POSIX pthread_t, it'll blow up 
ungracefully.

--
Rustam Usmanov, systems engineer
Open Library Systems Center, St.Petersburg State Technical University
Address:  29, Politekhnitcheskaya str., St.Petersburg, 195251, Russia
Tel/fax: +7 812 552 7654        <URL:http://www.unilib.neva.ru/olsc/>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-04 13:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-04 13:46 SUMMARY: DCE RPC and POSIX 1003.1 Rustam T. Usmanov

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