Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: gjb@fig.citib.com (Greg Brail)
Subject: Re: Thread-safe libraries for C++?
Date: Thu, 18 Feb 1993 22:05:16 GMT	[thread overview]
Message-ID: <C2o00s.8FB@fig.citib.com> (raw)
In-Reply-To: 1993Feb16.175330.11699@mdivax1.uucp

In article <1993Feb16.175330.11699@mdivax1.uucp> robinson@mdd.comm.mot.com (Jim Robinson) writes:
>Michael J. Grier (mjg@ktbush.ogo.dec.com) wrote:
>>   (I'm not directly involved with DCE, but I've been using pthreads and
>>DEC's CMA thread programming interface for a few years, so I might be able
>>to help...)
>
>>   It means that there is liberal use of #define to change your invocation
>>of standard library functions to instead call the DCE jacket, which is
>>a function which will perform the work behind your back to ensure that the
>>operation is carried out in a thread-safe manner.
>
>Is it correct to say then that if one forgets to #include the relevant
>header the result is that the native select() is used which could block
>the entire process instead of just the calling thread? Is so, isn't this
>an incredibly easy mistake to make which may not be terribly easy to
>catch?

Most DCE implementations I've seen actually put thread-safe versions of
system calls and standard library functions in a library that gets linked
in with DCE. Thus, you get the "proper" versions of these functions
even if you deliberately turn off the #defines (which is sometimes
necessary).

Yes, all this #defining and re-defining is a mess, and I hope it gets easier
when more vendors offer user-accessible threads in the OS. Right now,
all this is one reason why the toughest thing about DCE programming is
writing the makefile.

					greg
-- 
Greg Brail ------------------ Citibank -------------------- gjb@fig.citib.com
lose (lOOz) v. 1. a. To be unable to find; mislay. b. To incur the 
deprivation of, as by negligence or accident. 2. To be unable to maintain,
sustain, or keep. 3. The most commonly misspelled word on Usenet.


  parent reply	other threads:[~1993-02-18 22:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-02-12 18:43 Thread-safe libraries for C++? Mike Doel
1993-02-12 12:22 ` Jon C. R. Bennett
1993-02-13 18:17   ` Pete Becker
1993-02-14 22:26     ` Andrew Walduck
1993-02-12 20:40 ` Michael J. Grier
1993-02-16 17:54   ` Jim Robinson
1993-02-16 23:14     ` Michael J. Grier
1993-02-18  2:51     ` Michael Joosten
1993-02-18 22:05     ` Greg Brail [this message]
1993-02-16 22:29 ` Bob Martin
1993-02-17 18:15   ` John Nagle
1993-02-18 14:37     ` Andrew Condon
1993-02-22 20:22       ` Greg Brail
1993-02-16 22:30 ` Greg Brail
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