T
Tomás Ó hÉilidhe
As far as I know, the C Standard has no mention of multi-threaded
programming; it has no mention of how to achieve multi-threaded
programming, nor does it mention whether the language or its libraries
are suitable for multi-threaded programming.
For people who are fond of portable C programming, what's the best way
to go about multi-threaded programming?
I've been reading up on POSIX threads a little, they seem pretty
ubiquitous. Would this be the best way to go?
One issue I've seen raised is about the "thread safety" of functions
in the Standard C library. Would it be fair to assume, on systems
where POSIX threads is implemented, that the Standard C library will
be thread-safe? Or is there a well-known way of asking the compiler to
ensure this, for example by defining the preprocessor directive
_REENTRANT?
I'm basically looking for the most portable way possible to write a
multi-threaded application.
programming; it has no mention of how to achieve multi-threaded
programming, nor does it mention whether the language or its libraries
are suitable for multi-threaded programming.
For people who are fond of portable C programming, what's the best way
to go about multi-threaded programming?
I've been reading up on POSIX threads a little, they seem pretty
ubiquitous. Would this be the best way to go?
One issue I've seen raised is about the "thread safety" of functions
in the Standard C library. Would it be fair to assume, on systems
where POSIX threads is implemented, that the Standard C library will
be thread-safe? Or is there a well-known way of asking the compiler to
ensure this, for example by defining the preprocessor directive
_REENTRANT?
I'm basically looking for the most portable way possible to write a
multi-threaded application.