Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* DCE RPC and POSIX 1003.1
@ 2001-10-03 13:57 Rustam T. Usmanov
  2001-10-04 12:23 ` David Butenhof
  0 siblings, 1 reply; 2+ messages in thread
From: Rustam T. Usmanov @ 2001-10-03 13:57 UTC (permalink / raw)


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_*.

Thanks in advance.
--
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] 2+ messages in thread

* Re: DCE RPC and POSIX 1003.1
  2001-10-03 13:57 DCE RPC and POSIX 1003.1 Rustam T. Usmanov
@ 2001-10-04 12:23 ` David Butenhof
  0 siblings, 0 replies; 2+ messages in thread
From: David Butenhof @ 2001-10-04 12:23 UTC (permalink / raw)


Rustam T. Usmanov wrote:

> 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_*.

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.

/------------------[ David.Butenhof@compaq.com ]------------------\
| Compaq Computer Corporation              POSIX Thread Architect |
|     My book: http://www.awl.com/cseng/titles/0-201-63392-2/     |
\-----[ http://home.earthlink.net/~anneart/family/dave.html ]-----/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-04 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-03 13:57 DCE RPC and POSIX 1003.1 Rustam T. Usmanov
2001-10-04 12:23 ` David Butenhof

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