This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

_REENT_ONLY question


Hello.

Please, can anybody explain me why _REENT_ONLY macro is needed? For what? Why some functions have on implementation and another have pair with _r postfix, e.g. setlocale() and _setlocale_r(), etc. Several functions have no such pair, e.g. ldiv(). And in all cases (that I've seen) usual functions call _r pair adding _REENT argument. For example 'setlocale(category, locale)' just calls '_setlocale_r(p, category, locale), where p is 'struct _reent'. I can only guess that this is needed if external (not usual Newlib) "multiprocess support subsystem" is used...

Can anybody explain this and give me some examples when "_r" pairs are really useful/needed?

--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]