Date: Wed, 11 Feb 2004 13:58:46 -0500 From: Charles Swiger <cswiger@mac.com> To: marcov@stack.nl (Marco van de Voort) Cc: freebsd-ports@freebsd.org Subject: Re: How to determine which pthread, was: Re: last libc_rdependenciesleft on current Message-ID: <51E262FE-5CC4-11D8-A5C2-003065ABFD92@mac.com> In-Reply-To: <20040211151107.9CD75172@toad.stack.nl> References: <20040211151107.9CD75172@toad.stack.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 11, 2004, at 10:11 AM, Marco van de Voort wrote: > What does the -D_THREAD_SAFE mean? (I mean does it mean that libc isn't > thread safe, that it is thread_safe etc etc, or does it interact with > the > C code that is being compiled (the port)) libc generally isn't thread safe. libc_r (or libpthread, or whatever the end result of the current shakeup will be called), is thread-safe. The reason for that define is so that the C code you're working on (or building via a port) can do different things depending on whether it will be single-threaded or whether it needs to be thread-safe. For example, your code might allocate and use mutexes if -D_THREAD_SAFE is defined... -- -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51E262FE-5CC4-11D8-A5C2-003065ABFD92>