A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1462.htm below:

errno and threads

Document: WG14 N1462


Submitter: Fred J. Tydeman (USA)
Submission Date: 2010-05-10
Related documents: N1416, N1427
Subject: errno at thread create

Proposal:

Add a new paragraph to 7.5 Errors <errno.h>

There is a distinct errno per thread and use of errno in an expression refers to the errno associated with the thread evaluating the expression. The initial state for a thread's errno (other than for main()) is an indeterminate value.

Add to the Rationale section on errno:

Having one global errno would result in confusion as library routines in multiple threads could be altering it at the "same" time to indicate different errors. Therefore, each thread has its own errno.

Some, but not all, existing implementations have errno be part of thread local storage.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4