Iso/Iec 14882:1998 Edits For Thread-Local Storage - Red Hat ENTERPRISE LINUX 4 Manual

Hide thumbs Also See for ENTERPRISE LINUX 4:
Table of Contents

Advertisement

252
[6.2.4 Storage durations of objects]
Add new text before paragraph 3
An object whose identifier is declared with the storage-class specifier
duration. Its lifetime is the entire execution of the thread, and its stored value is initialized only once,
prior to thread startup.
[6.4.1 Keywords]
Add
.
__thread
[6.7.1 Storage-class specifiers]
Add
to the list of storage class specifiers in paragraph 1.
__thread
Change paragraph 2 to
With the exception of
specifier may be used alone, or immediately following
Add new text after paragraph 6
The declaration of an identifier for a variable that has block scope that specifies
specify either
extern
The
specifier shall be used only with variables.
__thread

6.49.2. ISO/IEC 14882:1998 Edits for Thread-Local Storage

The following are a set of changes to ISO/IEC 14882:1998 (aka C++98) that document the exact
semantics of the language extension.
[intro.execution]
New text after paragraph 4
A thread is a flow of control within the abstract machine. It is implementation defined whether or not
there may be more than one thread.
New text after paragraph 7
It is unspecified whether additional action must be taken to ensure when and whether side effects are
visible to other threads.
[lex.key]
Add
.
__thread
[basic.start.main]
Add after paragraph 5
The thread that begins execution at the
defined how functions beginning threads other than the main thread are designated or typed. A function
so designated, as well as the
defined what happens if a thread startup function returns. It is implementation defined what happens to
other threads when any thread calls
[basic.start.init]
Add after paragraph 4
The storage for an object of thread storage duration shall be statically initialized before the first statement
of the thread startup function. An object of thread storage duration shall not require dynamic initializa-
tion.
, at most one storage-class specifier may be given [. . . ]. The
__thread
or
.
static
main
function, is called a thread startup function. It is implementation
main
.
exit
Chapter 6. Extensions to the C Language Family
or
extern
static
function is called the main thread. It is implementation
has thread storage
__thread
__thread
.
shall also
__thread

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 4 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents