Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jan 1999 12:04:15 -0500 (EST)
From:      Robert Watson <robert@cyrus.watson.org>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Correct way to write a thread-safe library
Message-ID:  <Pine.BSF.3.96.990130120203.1285A-100000@fledge.watson.org>

next in thread | raw e-mail | index | archive | help

So here I am, chugging away at a library I'm writing, and I notice that
the spec requires me to report errors via errno.  I immediatly recall a
long discussion of errno changes a long time ago and macro definitions of
it.  So my question is this--what is the correct way for me to write a
thread-safe library that can be used by threaded and non-threaded code,
and that also uses errno to report errors?  Is there a way?  Do I just use
it or should I be having two versions of my library, a libwhatever and a
libwhatever_r?

Thanks in advance..

  Robert N Watson 

robert@fledge.watson.org              http://www.watson.org/~robert/
PGP key fingerprint: 03 01 DD 8E 15 67 48 73  25 6D 10 FC EC 68 C1 1C

Carnegie Mellon University            http://www.cmu.edu/
TIS Labs at Network Associates, Inc.  http://www.tis.com/
SafePort Network Services             http://www.safeport.com/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990130120203.1285A-100000>