re-entrant libraries - is C deficient?

Donald Yuniskis akcs.dgy at vpnet.chi.il.us
Fri Oct 5 19:55:04 AEST 1990


>Back to the original point - the C library is definitely deficient when it
>comes to being re-entrant. The standard AT&T and/or Berkely source is chock
>full of global variables being used to pass junk around between internal
>static routines, etc. This becomes a real drag when you try to implement
>threads. The C library needs lots of work before it can be used safely from
>multiple threads of control...

Having just re-invented most of the standard libraries (string, math, stdio,
etc) from scratch for a project, I can heartily confirm this observation.  A
simple examination of the man pages for each function (with a _little_ bit
of thought) should point out most of the routines at risk.  Don't even
_THINK_ of using a "store bought" library if you're developing in a
multi-threaded environment!



More information about the Comp.lang.c mailing list