• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is errno thread-safe?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Is errno thread-safe?
      • From: Malte Tancred <email@hidden>
References: 
 >Is errno thread-safe? (From: Malte Tancred <email@hidden>)

  • Prev by Date: Re: Is it * or **?
  • Next by Date: Re: Is errno thread-safe?
  • Previous by thread: Is errno thread-safe?
  • Next by thread: Re: Is errno thread-safe?
  • Index(es):
    • Date
    • Thread