Re: Is errno thread-safe?
Re: Is errno thread-safe?
- Subject: Re: Is errno thread-safe?
- From: Andrew Pinski <email@hidden>
- Date: Thu, 7 Mar 2002 12:07:41 -0500
Yes!!!
On Thursday, March 7, 2002, at 03:50 , Malte Tancred wrote:
Hi all!
I found the following in <sys/errno.h>:
#if !defined(KERNEL) && !defined(KERNEL_PRIVATE)
#include <sys/cdefs.h>
__BEGIN_DECLS
extern int * __error __P((void));
#define errno (*__error())
__END_DECLS
#endif
Does this mean errno is thread-safe?
For example, encountering an error when reading on a socket in a
separate thread, I can safely assume that errno is set appropriately
and not reset by another system call in the main thread?
Thanks,
Malte
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.