ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahw_5.4.0.1/rzahwcesco.htm

90 lines
5.2 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="Thread-private data and thread-specific data" />
<meta name="abstract" content="Threads cannot share certain resources. Data that threads cannot share between themselves are called thread-private data." />
<meta name="description" content="Threads cannot share certain resources. Data that threads cannot share between themselves are called thread-private data." />
<meta name="DC.Relation" scheme="URI" content="rzahwas4co.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzahwces-cesco" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Thread-private data and thread-specific data</title>
</head>
<body id="rzahwces-cesco"><a name="rzahwces-cesco"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Thread-private data and thread-specific data</h1>
<div><p>Threads cannot share certain resources. Data that threads cannot
share between themselves are called thread-private data.</p>
<div class="section"><div class="p">The operating system defines this thread-private data. <span class="keyword">i5/OS™</span> defines the following resources
as thread-private data: <ul><li>Thread identifier:<p>The unique integral number that can be used to identify
the thread.</p>
</li>
<li>Priority:<p><span class="keyword">i5/OS</span> allows
specification of a thread priority, which determines the relative importance
of one thread to other threads in the job. The thread priority is defined
to be a delta value to the job's priority. <span class="keyword">i5/OS</span> adds
the thread's priority to the job's priority. It can never exceed the job's
priority. If you adjust the job's priority, the thread's priority is adjusted
relative to the new job priority. The default thread priority value is zero.
This results in a thread that has the same priority as the job. </p>
</li>
<li>Security information:<p>Security information, including user and group
profiles, is maintained on a per thread basis. When a thread creates a new
thread, the new thread inherits the security information from the thread that
created it.</p>
</li>
<li>Library list:<p>Library list information, including user and group profiles,
is maintained on a per thread basis. When a thread create a new thread, the
new thread inherits the library list information from the thread that created
it.</p>
</li>
<li>Signal blocking mask:<p>The signal blocking mask identifies the set of
asynchronous signals to be blocked from delivery to the thread. When a thread
creates a new thread, the new thread inherits the signal blocking mask of
the thread that created it. </p>
</li>
<li>Call stack:<p>The call stack contains data about the program flow or procedure
call flow in a thread. The stack, along with automatic storage, is allocated
for each thread created.</p>
</li>
<li>Automatic storage:<p>Automatic storage is for variables that are local
to the function. </p>
</li>
<li>errno variable:<p>The program variable that is used to return the result
of a C or POSIX system call. errno is a function call that returns the most
recent result for a function call in the thread.</p>
</li>
</ul>
</div>
<p>Threads can have their own view of data items called thread-specific
data. Thread-specific data is different from thread-private data. The threads
implementation defines the thread-private data, while the application defines
the thread-specific data. Threads do not share thread-specific storage (it
is specific to a thread), but all functions within that thread can access
it. Typically, a key indexes thread-specific storage. The key
is a global value that is visible to all threads. It is used to retrieve the
thread-specific value of the storage associated with that key.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzahwas4co.htm" title="All programs have at least one thread, referred to as the initial thread. In a program with multiple threads, each thread runs its code independently of the other threads in the program.">Threads on i5/OS</a></div>
</div>
</div>
</body>
</html>