From: Boyapati, A. <Ani...@at...> - 2010-03-16 08:40:45
|
( Communication for archival) -----Original Message----- From: Boyapati, Anitha Sent: Thursday, March 11, 2010 2:04 PM To: Kaushik, Praveen_Kumar; Gupta, Usha Cc: Praveen, Vidhya; Singh, Abnikant Subject: RE: Structure of error numbers > In avr-libc, an integer variable is taken in errno.h and sets it > whereas in NewLib a reentrant structure is taken which is having an > integer variable for error number. How do we have to do in avr32-libc? > Including a global variable as required by ANSI C is a much simpler way of implementing error handling. However, when it comes to avr32-libc, I recommend making errno reentrant. I took a quick glance at newlib sources. Making errno reentrant avoids undefined behavior during racing conditions. FYI- Several multi-threaded applications are built and run on AVR32 (mostly UC3A) with/without linux OS support. Thread-safe implementation of avr32-libc is highly recommended wherever applied (just not limited to error handling case) Anitha |