Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: robinson@mdivax1.uucp (Jim Robinson)
Subject: Re: Thread-safe libraries for C++?
Date: 16 Feb 93 17:54:19 GMT	[thread overview]
Message-ID: <1993Feb16.175330.11699@mdivax1.uucp> (raw)
In-Reply-To: 1993Feb12.204022.25188@nntpd.lkg.dec.com

Michael J. Grier (mjg@ktbush.ogo.dec.com) wrote:

>In article <1993Feb12.184345.19220@walter.bellcore.com>, doel@bbq.uucp (Mike Doel) writes:
>|>
>|>Our group is doing a little research into which implementation of RPC's we
>|>wish to use for an upcomming project.  We're leaning towards the DCE
>|>standard but for one small thing.  As I understand it, the RPC mechanism for
>|>DCE is implemented using DCE threads.  In order to use threads, you must use
>|>"thread safe" libraries.  Apparently, the standard C libraries aren't thread
>|>safe.  To counteract this, "jacket" routines have been developed which make
>|>the standard Unix libraries thread safe (what does that mean?).

>   (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.

[and]

>   For some operations, the jackets go farther to give you some semblance of
>thread-synchronous operation, for example select().  Your mileage will
>vary depending on your UNIX variant and how serious its kernel is about not
>blocking when non-blocking I/O is requested.

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?

And, are the jacket routines also used to map blocking I/O calls (e.g.
read(), recvfrom()) to non-blocking versions?

[Followup to comp.unix.osf.misc only]
-- 
Jim Robinson
robinson@mdd.comm.mot.com
{ubc-cs!van-bc,uunet}!mdivax1!robinson



  reply	other threads:[~1993-02-16 17:54 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 [this message]
1993-02-16 23:14     ` Michael J. Grier
1993-02-18  2:51     ` Michael Joosten
1993-02-18 22:05     ` Greg Brail
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