Hi, Are all functions in MicroLib non-reentrant? If some of the functions are reentrant, can we refer to the table in 4.59 Thread-safe C library functions? www.keil.com/.../armlib_chr1359122864458.htm
I think it applies to "The C and C++ Library Functions reference", but I'm not sure if it also apply to MicroLib.
Thanks.
My guess is some are thread safe, but not on purpose. It is highly likely that the ones listed in 4.59 are the ones that ARE NOT thread safe. There is extra work and code size and memory space required to make those functions thread safe. MicroLib "takes advantage" of the fact that it does not need to be thread safe and does not do the extra work, add the code size or the memory space required to make them thread safe.
Hello,
You can read more about what is not included in Microlib here:
www.keil.com/.../armlib_chr1358938938946.htm
"Microlib has no reentrant variant. Microlib does not provide mutex locks to guard against code that is not thread safe"
Hi, For example, memcmp() and memcpy() are thread-safe in "Table 4-1 Functions that are thread-safe". Can I say that memcmp() and memcpy() are NOT guaranteed thread-safe in MicroLIB?
Yes.
Hi Robert and Kevin, Thanks for your reply.