Is errno thread-safe?
Is errno thread-safe?
- Subject: Is errno thread-safe?
- From: Malte Tancred <email@hidden>
- Date: Thu, 7 Mar 2002 09:50:49 +0100
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.