add directory study
This commit is contained in:
154
study/Ref-docs/POSIX/susv3/basedefs/sys/ipc.h.html
Normal file
154
study/Ref-docs/POSIX/susv3/basedefs/sys/ipc.h.html
Normal file
@@ -0,0 +1,154 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/ipc.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/ipc.h>"></a> <a name="tag_13_54"></a><!-- <sys/ipc.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_54_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/ipc.h - XSI interprocess communication access structure</blockquote>
|
||||
|
||||
<h4><a name="tag_13_54_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<div class="box"><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt=
|
||||
"[Option Start]" border="0"> #include <sys/ipc.h> <img src="../../images/opt-end.gif" alt="[Option End]" border=
|
||||
"0"></tt></div>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_54_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/ipc.h></i> header is used by three mechanisms for XSI interprocess communication (IPC): messages, semaphores,
|
||||
and shared memory. All use a common structure type, <b>ipc_perm</b>, to pass information used in determining permission to perform
|
||||
an IPC operation.</p>
|
||||
|
||||
<p>The <b>ipc_perm</b> structure shall contain the following members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>uid_t uid </tt> Owner's user ID. <tt>
|
||||
gid_t gid </tt> Owner's group ID. <tt>
|
||||
uid_t cuid </tt> Creator's user ID. <tt>
|
||||
gid_t cgid </tt> Creator's group ID. <tt>
|
||||
mode_t mode </tt> Read/write permission. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>uid_t</b>, <b>gid_t</b>, <b>mode_t</b>, and <b>key_t</b> types shall be defined as described in <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> .</p>
|
||||
|
||||
<p>Definitions shall be provided for the following constants:</p>
|
||||
|
||||
<p>Mode bits:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>IPC_CREAT</dt>
|
||||
|
||||
<dd>Create entry if key does not exist.</dd>
|
||||
|
||||
<dt>IPC_EXCL</dt>
|
||||
|
||||
<dd>Fail if key exists.</dd>
|
||||
|
||||
<dt>IPC_NOWAIT</dt>
|
||||
|
||||
<dd>Error if request must wait.</dd>
|
||||
</dl>
|
||||
|
||||
<p>Keys:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>IPC_PRIVATE</dt>
|
||||
|
||||
<dd>Private key.</dd>
|
||||
</dl>
|
||||
|
||||
<p>Control commands:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>IPC_RMID</dt>
|
||||
|
||||
<dd>Remove identifier.</dd>
|
||||
|
||||
<dt>IPC_SET</dt>
|
||||
|
||||
<dd>Set options.</dd>
|
||||
|
||||
<dt>IPC_STAT</dt>
|
||||
|
||||
<dd>Get options.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The following shall be declared as a function and may also be defined as a macro. A function prototype shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt>key_t ftok(const char *, int);
|
||||
</tt>
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_54_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_54_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_54_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_54_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> , the System Interfaces volume of
|
||||
IEEE Std 1003.1-2001, <a href="../../functions/ftok.html"><i>ftok</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_54_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 2. Derived from System V Release 2.0.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
18
study/Ref-docs/POSIX/susv3/basedefs/sys/list
Normal file
18
study/Ref-docs/POSIX/susv3/basedefs/sys/list
Normal file
@@ -0,0 +1,18 @@
|
||||
ipc.h
|
||||
mman.h
|
||||
msg.h
|
||||
resource.h
|
||||
select.h
|
||||
sem.h
|
||||
shm.h
|
||||
socket.h
|
||||
stat.h
|
||||
statvfs.h
|
||||
time.h
|
||||
timeb.h
|
||||
times.h
|
||||
types.h
|
||||
uio.h
|
||||
un.h
|
||||
utsname.h
|
||||
wait.h
|
||||
374
study/Ref-docs/POSIX/susv3/basedefs/sys/mman.h.html
Normal file
374
study/Ref-docs/POSIX/susv3/basedefs/sys/mman.h.html
Normal file
@@ -0,0 +1,374 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/mman.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/mman.h>"></a> <a name="tag_13_55"></a><!-- <sys/mman.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_55_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/mman.h - memory management declarations</blockquote>
|
||||
|
||||
<h4><a name="tag_13_55_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<p><tt>#include <sys/mman.h></tt></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_55_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/mman.h></i> header shall be supported if the implementation supports at least one of the following
|
||||
options:</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p><sup>[<a href="javascript:open_code('MF')">MF</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
The Memory Mapped Files option <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p><sup>[<a href="javascript:open_code('SHM')">SHM</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> The Shared Memory Objects option <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p><sup>[<a href="javascript:open_code('ML')">ML</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
The Process Memory Locking option <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p><sup>[<a href="javascript:open_code('MPR')">MPR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> The Memory Protection option <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p><sup>[<a href="javascript:open_code('TYM')">TYM</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> The Typed Memory Objects option <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p><sup>[<a href="javascript:open_code('SIO')">SIO</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> The Synchronized Input and Output option <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p><sup>[<a href="javascript:open_code('ADV')">ADV</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> The Advisory Information option <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p><sup>[<a href="javascript:open_code('TYM')">TYM</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> The Typed Memory Objects option <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p><sup>[<a href="javascript:open_code('MC2')">MC2</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> If one or more of the Advisory Information, Memory Mapped Files, or Shared Memory Objects options are supported, the following
|
||||
protection options shall be defined: <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
||||
|
||||
<dl compact>
|
||||
<dt>PROT_READ</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('MC2')">MC2</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Page can be read. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt>PROT_WRITE</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('MC2')">MC2</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Page can be written. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt>PROT_EXEC</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('MC2')">MC2</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Page can be executed. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt>PROT_NONE</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('MC2')">MC2</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Page cannot be accessed. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
</dl>
|
||||
|
||||
<p>The following <i>flag</i> options shall be defined:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>MAP_SHARED</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('MF')">MF|SHM</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Share changes. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt>MAP_PRIVATE</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('MF')">MF|SHM</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Changes are private. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt>MAP_FIXED</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('MF')">MF|SHM</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Interpret <i>addr</i> exactly. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
</dl>
|
||||
|
||||
<p>The following flags shall be defined for <a href="../../functions/msync.html"><i>msync</i>()</a>:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>MS_ASYNC</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('MF')">MF|SIO</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Perform asynchronous writes. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt>MS_SYNC</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('MF')">MF|SIO</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Perform synchronous writes. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt>MS_INVALIDATE</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('MF')">MF|SIO</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Invalidate mappings. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
</dl>
|
||||
|
||||
<p><sup>[<a href="javascript:open_code('ML')">ML</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
The following symbolic constants shall be defined for the <a href="../../functions/mlockall.html"><i>mlockall</i>()</a> function:
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
||||
|
||||
<dl compact>
|
||||
<dt>MCL_CURRENT</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('ML')">ML</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
Lock currently mapped pages. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt>MCL_FUTURE</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('ML')">ML</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
Lock pages that become mapped. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
</dl>
|
||||
|
||||
<p><sup>[<a href="javascript:open_code('MF')">MF|SHM</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> The symbolic constant MAP_FAILED shall be defined to indicate a failure from the <a href=
|
||||
"../../functions/mmap.html"><i>mmap</i>()</a> function. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
||||
|
||||
<p><sup>[<a href="javascript:open_code('MC1')">MC1</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> If the Advisory Information and either the Memory Mapped Files or Shared Memory Objects options are supported, values for
|
||||
<i>advice</i> used by <a href="../../functions/posix_madvise.html"><i>posix_madvise</i>()</a> shall be defined as follows:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>POSIX_MADV_NORMAL</dt>
|
||||
|
||||
<dd><br>
|
||||
The application has no advice to give on its behavior with respect to the specified range. It is the default characteristic if no
|
||||
advice is given for a range of memory.</dd>
|
||||
|
||||
<dt>POSIX_MADV_SEQUENTIAL</dt>
|
||||
|
||||
<dd><br>
|
||||
The application expects to access the specified range sequentially from lower addresses to higher addresses.</dd>
|
||||
|
||||
<dt>POSIX_MADV_RANDOM</dt>
|
||||
|
||||
<dd><br>
|
||||
The application expects to access the specified range in a random order.</dd>
|
||||
|
||||
<dt>POSIX_MADV_WILLNEED</dt>
|
||||
|
||||
<dd><br>
|
||||
The application expects to access the specified range in the near future.</dd>
|
||||
|
||||
<dt>POSIX_MADV_DONTNEED</dt>
|
||||
|
||||
<dd><br>
|
||||
The application expects that it will not access the specified range in the near future.</dd>
|
||||
</dl>
|
||||
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
|
||||
<p><sup>[<a href="javascript:open_code('TYM')">TYM</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> The following flags shall be defined for <a href=
|
||||
"../../functions/posix_typed_mem_open.html"><i>posix_typed_mem_open</i>()</a>:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>POSIX_TYPED_MEM_ALLOCATE</dt>
|
||||
|
||||
<dd><br>
|
||||
Allocate on <a href="../../functions/mmap.html"><i>mmap</i>()</a>.</dd>
|
||||
|
||||
<dt>POSIX_TYPED_MEM_ALLOCATE_CONTIG</dt>
|
||||
|
||||
<dd><br>
|
||||
Allocate contiguously on <a href="../../functions/mmap.html"><i>mmap</i>()</a>.</dd>
|
||||
|
||||
<dt>POSIX_TYPED_MEM_MAP_ALLOCATABLE</dt>
|
||||
|
||||
<dd><br>
|
||||
Map on <a href="../../functions/mmap.html"><i>mmap</i>()</a>, without affecting allocatability.</dd>
|
||||
</dl>
|
||||
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
|
||||
<p>The <b>mode_t</b>, <b>off_t</b>, and <b>size_t</b> types shall be defined as described in <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> .</p>
|
||||
|
||||
<p><sup>[<a href="javascript:open_code('TYM')">TYM</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> The <i><sys/mman.h></i> header shall define the structure <b>posix_typed_mem_info</b>, which includes at least the
|
||||
following member:</p>
|
||||
|
||||
<pre>
|
||||
<tt>size_t posix_tmi_length </tt> Maximum length which may be allocated <tt>
|
||||
</tt> from a typed memory object. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
|
||||
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt><sup>[<a href="javascript:open_code('ML')">ML</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
int mlock(const void *, size_t);
|
||||
int mlockall(int);
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
<sup>[<a href="javascript:open_code('MF')">MF|SHM</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
void *mmap(void *, size_t, int, int, int, off_t);
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
<sup>[<a href="javascript:open_code('MPR')">MPR</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
int mprotect(void *, size_t, int);
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
<sup>[<a href="javascript:open_code('MF')">MF|SIO</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
int msync(void *, size_t, int);
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
<sup>[<a href="javascript:open_code('ML')">ML</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
int munlock(const void *, size_t);
|
||||
int munlockall(void);
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
<sup>[<a href="javascript:open_code('MF')">MF|SHM</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
int munmap(void *, size_t);
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
<sup>[<a href="javascript:open_code('ADV')">ADV</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
int posix_madvise(void *, size_t, int);
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
<sup>[<a href="javascript:open_code('TYM')">TYM</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
int posix_mem_offset(const void *restrict, size_t, off_t *restrict,
|
||||
size_t *restrict, int *restrict);
|
||||
int posix_typed_mem_get_info(int, struct posix_typed_mem_info *);
|
||||
int posix_typed_mem_open(const char *, int, int);
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
<sup>[<a href="javascript:open_code('SHM')">SHM</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
int shm_open(const char *, int, mode_t);
|
||||
int shm_unlink(const char *);
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
</tt>
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_55_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_55_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_55_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_55_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> , the System Interfaces volume of
|
||||
IEEE Std 1003.1-2001, <a href="../../functions/mlock.html"><i>mlock</i>()</a>, <a href=
|
||||
"../../functions/mlockall.html"><i>mlockall</i>()</a>, <a href="../../functions/mmap.html"><i>mmap</i>()</a>, <a href=
|
||||
"../../functions/mprotect.html"><i>mprotect</i>()</a>, <a href="../../functions/msync.html"><i>msync</i>()</a>, <a href=
|
||||
"../../functions/munlock.html"><i>munlock</i>()</a>, <a href="../../functions/munlockall.html"><i>munlockall</i>()</a>, <a href=
|
||||
"../../functions/munmap.html"><i>munmap</i>()</a>, <a href="../../functions/posix_mem_offset.html"><i>posix_mem_offset</i>()</a>,
|
||||
<a href="../../functions/posix_typed_mem_get_info.html"><i>posix_typed_mem_get_info</i>()</a>, <a href=
|
||||
"../../functions/posix_typed_mem_open.html"><i>posix_typed_mem_open</i>()</a>, <a href=
|
||||
"../../functions/shm_open.html"><i>shm_open</i>()</a>, <a href="../../functions/shm_unlink.html"><i>shm_unlink</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_55_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 4, Version 2.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_55_09"></a>Issue 5</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>Updated for alignment with the POSIX Realtime Extension.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_55_10"></a>Issue 6</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/mman.h></i> header is marked as dependent on support for either the Memory Mapped Files, Process Memory
|
||||
Locking, or Shared Memory Objects options.</p>
|
||||
|
||||
<p>The following changes are made for alignment with IEEE Std 1003.1j-2000:</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p>The TYM margin code is added to the list of margin codes for the <i><sys/mman.h></i> header line, as well as for other
|
||||
lines.</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p>The POSIX_TYPED_MEM_ALLOCATE, POSIX_TYPED_MEM_ALLOCATE_CONTIG, and POSIX_TYPED_MEM_MAP_ALLOCATABLE flags are added.</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p>The <b>posix_tmi_length</b> structure is added.</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p>The <a href="../../functions/posix_mem_offset.html"><i>posix_mem_offset</i>()</a>, <a href=
|
||||
"../../functions/posix_typed_mem_get_info.html"><i>posix_typed_mem_get_info</i>()</a>, and <a href=
|
||||
"../../functions/posix_typed_mem_open.html"><i>posix_typed_mem_open</i>()</a> functions are added.</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>The <b>restrict</b> keyword is added to the prototype for <a href=
|
||||
"../../functions/posix_mem_offset.html"><i>posix_mem_offset</i>()</a>.</p>
|
||||
|
||||
<p>IEEE PASC Interpretation 1003.1 #102 is applied, adding the prototype for <a href=
|
||||
"../../functions/posix_madvise.html"><i>posix_madvise</i>()</a>.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
145
study/Ref-docs/POSIX/susv3/basedefs/sys/msg.h.html
Normal file
145
study/Ref-docs/POSIX/susv3/basedefs/sys/msg.h.html
Normal file
@@ -0,0 +1,145 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/msg.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/msg.h>"></a> <a name="tag_13_56"></a><!-- <sys/msg.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_56_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/msg.h - XSI message queue structures</blockquote>
|
||||
|
||||
<h4><a name="tag_13_56_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<div class="box"><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt=
|
||||
"[Option Start]" border="0"> #include <sys/msg.h> <img src="../../images/opt-end.gif" alt="[Option End]" border=
|
||||
"0"></tt></div>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_56_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/msg.h></i> header shall define the following data types through <b>typedef</b>:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt><b>msgqnum_t</b></dt>
|
||||
|
||||
<dd>Used for the number of messages in the message queue.</dd>
|
||||
|
||||
<dt><b>msglen_t</b></dt>
|
||||
|
||||
<dd>Used for the number of bytes allowed in a message queue.</dd>
|
||||
</dl>
|
||||
|
||||
<p>These types shall be unsigned integer types that are able to store values at least as large as a type <b>unsigned short</b>.</p>
|
||||
|
||||
<p>The <i><sys/msg.h></i> header shall define the following constant as a message operation flag:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>MSG_NOERROR</dt>
|
||||
|
||||
<dd>No error if big message.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <b>msqid_ds</b> structure shall contain the following members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>struct ipc_perm msg_perm </tt> Operation permission structure. <tt>
|
||||
msgqnum_t msg_qnum </tt> Number of messages currently on queue. <tt>
|
||||
msglen_t msg_qbytes</tt> Maximum number of bytes allowed on queue. <tt>
|
||||
pid_t msg_lspid </tt> Process ID of last <i>msgsnd</i>
|
||||
(). <tt>
|
||||
pid_t msg_lrpid </tt> Process ID of last <i>msgrcv</i>
|
||||
(). <tt>
|
||||
time_t msg_stime </tt> Time of last <i>msgsnd</i>
|
||||
(). <tt>
|
||||
time_t msg_rtime </tt> Time of last <i>msgrcv</i>
|
||||
(). <tt>
|
||||
time_t msg_ctime </tt> Time of last change. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>pid_t</b>, <b>time_t</b>, <b>key_t</b>, <b>size_t</b>, and <b>ssize_t</b> types shall be defined as described in <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> .</p>
|
||||
|
||||
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt>int msgctl(int, int, struct msqid_ds *);
|
||||
int msgget(key_t, int);
|
||||
ssize_t msgrcv(int, void *, size_t, long, int);
|
||||
int msgsnd(int, const void *, size_t, int);
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>In addition, all of the symbols from <a href="../../basedefs/sys/ipc.h.html"><i><sys/ipc.h></i></a> shall be defined when
|
||||
this header is included.</p>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_56_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_56_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_56_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_56_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../sys/ipc.h.html#tag_13_54"><i><sys/ipc.h></i></a> , <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> , <a href="../../functions/msgctl.html"><i>msgctl</i>()</a>, <a
|
||||
href="../../functions/msgget.html"><i>msgget</i>()</a>, <a href="../../functions/msgrcv.html"><i>msgrcv</i>()</a>, <a href=
|
||||
"../../functions/msgsnd.html"><i>msgsnd</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_56_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 2. Derived from System V Release 2.0.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
224
study/Ref-docs/POSIX/susv3/basedefs/sys/resource.h.html
Normal file
224
study/Ref-docs/POSIX/susv3/basedefs/sys/resource.h.html
Normal file
@@ -0,0 +1,224 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/resource.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/resource.h>"></a> <a name="tag_13_57"></a><!-- <sys/resource.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_57_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/resource.h - definitions for XSI resource operations</blockquote>
|
||||
|
||||
<h4><a name="tag_13_57_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<div class="box"><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt=
|
||||
"[Option Start]" border="0"> #include <sys/resource.h> <img src="../../images/opt-end.gif" alt="[Option End]" border=
|
||||
"0"></tt></div>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_57_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/resource.h></i> header shall define the following symbolic constants as possible values of the <i>which</i>
|
||||
argument of <a href="../../functions/getpriority.html"><i>getpriority</i>()</a> and <a href=
|
||||
"../../functions/setpriority.html"><i>setpriority</i>()</a>:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>PRIO_PROCESS</dt>
|
||||
|
||||
<dd>Identifies the <i>who</i> argument as a process ID.</dd>
|
||||
|
||||
<dt>PRIO_PGRP</dt>
|
||||
|
||||
<dd>Identifies the <i>who</i> argument as a process group ID.</dd>
|
||||
|
||||
<dt>PRIO_USER</dt>
|
||||
|
||||
<dd>Identifies the <i>who</i> argument as a user ID.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The following type shall be defined through <b>typedef</b>:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt><b>rlim_t</b></dt>
|
||||
|
||||
<dd>Unsigned integer type used for limit values.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The following symbolic constants shall be defined:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>RLIM_INFINITY</dt>
|
||||
|
||||
<dd>A value of <b>rlim_t</b> indicating no limit.</dd>
|
||||
|
||||
<dt>RLIM_SAVED_MAX</dt>
|
||||
|
||||
<dd>A value of type <b>rlim_t</b> indicating an unrepresentable saved hard limit.</dd>
|
||||
|
||||
<dt>RLIM_SAVED_CUR</dt>
|
||||
|
||||
<dd>A value of type <b>rlim_t</b> indicating an unrepresentable saved soft limit.</dd>
|
||||
</dl>
|
||||
|
||||
<p>On implementations where all resource limits are representable in an object of type <b>rlim_t</b>, RLIM_SAVED_MAX and
|
||||
RLIM_SAVED_CUR need not be distinct from RLIM_INFINITY.</p>
|
||||
|
||||
<p>The following symbolic constants shall be defined as possible values of the <i>who</i> parameter of <a href=
|
||||
"../../functions/getrusage.html"><i>getrusage</i>()</a>:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>RUSAGE_SELF</dt>
|
||||
|
||||
<dd>Returns information about the current process.</dd>
|
||||
|
||||
<dt>RUSAGE_CHILDREN</dt>
|
||||
|
||||
<dd>Returns information about children of the current process.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <i><sys/resource.h></i> header shall define the <b>rlimit</b> structure that includes at least the following
|
||||
members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>rlim_t rlim_cur </tt> The current (soft) limit. <tt>
|
||||
rlim_t rlim_max </tt> The hard limit. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <i><sys/resource.h></i> header shall define the <b>rusage</b> structure that includes at least the following
|
||||
members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>struct timeval ru_utime </tt> User time used. <tt>
|
||||
struct timeval ru_stime </tt> System time used. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>timeval</b> structure shall be defined as described in <a href=
|
||||
"../sys/time.h.html#tag_13_64"><i><sys/time.h></i></a> .</p>
|
||||
|
||||
<p>The following symbolic constants shall be defined as possible values for the <i>resource</i> argument of <a href=
|
||||
"../../functions/getrlimit.html"><i>getrlimit</i>()</a> and <a href="../../functions/setrlimit.html"><i>setrlimit</i>()</a>:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>RLIMIT_CORE</dt>
|
||||
|
||||
<dd>Limit on size of <b>core</b> file.</dd>
|
||||
|
||||
<dt>RLIMIT_CPU</dt>
|
||||
|
||||
<dd>Limit on CPU time per process.</dd>
|
||||
|
||||
<dt>RLIMIT_DATA</dt>
|
||||
|
||||
<dd>Limit on data segment size.</dd>
|
||||
|
||||
<dt>RLIMIT_FSIZE</dt>
|
||||
|
||||
<dd>Limit on file size.</dd>
|
||||
|
||||
<dt>RLIMIT_NOFILE</dt>
|
||||
|
||||
<dd>Limit on number of open files.</dd>
|
||||
|
||||
<dt>RLIMIT_STACK</dt>
|
||||
|
||||
<dd>Limit on stack size.</dd>
|
||||
|
||||
<dt>RLIMIT_AS</dt>
|
||||
|
||||
<dd>Limit on address space size.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt>int getpriority(int, id_t);
|
||||
int getrlimit(int, struct rlimit *);
|
||||
int getrusage(int, struct rusage *);
|
||||
int setpriority(int, id_t, int);
|
||||
int setrlimit(int, const struct rlimit *);
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>id_t</b> type shall be defined through <b>typedef</b> as described in <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> .</p>
|
||||
|
||||
<p>Inclusion of the <i><sys/resource.h></i> header may also make visible all symbols from <a href=
|
||||
"../../basedefs/sys/time.h.html"><i><sys/time.h></i></a>.</p>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_57_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_57_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_57_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_57_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../sys/time.h.html#tag_13_64"><i><sys/time.h></i></a> , <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> , the System Interfaces volume of IEEE Std 1003.1-2001, <a
|
||||
href="../../functions/getpriority.html"><i>getpriority</i>()</a>, <a href="../../functions/getrusage.html"><i>getrusage</i>()</a>,
|
||||
<a href="../../functions/getrlimit.html"><i>getrlimit</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_57_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 4, Version 2.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_57_09"></a>Issue 5</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>Large File System extensions are added.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
159
study/Ref-docs/POSIX/susv3/basedefs/sys/select.h.html
Normal file
159
study/Ref-docs/POSIX/susv3/basedefs/sys/select.h.html
Normal file
@@ -0,0 +1,159 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/select.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/select.h>"></a> <a name="tag_13_58"></a><!-- <sys/select.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_58_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/select.h - select types</blockquote>
|
||||
|
||||
<h4><a name="tag_13_58_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<p><tt>#include <sys/select.h></tt></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_58_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/select.h></i> header shall define the <b>timeval</b> structure that includes at least the following
|
||||
members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>time_t tv_sec </tt> Seconds. <tt>
|
||||
suseconds_t tv_usec </tt> Microseconds. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>time_t</b> and <b>suseconds_t</b> types shall be defined as described in <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> .</p>
|
||||
|
||||
<p>The <b>sigset_t</b> type shall be defined as described in <a href="../signal.h.html#"><i><signal.h></i></a> .</p>
|
||||
|
||||
<p>The <b>timespec</b> structure shall be defined as described in <a href="time.h.html"><i><time.h></i></a> .</p>
|
||||
|
||||
<p>The <i><sys/select.h></i> header shall define the <b>fd_set</b> type as a structure.</p>
|
||||
|
||||
<p>Each of the following may be declared as a function, or defined as a macro, or both:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt><b>void</b> <i>FD_CLR</i>(<b>int</b> <i>fd</i>, <b>fd_set *</b><i>fdset</i>)</dt>
|
||||
|
||||
<dd><br>
|
||||
Clears the bit for the file descriptor <i>fd</i> in the file descriptor set <i>fdset</i>.</dd>
|
||||
|
||||
<dt><b>int</b> <i>FD_ISSET</i>(<b>int</b> <i>fd</i>, <b>fd_set *</b><i>fdset</i>)</dt>
|
||||
|
||||
<dd><br>
|
||||
Returns a non-zero value if the bit for the file descriptor <i>fd</i> is set in the file descriptor set by <i>fdset</i>, and 0
|
||||
otherwise.</dd>
|
||||
|
||||
<dt><b>void</b> <i>FD_SET</i>(<b>int</b> <i>fd</i>, <b>fd_set *</b><i>fdset</i>)</dt>
|
||||
|
||||
<dd><br>
|
||||
Sets the bit for the file descriptor <i>fd</i> in the file descriptor set <i>fdset</i>.</dd>
|
||||
|
||||
<dt><b>void</b> <i>FD_ZERO</i>(<b>fd_set *</b><i>fdset</i>)</dt>
|
||||
|
||||
<dd><br>
|
||||
Initializes the file descriptor set <i>fdset</i> to have zero bits for all file descriptors.</dd>
|
||||
</dl>
|
||||
|
||||
<p>If implemented as macros, these may evaluate their arguments more than once, so applications should ensure that the arguments
|
||||
they supply are never expressions with side effects.</p>
|
||||
|
||||
<p>The following shall be defined as a macro:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>FD_SETSIZE</dt>
|
||||
|
||||
<dd><br>
|
||||
Maximum number of file descriptors in an <b>fd_set</b> structure.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt>int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
|
||||
const struct timespec *restrict, const sigset_t *restrict);
|
||||
int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
|
||||
struct timeval *restrict);
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>Inclusion of the <i><sys/select.h></i> header may make visible all symbols from the headers <a href=
|
||||
"../../basedefs/signal.h.html"><i><signal.h></i></a>, <a href="../../basedefs/sys/time.h.html"><i><sys/time.h></i></a>,
|
||||
and <a href="../../basedefs/time.h.html"><i><time.h></i></a>.</p>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_58_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_58_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_58_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_58_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../signal.h.html#"><i><signal.h></i></a> , <a href="../sys/time.h.html#tag_13_64"><i><sys/time.h></i></a> ,
|
||||
<a href="../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> , <a href="time.h.html"><i><time.h></i></a> , the
|
||||
System Interfaces volume of IEEE Std 1003.1-2001, <a href="../../functions/pselect.html"><i>pselect</i>()</a>, <a href=
|
||||
"../../functions/select.html"><i>select</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_58_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 6. Derived from IEEE Std 1003.1g-2000.</p>
|
||||
|
||||
<p>The requirement for the <b>fd_set</b> structure to have a member <i>fds_bits</i> has been removed as per The Open Group Base
|
||||
Resolution bwg2001-005.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
178
study/Ref-docs/POSIX/susv3/basedefs/sys/sem.h.html
Normal file
178
study/Ref-docs/POSIX/susv3/basedefs/sys/sem.h.html
Normal file
@@ -0,0 +1,178 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/sem.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/sem.h>"></a> <a name="tag_13_59"></a><!-- <sys/sem.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_59_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/sem.h - XSI semaphore facility</blockquote>
|
||||
|
||||
<h4><a name="tag_13_59_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<div class="box"><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt=
|
||||
"[Option Start]" border="0"> #include <sys/sem.h> <img src="../../images/opt-end.gif" alt="[Option End]" border=
|
||||
"0"></tt></div>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_59_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/sem.h></i> header shall define the following constants and structures.</p>
|
||||
|
||||
<p>Semaphore operation flags:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>SEM_UNDO</dt>
|
||||
|
||||
<dd>Set up adjust on exit entry.</dd>
|
||||
</dl>
|
||||
|
||||
<p>Command definitions for the <a href="../../functions/semctl.html"><i>semctl</i>()</a> function shall be provided as follows:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>GETNCNT</dt>
|
||||
|
||||
<dd>Get <i>semncnt</i>.</dd>
|
||||
|
||||
<dt>GETPID</dt>
|
||||
|
||||
<dd>Get <i>sempid</i>.</dd>
|
||||
|
||||
<dt>GETVAL</dt>
|
||||
|
||||
<dd>Get <i>semval</i>.</dd>
|
||||
|
||||
<dt>GETALL</dt>
|
||||
|
||||
<dd>Get all cases of <i>semval</i>.</dd>
|
||||
|
||||
<dt>GETZCNT</dt>
|
||||
|
||||
<dd>Get <i>semzcnt</i>.</dd>
|
||||
|
||||
<dt>SETVAL</dt>
|
||||
|
||||
<dd>Set <i>semval</i>.</dd>
|
||||
|
||||
<dt>SETALL</dt>
|
||||
|
||||
<dd>Set all cases of <i>semval</i>.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <b>semid_ds</b> structure shall contain the following members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>struct ipc_perm sem_perm </tt> Operation permission structure. <tt>
|
||||
unsigned short sem_nsems</tt> Number of semaphores in set. <tt>
|
||||
time_t sem_otime</tt> Last <i>semop</i>
|
||||
() time. <tt>
|
||||
time_t sem_ctime</tt> Last time changed by <i>semctl</i>
|
||||
(). <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>pid_t</b>, <b>time_t</b>, <b>key_t</b>, and <b>size_t</b> types shall be defined as described in <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> .</p>
|
||||
|
||||
<p>A semaphore shall be represented by an anonymous structure containing the following members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>unsigned short semval </tt> Semaphore value. <tt>
|
||||
pid_t sempid </tt> Process ID of last operation. <tt>
|
||||
unsigned short semncnt </tt> Number of processes waiting for <i>semval</i> <tt>
|
||||
</tt> to become greater than current value. <tt>
|
||||
unsigned short semzcnt </tt> Number of processes waiting for <i>semval</i> <tt>
|
||||
</tt> to become 0. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>sembuf</b> structure shall contain the following members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>unsigned short sem_num </tt> Semaphore number. <tt>
|
||||
short sem_op </tt> Semaphore operation. <tt>
|
||||
short sem_flg </tt> Operation flags. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt>int semctl(int, int, int, ...);
|
||||
int semget(key_t, int, int);
|
||||
int semop(int, struct sembuf *, size_t);
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>In addition, all of the symbols from <a href="../../basedefs/sys/ipc.h.html"><i><sys/ipc.h></i></a> shall be defined when
|
||||
this header is included.</p>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_59_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_59_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_59_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_59_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../sys/ipc.h.html#tag_13_54"><i><sys/ipc.h></i></a> , <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> , <a href="../../functions/semctl.html"><i>semctl</i>()</a>, <a
|
||||
href="../../functions/semget.html"><i>semget</i>()</a>, <a href="../../functions/semop.html"><i>semop</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_59_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 2. Derived from System V Release 2.0.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
157
study/Ref-docs/POSIX/susv3/basedefs/sys/shm.h.html
Normal file
157
study/Ref-docs/POSIX/susv3/basedefs/sys/shm.h.html
Normal file
@@ -0,0 +1,157 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/shm.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/shm.h>"></a> <a name="tag_13_60"></a><!-- <sys/shm.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_60_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/shm.h - XSI shared memory facility</blockquote>
|
||||
|
||||
<h4><a name="tag_13_60_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<div class="box"><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt=
|
||||
"[Option Start]" border="0"> #include <sys/shm.h> <img src="../../images/opt-end.gif" alt="[Option End]" border=
|
||||
"0"></tt></div>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_60_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/shm.h></i> header shall define the following symbolic constants:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>SHM_RDONLY</dt>
|
||||
|
||||
<dd>Attach read-only (else read-write).</dd>
|
||||
|
||||
<dt>SHM_RND</dt>
|
||||
|
||||
<dd>Round attach address to SHMLBA.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <i><sys/shm.h></i> header shall define the following symbolic value:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>SHMLBA</dt>
|
||||
|
||||
<dd>Segment low boundary address multiple.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The following data types shall be defined through <b>typedef</b>:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt><b>shmatt_t</b></dt>
|
||||
|
||||
<dd>Unsigned integer used for the number of current attaches that must be able to store values at least as large as a type
|
||||
<b>unsigned short</b>.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <b>shmid_ds</b> structure shall contain the following members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>struct ipc_perm shm_perm </tt> Operation permission structure. <tt>
|
||||
size_t shm_segsz </tt> Size of segment in bytes. <tt>
|
||||
pid_t shm_lpid </tt> Process ID of last shared memory operation. <tt>
|
||||
pid_t shm_cpid </tt> Process ID of creator. <tt>
|
||||
shmatt_t shm_nattch</tt> Number of current attaches. <tt>
|
||||
time_t shm_atime </tt> Time of last <i>shmat</i>
|
||||
(). <tt>
|
||||
time_t shm_dtime </tt> Time of last <i>shmdt</i>
|
||||
(). <tt>
|
||||
time_t shm_ctime </tt> Time of last change by <i>shmctl</i>
|
||||
(). <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>pid_t</b>, <b>time_t</b>, <b>key_t</b>, and <b>size_t</b> types shall be defined as described in <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> .</p>
|
||||
|
||||
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt>void *shmat(int, const void *, int);
|
||||
int shmctl(int, int, struct shmid_ds *);
|
||||
int shmdt(const void *);
|
||||
int shmget(key_t, size_t, int);
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>In addition, all of the symbols from <a href="../../basedefs/sys/ipc.h.html"><i><sys/ipc.h></i></a> shall be defined when
|
||||
this header is included.</p>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_60_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_60_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_60_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_60_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../sys/ipc.h.html#tag_13_54"><i><sys/ipc.h></i></a> , <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> , the System Interfaces volume of IEEE Std 1003.1-2001, <a
|
||||
href="../../functions/shmat.html"><i>shmat</i>()</a>, <a href="../../functions/shmctl.html"><i>shmctl</i>()</a>, <a href=
|
||||
"../../functions/shmdt.html"><i>shmdt</i>()</a>, <a href="../../functions/shmget.html"><i>shmget</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_60_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 2. Derived from System V Release 2.0.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_60_09"></a>Issue 5</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The type of <i>shm_segsz</i> is changed from <b>int</b> to <b>size_t</b>.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
490
study/Ref-docs/POSIX/susv3/basedefs/sys/socket.h.html
Normal file
490
study/Ref-docs/POSIX/susv3/basedefs/sys/socket.h.html
Normal file
@@ -0,0 +1,490 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/socket.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/socket.h>"></a> <a name="tag_13_61"></a><!-- <sys/socket.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_61_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/socket.h - main sockets header</blockquote>
|
||||
|
||||
<h4><a name="tag_13_61_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<p><tt>#include <sys/socket.h></tt></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_61_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/socket.h></i> header shall define the type <b>socklen_t</b>, which is an integer type of width of at least 32
|
||||
bits; see APPLICATION USAGE.</p>
|
||||
|
||||
<p>The <i><sys/socket.h></i> header shall define the unsigned integer type <b>sa_family_t</b>.</p>
|
||||
|
||||
<p>The <i><sys/socket.h></i> header shall define the <b>sockaddr</b> structure that includes at least the following
|
||||
members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>sa_family_t sa_family </tt> Address family. <tt>
|
||||
char sa_data[] </tt> Socket address (variable-length data). <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>sockaddr</b> structure is used to define a socket address which is used in the <a href=
|
||||
"../../functions/bind.html"><i>bind</i>()</a>, <a href="../../functions/connect.html"><i>connect</i>()</a>, <a href=
|
||||
"../../functions/getpeername.html"><i>getpeername</i>()</a>, <a href="../../functions/getsockname.html"><i>getsockname</i>()</a>,
|
||||
<a href="../../functions/recvfrom.html"><i>recvfrom</i>()</a>, and <a href="../../functions/sendto.html"><i>sendto</i>()</a>
|
||||
functions.</p>
|
||||
|
||||
<p>The <i><sys/socket.h></i> header shall define the <b>sockaddr_storage</b> structure. This structure shall be:</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p>Large enough to accommodate all supported protocol-specific address structures</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p>Aligned at an appropriate boundary so that pointers to it can be cast as pointers to protocol-specific address structures and
|
||||
used to access the fields of those structures without alignment problems</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>The <b>sockaddr_storage</b> structure shall contain at least the following members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>sa_family_t ss_family
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>When a <b>sockaddr_storage</b> structure is cast as a <b>sockaddr</b> structure, the <i>ss_family</i> field of the
|
||||
<b>sockaddr_storage</b> structure shall map onto the <i>sa_family</i> field of the <b>sockaddr</b> structure. When a
|
||||
<b>sockaddr_storage</b> structure is cast as a protocol-specific address structure, the <i>ss_family</i> field shall map onto a
|
||||
field of that structure that is of type <b>sa_family_t</b> and that identifies the protocol's address family.</p>
|
||||
|
||||
<p>The <i><sys/socket.h></i> header shall define the <b>msghdr</b> structure that includes at least the following
|
||||
members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>void *msg_name </tt> Optional address. <tt>
|
||||
socklen_t msg_namelen </tt> Size of address. <tt>
|
||||
struct iovec *msg_iov </tt> Scatter/gather array. <tt>
|
||||
int msg_iovlen </tt> Members in <i>msg_iov</i>. <tt>
|
||||
void *msg_control </tt> Ancillary data; see below. <tt>
|
||||
socklen_t msg_controllen </tt> Ancillary data buffer <i>len</i>. <tt>
|
||||
int msg_flags </tt> Flags on received message. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>msghdr</b> structure is used to minimize the number of directly supplied parameters to the <a href=
|
||||
"../../functions/recvmsg.html"><i>recvmsg</i>()</a> and <a href="../../functions/sendmsg.html"><i>sendmsg</i>()</a> functions. This
|
||||
structure is used as a <i>value</i>- <i>result</i> parameter in the <a href="../../functions/recvmsg.html"><i>recvmsg</i>()</a>
|
||||
function and <i>value</i> only for the <a href="../../functions/sendmsg.html"><i>sendmsg</i>()</a> function.</p>
|
||||
|
||||
<p>The <b>iovec</b> structure shall be defined as described in <a href="../sys/uio.h.html#tag_13_68"><i><sys/uio.h></i></a>
|
||||
.</p>
|
||||
|
||||
<p>The <i><sys/socket.h></i> header shall define the <b>cmsghdr</b> structure that includes at least the following
|
||||
members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>socklen_t cmsg_len </tt> Data byte count, including the <b>cmsghdr</b>. <tt>
|
||||
int cmsg_level </tt> Originating protocol. <tt>
|
||||
int cmsg_type </tt> Protocol-specific type. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>cmsghdr</b> structure is used for storage of ancillary data object information.</p>
|
||||
|
||||
<p>Ancillary data consists of a sequence of pairs, each consisting of a <b>cmsghdr</b> structure followed by a data array. The data
|
||||
array contains the ancillary data message, and the <b>cmsghdr</b> structure contains descriptive information that allows an
|
||||
application to correctly parse the data.</p>
|
||||
|
||||
<p>The values for <i>cmsg_level</i> shall be legal values for the <i>level</i> argument to the <a href=
|
||||
"../../functions/getsockopt.html"><i>getsockopt</i>()</a> and <a href="../../functions/setsockopt.html"><i>setsockopt</i>()</a>
|
||||
functions. The system documentation shall specify the <i>cmsg_type</i> definitions for the supported protocols.</p>
|
||||
|
||||
<p>Ancillary data is also possible at the socket level. The <i><sys/socket.h></i> header defines the following macro for use
|
||||
as the <i>cmsg_type</i> value when <i>cmsg_level</i> is SOL_SOCKET:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>SCM_RIGHTS</dt>
|
||||
|
||||
<dd>Indicates that the data array contains the access rights to be sent or received.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <i><sys/socket.h></i> header defines the following macros to gain access to the data arrays in the ancillary data
|
||||
associated with a message header:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>CMSG_DATA(<i>cmsg</i>)</dt>
|
||||
|
||||
<dd><br>
|
||||
If the argument is a pointer to a <b>cmsghdr</b> structure, this macro shall return an unsigned character pointer to the data array
|
||||
associated with the <b>cmsghdr</b> structure.</dd>
|
||||
|
||||
<dt>CMSG_NXTHDR(<i>mhdr,cmsg</i>)</dt>
|
||||
|
||||
<dd><br>
|
||||
If the first argument is a pointer to a <b>msghdr</b> structure and the second argument is a pointer to a <b>cmsghdr</b> structure
|
||||
in the ancillary data pointed to by the <i>msg_control</i> field of that <b>msghdr</b> structure, this macro shall return a pointer
|
||||
to the next <b>cmsghdr</b> structure, or a null pointer if this structure is the last <b>cmsghdr</b> in the ancillary data.</dd>
|
||||
|
||||
<dt>CMSG_FIRSTHDR(<i>mhdr</i>)</dt>
|
||||
|
||||
<dd><br>
|
||||
If the argument is a pointer to a <b>msghdr</b> structure, this macro shall return a pointer to the first <b>cmsghdr</b> structure
|
||||
in the ancillary data associated with this <b>msghdr</b> structure, or a null pointer if there is no ancillary data associated with
|
||||
the <b>msghdr</b> structure.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <i><sys/socket.h></i> header shall define the <b>linger</b> structure that includes at least the following
|
||||
members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>int l_onoff </tt> Indicates whether linger option is enabled. <tt>
|
||||
int l_linger </tt> Linger time, in seconds. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <i><sys/socket.h></i> header shall define the following macros, with distinct integer values:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>SOCK_DGRAM</dt>
|
||||
|
||||
<dd>Datagram socket.</dd>
|
||||
|
||||
<dt>SOCK_RAW</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('RS')">RS</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
Raw Protocol Interface. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt>SOCK_SEQPACKET</dt>
|
||||
|
||||
<dd>Sequenced-packet socket.</dd>
|
||||
|
||||
<dt>SOCK_STREAM</dt>
|
||||
|
||||
<dd>Byte-stream socket.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <i><sys/socket.h></i> header shall define the following macro for use as the <i>level</i> argument of <a href=
|
||||
"../../functions/setsockopt.html"><i>setsockopt</i>()</a> and <a href=
|
||||
"../../functions/getsockopt.html"><i>getsockopt</i>()</a>.</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>SOL_SOCKET</dt>
|
||||
|
||||
<dd>Options to be accessed at socket level, not protocol level.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <i><sys/socket.h></i> header shall define the following macros, with distinct integer values, for use as the
|
||||
<i>option_name</i> argument in <a href="../../functions/getsockopt.html"><i>getsockopt</i>()</a> or <a href=
|
||||
"../../functions/setsockopt.html"><i>setsockopt</i>()</a> calls:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>SO_ACCEPTCONN</dt>
|
||||
|
||||
<dd>Socket is accepting connections.</dd>
|
||||
|
||||
<dt>SO_BROADCAST</dt>
|
||||
|
||||
<dd>Transmission of broadcast messages is supported.</dd>
|
||||
|
||||
<dt>SO_DEBUG</dt>
|
||||
|
||||
<dd>Debugging information is being recorded.</dd>
|
||||
|
||||
<dt>SO_DONTROUTE</dt>
|
||||
|
||||
<dd>Bypass normal routing.</dd>
|
||||
|
||||
<dt>SO_ERROR</dt>
|
||||
|
||||
<dd>Socket error status.</dd>
|
||||
|
||||
<dt>SO_KEEPALIVE</dt>
|
||||
|
||||
<dd>Connections are kept alive with periodic messages.</dd>
|
||||
|
||||
<dt>SO_LINGER</dt>
|
||||
|
||||
<dd>Socket lingers on close.</dd>
|
||||
|
||||
<dt>SO_OOBINLINE</dt>
|
||||
|
||||
<dd>Out-of-band data is transmitted in line.</dd>
|
||||
|
||||
<dt>SO_RCVBUF</dt>
|
||||
|
||||
<dd>Receive buffer size.</dd>
|
||||
|
||||
<dt>SO_RCVLOWAT</dt>
|
||||
|
||||
<dd>Receive ``low water mark''.</dd>
|
||||
|
||||
<dt>SO_RCVTIMEO</dt>
|
||||
|
||||
<dd>Receive timeout.</dd>
|
||||
|
||||
<dt>SO_REUSEADDR</dt>
|
||||
|
||||
<dd>Reuse of local addresses is supported.</dd>
|
||||
|
||||
<dt>SO_SNDBUF</dt>
|
||||
|
||||
<dd>Send buffer size.</dd>
|
||||
|
||||
<dt>SO_SNDLOWAT</dt>
|
||||
|
||||
<dd>Send ``low water mark''.</dd>
|
||||
|
||||
<dt>SO_SNDTIMEO</dt>
|
||||
|
||||
<dd>Send timeout.</dd>
|
||||
|
||||
<dt>SO_TYPE</dt>
|
||||
|
||||
<dd>Socket type.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <i><sys/socket.h></i> header shall define the following macro as the maximum <i>backlog</i> queue length which may be
|
||||
specified by the <i>backlog</i> field of the <a href="../../functions/listen.html"><i>listen</i>()</a> function:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>SOMAXCONN</dt>
|
||||
|
||||
<dd>The maximum <i>backlog</i> queue length.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <i><sys/socket.h></i> header shall define the following macros, with distinct integer values, for use as the valid
|
||||
values for the <i>msg_flags</i> field in the <b>msghdr</b> structure, or the <i>flags</i> parameter in <a href=
|
||||
"../../functions/recvfrom.html"><i>recvfrom</i>()</a>, <a href="../../functions/recvmsg.html"><i>recvmsg</i>()</a>, <a href=
|
||||
"../../functions/sendmsg.html"><i>sendmsg</i>()</a>, or <a href="../../functions/sendto.html"><i>sendto</i>()</a> calls:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>MSG_CTRUNC</dt>
|
||||
|
||||
<dd>Control data truncated.</dd>
|
||||
|
||||
<dt>MSG_DONTROUTE</dt>
|
||||
|
||||
<dd>Send without using routing tables.</dd>
|
||||
|
||||
<dt>MSG_EOR</dt>
|
||||
|
||||
<dd>Terminates a record (if supported by the protocol).</dd>
|
||||
|
||||
<dt>MSG_OOB</dt>
|
||||
|
||||
<dd>Out-of-band data.</dd>
|
||||
|
||||
<dt>MSG_PEEK</dt>
|
||||
|
||||
<dd>Leave received data in queue.</dd>
|
||||
|
||||
<dt>MSG_TRUNC</dt>
|
||||
|
||||
<dd>Normal data truncated.</dd>
|
||||
|
||||
<dt>MSG_WAITALL</dt>
|
||||
|
||||
<dd>Attempt to fill the read buffer.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <i><sys/socket.h></i> header shall define the following macros, with distinct integer values:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>AF_INET</dt>
|
||||
|
||||
<dd>Internet domain sockets for use with IPv4 addresses.</dd>
|
||||
|
||||
<dt>AF_INET6</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('IP6')">IP6</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Internet domain sockets for use with IPv6 addresses. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt>AF_UNIX</dt>
|
||||
|
||||
<dd>UNIX domain sockets.</dd>
|
||||
|
||||
<dt>AF_UNSPEC</dt>
|
||||
|
||||
<dd>Unspecified.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <i><sys/socket.h></i> header shall define the following macros, with distinct integer values:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>SHUT_RD</dt>
|
||||
|
||||
<dd>Disables further receive operations.</dd>
|
||||
|
||||
<dt>SHUT_RDWR</dt>
|
||||
|
||||
<dd>Disables further send and receive operations.</dd>
|
||||
|
||||
<dt>SHUT_WR</dt>
|
||||
|
||||
<dd>Disables further send operations.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt>int accept(int, struct sockaddr *restrict, socklen_t *restrict);
|
||||
int bind(int, const struct sockaddr *, socklen_t);
|
||||
int connect(int, const struct sockaddr *, socklen_t);
|
||||
int getpeername(int, struct sockaddr *restrict, socklen_t *restrict);
|
||||
int getsockname(int, struct sockaddr *restrict, socklen_t *restrict);
|
||||
int getsockopt(int, int, int, void *restrict, socklen_t *restrict);
|
||||
int listen(int, int);
|
||||
ssize_t recv(int, void *, size_t, int);
|
||||
ssize_t recvfrom(int, void *restrict, size_t, int,
|
||||
struct sockaddr *restrict, socklen_t *restrict);
|
||||
ssize_t recvmsg(int, struct msghdr *, int);
|
||||
ssize_t send(int, const void *, size_t, int);
|
||||
ssize_t sendmsg(int, const struct msghdr *, int);
|
||||
ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
|
||||
socklen_t);
|
||||
int setsockopt(int, int, int, const void *, socklen_t);
|
||||
int shutdown(int, int);
|
||||
int socket(int, int, int);
|
||||
int sockatmark(int);
|
||||
int socketpair(int, int, int, int[2]);
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>Inclusion of <i><sys/socket.h></i> may also make visible all symbols from <a href=
|
||||
"../../basedefs/sys/uio.h.html"><i><sys/uio.h></i></a>.</p>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_61_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>To forestall portability problems, it is recommended that applications not use values larger than 2<sup><small>31</small></sup>
|
||||
-1 for the <b>socklen_t</b> type.</p>
|
||||
|
||||
<p>The <b>sockaddr_storage</b> structure solves the problem of declaring storage for automatic variables which is both large enough
|
||||
and aligned enough for storing the socket address data structure of any family. For example, code with a file descriptor and
|
||||
without the context of the address family can pass a pointer to a variable of this type, where a pointer to a socket address
|
||||
structure is expected in calls such as <a href="../../functions/getpeername.html"><i>getpeername</i>()</a>, and determine the
|
||||
address family by accessing the received content after the call.</p>
|
||||
|
||||
<p>The example below illustrates a data structure which aligns on a 64-bit boundary. An implementation-defined field
|
||||
<i>_ss_align</i> following <i>_ss_pad1</i> is used to force a 64-bit alignment which covers proper alignment good enough for needs
|
||||
of at least <b>sockaddr_in6</b> (IPv6) and <b>sockaddr_in</b> (IPv4) address data structures. The size of padding field
|
||||
<i>_ss_pad1</i> depends on the chosen alignment boundary. The size of padding field <i>_ss_pad2</i> depends on the value of overall
|
||||
size chosen for the total size of the structure. This size and alignment are represented in the above example by
|
||||
implementation-defined (not required) constants _SS_MAXSIZE (chosen value 128) and _SS_ALIGNMENT (with chosen value 8). Constants
|
||||
_SS_PAD1SIZE (derived value 6) and _SS_PAD2SIZE (derived value 112) are also for illustration and not required. The
|
||||
implementation-defined definitions and structure field names above start with an underscore to denote implementation private name
|
||||
space. Portable code is not expected to access or reference those fields or constants.</p>
|
||||
|
||||
<pre>
|
||||
<tt>/*
|
||||
* Desired design of maximum size and alignment.
|
||||
*/
|
||||
#define _SS_MAXSIZE 128
|
||||
/* Implementation-defined maximum size. */
|
||||
#define _SS_ALIGNSIZE (sizeof(int64_t))
|
||||
/* Implementation-defined desired alignment. */
|
||||
<br>
|
||||
/*
|
||||
* Definitions used for sockaddr_storage structure paddings design.
|
||||
*/
|
||||
#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(sa_family_t))
|
||||
#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof(sa_family_t)+ \
|
||||
_SS_PAD1SIZE + _SS_ALIGNSIZE))
|
||||
struct sockaddr_storage {
|
||||
sa_family_t ss_family; /* Address family. */
|
||||
/*
|
||||
* Following fields are implementation-defined.
|
||||
*/
|
||||
char _ss_pad1[_SS_PAD1SIZE];
|
||||
/* 6-byte pad; this is to make implementation-defined
|
||||
pad up to alignment field that follows explicit in
|
||||
the data structure. */
|
||||
int64_t _ss_align; /* Field to force desired structure
|
||||
storage alignment. */
|
||||
char _ss_pad2[_SS_PAD2SIZE];
|
||||
/* 112-byte pad to achieve desired size,
|
||||
_SS_MAXSIZE value minus size of ss_family
|
||||
__ss_pad1, __ss_align fields is 112. */
|
||||
};
|
||||
</tt>
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_61_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_61_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_61_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../sys/uio.h.html#tag_13_68"><i><sys/uio.h></i></a> , the System Interfaces volume of
|
||||
IEEE Std 1003.1-2001, <a href="../../functions/accept.html"><i>accept</i>()</a>, <a href=
|
||||
"../../functions/bind.html"><i>bind</i>()</a>, <a href="../../functions/connect.html"><i>connect</i>()</a>, <a href=
|
||||
"../../functions/getpeername.html"><i>getpeername</i>()</a>, <a href="../../functions/getsockname.html"><i>getsockname</i>()</a>,
|
||||
<a href="../../functions/getsockopt.html"><i>getsockopt</i>()</a>, <a href="../../functions/listen.html"><i>listen</i>()</a>, <a
|
||||
href="../../functions/recv.html"><i>recv</i>()</a>, <a href="../../functions/recvfrom.html"><i>recvfrom</i>()</a>, <a href=
|
||||
"../../functions/recvmsg.html"><i>recvmsg</i>()</a>, <a href="../../functions/send.html"><i>send</i>()</a>, <a href=
|
||||
"../../functions/sendmsg.html"><i>sendmsg</i>()</a>, <a href="../../functions/sendto.html"><i>sendto</i>()</a>, <a href=
|
||||
"../../functions/setsockopt.html"><i>setsockopt</i>()</a>, <a href="../../functions/shutdown.html"><i>shutdown</i>()</a>, <a href=
|
||||
"../../functions/socket.html"><i>socket</i>()</a>, <a href="../../functions/socketpair.html"><i>socketpair</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_61_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 6. Derived from the XNS, Issue 5.2 specification.</p>
|
||||
|
||||
<p>The <b>restrict</b> keyword is added to the prototypes for <a href="../../functions/accept.html"><i>accept</i>()</a>, <a href=
|
||||
"../../functions/getpeername.html"><i>getpeername</i>()</a>, <a href="../../functions/getsockname.html"><i>getsockname</i>()</a>,
|
||||
<a href="../../functions/getsockopt.html"><i>getsockopt</i>()</a>, and <a href=
|
||||
"../../functions/recvfrom.html"><i>recvfrom</i>()</a>.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
414
study/Ref-docs/POSIX/susv3/basedefs/sys/stat.h.html
Normal file
414
study/Ref-docs/POSIX/susv3/basedefs/sys/stat.h.html
Normal file
@@ -0,0 +1,414 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/stat.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/stat.h>"></a> <a name="tag_13_62"></a><!-- <sys/stat.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_62_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/stat.h - data returned by the stat() function</blockquote>
|
||||
|
||||
<h4><a name="tag_13_62_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<p><tt>#include <sys/stat.h></tt></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_62_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/stat.h></i> header shall define the structure of the data returned by the functions <a href=
|
||||
"../../functions/fstat.html"><i>fstat</i>()</a>, <a href="../../functions/lstat.html"><i>lstat</i>()</a>, and <a href=
|
||||
"../../functions/stat.html"><i>stat</i>()</a>.</p>
|
||||
|
||||
<p>The <b>stat</b> structure shall contain at least the following members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>dev_t st_dev </tt> Device ID of device containing file. <tt>
|
||||
ino_t st_ino </tt> File serial number. <tt>
|
||||
mode_t st_mode </tt> Mode of file (see below). <tt>
|
||||
nlink_t st_nlink </tt> Number of hard links to the file. <tt>
|
||||
uid_t st_uid </tt> User ID of file. <tt>
|
||||
gid_t st_gid </tt> Group ID of file. <tt>
|
||||
<sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
dev_t st_rdev </tt> Device ID (if file is character or block special). <tt>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
off_t st_size </tt> For regular files, the file size in bytes. <tt>
|
||||
</tt> For symbolic links, the length in bytes of the <tt>
|
||||
</tt> pathname contained in the symbolic link. <tt>
|
||||
<sup>[<a href="javascript:open_code('SHM')">SHM</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
</tt> For a shared memory object, the length in bytes. <tt>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
<sup>[<a href="javascript:open_code('TYM')">TYM</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
</tt> For a typed memory object, the length in bytes. <tt>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
</tt> For other file types, the use of this field is <tt>
|
||||
</tt> unspecified. <tt>
|
||||
time_t st_atime </tt> Time of last access. <tt>
|
||||
time_t st_mtime </tt> Time of last data modification. <tt>
|
||||
time_t st_ctime </tt> Time of last status change. <tt>
|
||||
<sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
blksize_t st_blksize</tt> A file system-specific preferred I/O block size for <tt>
|
||||
</tt> this object. In some file system types, this may <tt>
|
||||
</tt> vary from file to file. <tt>
|
||||
blkcnt_t st_blocks </tt> Number of blocks allocated for this object. <tt>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <i>st_ino</i> and <i>st_dev</i> fields taken together uniquely identify the file within the system. The <b>blkcnt_t</b>,
|
||||
<b>blksize_t</b>, <b>dev_t</b>, <b>ino_t</b>, <b>mode_t</b>, <b>nlink_t</b>, <b>uid_t</b>, <b>gid_t</b>, <b>off_t</b>, and
|
||||
<b>time_t</b> types shall be defined as described in <a href="../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> . Times
|
||||
shall be given in seconds since the Epoch.</p>
|
||||
|
||||
<p>Unless otherwise specified, the structure members <i>st_mode</i>, <i>st_ino</i>, <i>st_dev</i>, <i>st_uid</i>, <i>st_gid</i>,
|
||||
<i>st_atime</i>, <i>st_ctime</i>, and <i>st_mtime</i> shall have meaningful values for all file types defined in
|
||||
IEEE Std 1003.1-2001.</p>
|
||||
|
||||
<p>For symbolic links, the <i>st_mode</i> member shall contain meaningful information, which can be used with the file type macros
|
||||
described below, that take a <i>mode</i> argument. The <i>st_size</i> member shall contain the length, in bytes, of the pathname
|
||||
contained in the symbolic link. File mode bits and the contents of the remaining members of the <b>stat</b> structure are
|
||||
unspecified. The value returned in the <i>st_size</i> field shall be the length of the contents of the symbolic link, and shall not
|
||||
count a trailing null if one is present.</p>
|
||||
|
||||
<p>The following symbolic names for the values of type <b>mode_t</b> shall also be defined.</p>
|
||||
|
||||
<p>File type:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>S_IFMT</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Type of file.
|
||||
|
||||
<dl compact>
|
||||
<dt>S_IFBLK</dt>
|
||||
|
||||
<dd>Block special.</dd>
|
||||
|
||||
<dt>S_IFCHR</dt>
|
||||
|
||||
<dd>Character special.</dd>
|
||||
|
||||
<dt>S_IFIFO</dt>
|
||||
|
||||
<dd>FIFO special.</dd>
|
||||
|
||||
<dt>S_IFREG</dt>
|
||||
|
||||
<dd>Regular.</dd>
|
||||
|
||||
<dt>S_IFDIR</dt>
|
||||
|
||||
<dd>Directory.</dd>
|
||||
|
||||
<dt>S_IFLNK</dt>
|
||||
|
||||
<dd>Symbolic link.</dd>
|
||||
|
||||
<dt>S_IFSOCK</dt>
|
||||
|
||||
<dd>Socket. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p>File mode bits:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>S_IRWXU</dt>
|
||||
|
||||
<dd>Read, write, execute/search by owner.
|
||||
|
||||
<dl compact>
|
||||
<dt>S_IRUSR</dt>
|
||||
|
||||
<dd>Read permission, owner.</dd>
|
||||
|
||||
<dt>S_IWUSR</dt>
|
||||
|
||||
<dd>Write permission, owner.</dd>
|
||||
|
||||
<dt>S_IXUSR</dt>
|
||||
|
||||
<dd>Execute/search permission, owner.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt>S_IRWXG</dt>
|
||||
|
||||
<dd>Read, write, execute/search by group.
|
||||
|
||||
<dl compact>
|
||||
<dt>S_IRGRP</dt>
|
||||
|
||||
<dd>Read permission, group.</dd>
|
||||
|
||||
<dt>S_IWGRP</dt>
|
||||
|
||||
<dd>Write permission, group.</dd>
|
||||
|
||||
<dt>S_IXGRP</dt>
|
||||
|
||||
<dd>Execute/search permission, group.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt>S_IRWXO</dt>
|
||||
|
||||
<dd>Read, write, execute/search by others.
|
||||
|
||||
<dl compact>
|
||||
<dt>S_IROTH</dt>
|
||||
|
||||
<dd>Read permission, others.</dd>
|
||||
|
||||
<dt>S_IWOTH</dt>
|
||||
|
||||
<dd>Write permission, others.</dd>
|
||||
|
||||
<dt>S_IXOTH</dt>
|
||||
|
||||
<dd>Execute/search permission, others.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt>S_ISUID</dt>
|
||||
|
||||
<dd>Set-user-ID on execution.</dd>
|
||||
|
||||
<dt>S_ISGID</dt>
|
||||
|
||||
<dd>Set-group-ID on execution.</dd>
|
||||
|
||||
<dt>S_ISVTX</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> On directories, restricted deletion flag. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
</dl>
|
||||
|
||||
<p>The bits defined by S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_ISUID, S_ISGID, <sup>[<a
|
||||
href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border="0"> and
|
||||
S_ISVTX <img src="../../images/opt-end.gif" alt="[Option End]" border="0"> shall be unique.</p>
|
||||
|
||||
<p>S_IRWXU is the bitwise-inclusive OR of S_IRUSR, S_IWUSR, and S_IXUSR.</p>
|
||||
|
||||
<p>S_IRWXG is the bitwise-inclusive OR of S_IRGRP, S_IWGRP, and S_IXGRP.</p>
|
||||
|
||||
<p>S_IRWXO is the bitwise-inclusive OR of S_IROTH, S_IWOTH, and S_IXOTH.</p>
|
||||
|
||||
<p>Implementations may OR other implementation-defined bits into S_IRWXU, S_IRWXG, and S_IRWXO, but they shall not overlap any of
|
||||
the other bits defined in this volume of IEEE Std 1003.1-2001. The <i>file permission bits</i> are defined to be those
|
||||
corresponding to the bitwise-inclusive OR of S_IRWXU, S_IRWXG, and S_IRWXO.</p>
|
||||
|
||||
<p>The following macros shall be provided to test whether a file is of the specified type. The value <i>m</i> supplied to the
|
||||
macros is the value of <i>st_mode</i> from a <b>stat</b> structure. The macro shall evaluate to a non-zero value if the test is
|
||||
true; 0 if the test is false.</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>S_ISBLK(<i>m</i>)</dt>
|
||||
|
||||
<dd>Test for a block special file.</dd>
|
||||
|
||||
<dt>S_ISCHR(<i>m</i>)</dt>
|
||||
|
||||
<dd>Test for a character special file.</dd>
|
||||
|
||||
<dt>S_ISDIR(<i>m</i>)</dt>
|
||||
|
||||
<dd>Test for a directory.</dd>
|
||||
|
||||
<dt>S_ISFIFO(<i>m</i>)</dt>
|
||||
|
||||
<dd>Test for a pipe or FIFO special file.</dd>
|
||||
|
||||
<dt>S_ISREG(<i>m</i>)</dt>
|
||||
|
||||
<dd>Test for a regular file.</dd>
|
||||
|
||||
<dt>S_ISLNK(<i>m</i>)</dt>
|
||||
|
||||
<dd>Test for a symbolic link.</dd>
|
||||
|
||||
<dt>S_ISSOCK(<i>m</i>)</dt>
|
||||
|
||||
<dd>Test for a socket.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The implementation may implement message queues, semaphores, or shared memory objects as distinct file types. The following
|
||||
macros shall be provided to test whether a file is of the specified type. The value of the <i>buf</i> argument supplied to the
|
||||
macros is a pointer to a <b>stat</b> structure. The macro shall evaluate to a non-zero value if the specified object is implemented
|
||||
as a distinct file type and the specified file type is contained in the <b>stat</b> structure referenced by <i>buf</i>. Otherwise,
|
||||
the macro shall evaluate to zero.</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>S_TYPEISMQ(<i>buf</i>)</dt>
|
||||
|
||||
<dd>Test for a message queue.</dd>
|
||||
|
||||
<dt>S_TYPEISSEM(<i>buf</i>)</dt>
|
||||
|
||||
<dd>Test for a semaphore.</dd>
|
||||
|
||||
<dt>S_TYPEISSHM(<i>buf</i>)</dt>
|
||||
|
||||
<dd>Test for a shared memory object.</dd>
|
||||
</dl>
|
||||
|
||||
<p><sup>[<a href="javascript:open_code('TYM')">TYM</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> The implementation may implement typed memory objects as distinct file types, and the following macro shall test whether a
|
||||
file is of the specified type. The value of the <i>buf</i> argument supplied to the macros is a pointer to a <b>stat</b> structure.
|
||||
The macro shall evaluate to a non-zero value if the specified object is implemented as a distinct file type and the specified file
|
||||
type is contained in the <b>stat</b> structure referenced by <i>buf</i>. Otherwise, the macro shall evaluate to zero.</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>S_TYPEISTMO(<i>buf</i>)</dt>
|
||||
|
||||
<dd>Test macro for a typed memory object.</dd>
|
||||
</dl>
|
||||
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
|
||||
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt>int chmod(const char *, mode_t);
|
||||
int fchmod(int, mode_t);
|
||||
int fstat(int, struct stat *);
|
||||
int lstat(const char *restrict, struct stat *restrict);
|
||||
int mkdir(const char *, mode_t);
|
||||
int mkfifo(const char *, mode_t);
|
||||
<sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
int mknod(const char *, mode_t, dev_t);
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
int stat(const char *restrict, struct stat *restrict);
|
||||
mode_t umask(mode_t);
|
||||
</tt>
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_62_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>Use of the macros is recommended for determining the type of a file.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_62_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>A conforming C-language application must include <i><sys/stat.h></i> for functions that have arguments or return values of
|
||||
type <b>mode_t</b>, so that symbolic values for that type can be used. An alternative would be to require that these constants are
|
||||
also defined by including <a href="../../basedefs/sys/types.h.html"><i><sys/types.h></i></a>.</p>
|
||||
|
||||
<p>The S_ISUID and S_ISGID bits may be cleared on any write, not just on <a href="../../functions/open.html"><i>open</i>()</a>, as
|
||||
some historical implementations do.</p>
|
||||
|
||||
<p>System calls that update the time entry fields in the <b>stat</b> structure must be documented by the implementors.
|
||||
POSIX-conforming systems should not update the time entry fields for functions listed in the System Interfaces volume of
|
||||
IEEE Std 1003.1-2001 unless the standard requires that they do, except in the case of documented extensions to the
|
||||
standard.</p>
|
||||
|
||||
<p>Note that <i>st_dev</i> must be unique within a Local Area Network (LAN) in a ``system'' made up of multiple computers' file
|
||||
systems connected by a LAN.</p>
|
||||
|
||||
<p>Networked implementations of a POSIX-conforming system must guarantee that all files visible within the file tree (including
|
||||
parts of the tree that may be remotely mounted from other machines on the network) on each individual processor are uniquely
|
||||
identified by the combination of the <i>st_ino</i> and <i>st_dev</i> fields.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_62_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>No new S_IFMT symbolic names for the file type values of <b>mode_t</b> will be defined by IEEE Std 1003.1-2001; if new
|
||||
file types are required, they will only be testable through <i>S_ISxx</i>() or <i>S_TYPEISxxx</i>() macros instead.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_62_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> , the System Interfaces volume of
|
||||
IEEE Std 1003.1-2001, <a href="../../functions/chmod.html"><i>chmod</i>()</a>, <a href=
|
||||
"../../functions/fchmod.html"><i>fchmod</i>()</a>, <a href="../../functions/fstat.html"><i>fstat</i>()</a>, <a href=
|
||||
"../../functions/lstat.html"><i>lstat</i>()</a>, <a href="../../functions/mkdir.html"><i>mkdir</i>()</a>, <a href=
|
||||
"../../functions/mkfifo.html"><i>mkfifo</i>()</a>, <a href="../../functions/mknod.html"><i>mknod</i>()</a>, <a href=
|
||||
"../../functions/stat.html"><i>stat</i>()</a>, <a href="../../functions/umask.html"><i>umask</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_62_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 1. Derived from Issue 1 of the SVID.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_62_09"></a>Issue 5</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The DESCRIPTION is updated for alignment with the POSIX Realtime Extension.</p>
|
||||
|
||||
<p>The type of <i>st_blksize</i> is changed from <b>long</b> to <b>blksize_t</b>; the type of <i>st_blocks</i> is changed from
|
||||
<b>long</b> to <b>blkcnt_t</b>.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_62_10"></a>Issue 6</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The S_TYPEISMQ(), S_TYPEISSEM(), and S_TYPEISSHM() macros are unconditionally mandated.</p>
|
||||
|
||||
<p>The Open Group Corrigendum U035/4 is applied. In the DESCRIPTION, the types <b>blksize_t</b> and <b>blkcnt_t</b> have been
|
||||
described.</p>
|
||||
|
||||
<p>The following new requirements on POSIX implementations derive from alignment with the Single UNIX Specification:</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p>The <b>dev_t</b>, <b>ino_t</b>, <b>mode_t</b>, <b>nlink_t</b>, <b>uid_t</b>, <b>gid_t</b>, <b>off_t</b>, and <b>time_t</b> types
|
||||
are mandated.</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>S_IFSOCK and S_ISSOCK are added for sockets.</p>
|
||||
|
||||
<p>The description of <b>stat</b> structure members is changed to reflect contents when file type is a symbolic link.</p>
|
||||
|
||||
<p>The test macro S_TYPEISTMO is added for alignment with IEEE Std 1003.1j-2000.</p>
|
||||
|
||||
<p>The <b>restrict</b> keyword is added to the prototypes for <a href="../../functions/lstat.html"><i>lstat</i>()</a> and <a href=
|
||||
"../../functions/stat.html"><i>stat</i>()</a>.</p>
|
||||
|
||||
<p>The <a href="../../functions/lstat.html"><i>lstat</i>()</a> function is made mandatory.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
148
study/Ref-docs/POSIX/susv3/basedefs/sys/statvfs.h.html
Normal file
148
study/Ref-docs/POSIX/susv3/basedefs/sys/statvfs.h.html
Normal file
@@ -0,0 +1,148 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/statvfs.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/statvfs.h>"></a> <a name="tag_13_63"></a><!-- <sys/statvfs.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_63_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/statvfs.h - VFS File System information structure</blockquote>
|
||||
|
||||
<h4><a name="tag_13_63_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<div class="box"><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt=
|
||||
"[Option Start]" border="0"> #include <sys/statvfs.h> <img src="../../images/opt-end.gif" alt="[Option End]" border=
|
||||
"0"></tt></div>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_63_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/statvfs.h></i> header shall define the <b>statvfs</b> structure that includes at least the following
|
||||
members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>unsigned long f_bsize </tt> File system block size. <tt>
|
||||
unsigned long f_frsize </tt> Fundamental file system block size. <tt>
|
||||
fsblkcnt_t f_blocks </tt> Total number of blocks on file system in units of <i>f_frsize.</i> <tt>
|
||||
fsblkcnt_t f_bfree </tt> Total number of free blocks. <tt>
|
||||
fsblkcnt_t f_bavail </tt> Number of free blocks available to <tt>
|
||||
</tt> non-privileged process. <tt>
|
||||
fsfilcnt_t f_files </tt> Total number of file serial numbers. <tt>
|
||||
fsfilcnt_t f_ffree </tt> Total number of free file serial numbers. <tt>
|
||||
fsfilcnt_t f_favail </tt> Number of file serial numbers available to <tt>
|
||||
</tt> non-privileged process. <tt>
|
||||
unsigned long f_fsid </tt> File system ID. <tt>
|
||||
unsigned long f_flag </tt> Bit mask of <i>f_flag</i> values. <tt>
|
||||
unsigned long f_namemax </tt> Maximum filename length. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>fsblkcnt_t</b> and <b>fsfilcnt_t</b> types shall be defined as described in <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> .</p>
|
||||
|
||||
<p>The following flags for the <i>f_flag</i> member shall be defined:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>ST_RDONLY</dt>
|
||||
|
||||
<dd>Read-only file system.</dd>
|
||||
|
||||
<dt>ST_NOSUID</dt>
|
||||
|
||||
<dd>Does not support <a href="../../functions/setuid.html"><i>setuid</i>()</a>/ <a href=
|
||||
"../../functions/setgid.html"><i>setgid</i>()</a> semantics.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt>int statvfs(const char *restrict, struct statvfs *restrict);
|
||||
int fstatvfs(int, struct statvfs *);
|
||||
</tt>
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_63_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_63_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_63_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_63_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> , the System Interfaces volume of
|
||||
IEEE Std 1003.1-2001, <a href="../../functions/fstatvfs.html"><i>fstatvfs</i>()</a>, <a href=
|
||||
"../../functions/statvfs.html"><i>statvfs</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_63_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 4, Version 2.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_63_09"></a>Issue 5</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The type of <i>f_blocks</i>, <i>f_bfree</i>, and <i>f_bavail</i> is changed from <b>unsigned long</b> to <b>fsblkcnt_t</b>; the
|
||||
type of <i>f_files</i>, <i>f_ffree</i>, and <i>f_favail</i> is changed from <b>unsigned long</b> to <b>fsfilcnt_t</b>.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_63_10"></a>Issue 6</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The Open Group Corrigendum U035/5 is applied. In the DESCRIPTION, the types <b>fsblkcnt_t</b> and <b>fsfilcnt_t</b> have been
|
||||
described.</p>
|
||||
|
||||
<p>The <b>restrict</b> keyword is added to the prototype for <a href="../../functions/statvfs.html"><i>statvfs</i>()</a>.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
119
study/Ref-docs/POSIX/susv3/basedefs/sys/style.css
Normal file
119
study/Ref-docs/POSIX/susv3/basedefs/sys/style.css
Normal file
@@ -0,0 +1,119 @@
|
||||
A:link { COLOR: #0000FF; }
|
||||
A:visited { COLOR: #6666FF; }
|
||||
A:active { COLOR: #6666FF; }
|
||||
A:hover {
|
||||
COLOR: #FF0000;
|
||||
TEXT-DECORATION: underline;
|
||||
}
|
||||
|
||||
H1{
|
||||
FONT-FAMILY: Arial, Helvetica, sans-serif;
|
||||
COLOR: #006600;
|
||||
BACKGROUND-COLOR: white;
|
||||
FONT-SIZE: 20pt;
|
||||
}
|
||||
H2{
|
||||
FONT-FAMILY: Arial, Helvetica, sans-serif;
|
||||
COLOR: #006600;
|
||||
BACKGROUND-COLOR: white;
|
||||
FONT-SIZE: 15pt;
|
||||
}
|
||||
H3{
|
||||
FONT-FAMILY: Arial, Helvetica, sans-serif;
|
||||
COLOR: #006600;
|
||||
BACKGROUND-COLOR: white;
|
||||
FONT-SIZE: 14pt;
|
||||
}
|
||||
H4{
|
||||
FONT-FAMILY: Arial, Helvetica, sans-serif;
|
||||
COLOR: #006600;
|
||||
BACKGROUND-COLOR: white;
|
||||
FONT-Style: italic;
|
||||
FONT-SIZE: 12pt;
|
||||
}
|
||||
H5{
|
||||
FONT-FAMILY: Arial, Helvetica, sans-serif;
|
||||
COLOR: #006600;
|
||||
BACKGROUND-COLOR: white;
|
||||
FONT-SIZE: 11pt;
|
||||
}
|
||||
H6{
|
||||
FONT-FAMILY: Arial, Helvetica, sans-serif;
|
||||
COLOR: #006666;
|
||||
BACKGROUND-COLOR: white;
|
||||
FONT-SIZE: 10pt;
|
||||
font-weight : bold;
|
||||
}
|
||||
|
||||
BODY
|
||||
{
|
||||
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
|
||||
FONT-SIZE: 10pt;
|
||||
MARGIN-LEFT: 3pt;
|
||||
MARGIN-TOP: 2pt;
|
||||
COLOR: #000000;
|
||||
BACKGROUND-COLOR: white;
|
||||
}
|
||||
|
||||
BLOCKQUOTE.synopsis
|
||||
{
|
||||
FONT-SIZE: 11pt;
|
||||
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
/*em { font-style: italic; font-weight: normal; font-size:10pt; }*/
|
||||
|
||||
BLOCKQUOTE.body
|
||||
{
|
||||
FONT-SIZE: 10pt;
|
||||
MARGIN-BOTTOM: 0pt;
|
||||
MARGIN-LEFT: 0pt;
|
||||
MARGIN-TOP: 0pt;
|
||||
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
|
||||
TEXT-INDENT: 10px;
|
||||
}
|
||||
|
||||
TABLE {
|
||||
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
|
||||
FONT-SIZE: 10pt;
|
||||
MARGIN-LEFT: 0pt;
|
||||
MARGIN-TOP: 0pt;
|
||||
COLOR: #000000;
|
||||
BACKGROUND-COLOR: white;
|
||||
}
|
||||
|
||||
P.tent {
|
||||
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
|
||||
FONT-SIZE: 10pt;
|
||||
}
|
||||
|
||||
UL
|
||||
{
|
||||
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
|
||||
FONT-SIZE: 10pt;
|
||||
COLOR: #000000;
|
||||
}
|
||||
|
||||
LI
|
||||
{
|
||||
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
|
||||
FONT-SIZE: 10pt;
|
||||
COLOR: #000000;
|
||||
/* TEXT-INDENT: -10px; */
|
||||
|
||||
}
|
||||
|
||||
HR
|
||||
{
|
||||
COLOR: #009900;
|
||||
}
|
||||
|
||||
div.box { border: none; border-width: thin;
|
||||
background: rgb(204,204,255);
|
||||
font-size: 11pt;
|
||||
}
|
||||
|
||||
|
||||
pre {FONT-SIZE: 11pt; }
|
||||
pre { font-family: monospace; }
|
||||
|
||||
169
study/Ref-docs/POSIX/susv3/basedefs/sys/time.h.html
Normal file
169
study/Ref-docs/POSIX/susv3/basedefs/sys/time.h.html
Normal file
@@ -0,0 +1,169 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/time.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/time.h>"></a> <a name="tag_13_64"></a><!-- <sys/time.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_64_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/time.h - time types</blockquote>
|
||||
|
||||
<h4><a name="tag_13_64_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<div class="box"><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt=
|
||||
"[Option Start]" border="0"> #include <sys/time.h> <img src="../../images/opt-end.gif" alt="[Option End]" border=
|
||||
"0"></tt></div>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_64_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/time.h></i> header shall define the <b>timeval</b> structure that includes at least the following members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>time_t tv_sec </tt> Seconds. <tt>
|
||||
suseconds_t tv_usec </tt> Microseconds. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <i><sys/time.h></i> header shall define the <b>itimerval</b> structure that includes at least the following
|
||||
members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>struct timeval it_interval</tt> Timer interval. <tt>
|
||||
struct timeval it_value </tt> Current value. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>time_t</b> and <b>suseconds_t</b> types shall be defined as described in <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> .</p>
|
||||
|
||||
<p>The <b>fd_set</b> type shall be defined as described in <a href="../sys/select.h.html#tag_13_58"><i><sys/select.h></i></a>
|
||||
.</p>
|
||||
|
||||
<p>The <i><sys/time.h></i> header shall define the following values for the <i>which</i> argument of <a href=
|
||||
"../../functions/getitimer.html"><i>getitimer</i>()</a> and <a href="../../functions/setitimer.html"><i>setitimer</i>()</a>:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>ITIMER_REAL</dt>
|
||||
|
||||
<dd>Decrements in real time.</dd>
|
||||
|
||||
<dt>ITIMER_VIRTUAL</dt>
|
||||
|
||||
<dd>Decrements in process virtual time.</dd>
|
||||
|
||||
<dt>ITIMER_PROF</dt>
|
||||
|
||||
<dd>Decrements both in process virtual time and when the system is running on behalf of the process.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The following shall be defined as described in <a href="../sys/select.h.html#tag_13_58"><i><sys/select.h></i></a> : <a
|
||||
href="../../functions/FD_CLR.html"><i>FD_CLR</i>()</a> <a href="../../functions/FD_ISSET.html"><i>FD_ISSET</i>()</a> <a href=
|
||||
"../../functions/FD_SET.html"><i>FD_SET</i>()</a> <a href="../../functions/FD_ZERO.html"><i>FD_ZERO</i>()</a> FD_SETSIZE</p>
|
||||
|
||||
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt>int getitimer(int, struct itimerval *);
|
||||
int gettimeofday(struct timeval *restrict, void *restrict);
|
||||
int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
|
||||
struct timeval *restrict);
|
||||
int setitimer(int, const struct itimerval *restrict,
|
||||
struct itimerval *restrict);
|
||||
int utimes(const char *, const struct timeval [2]); (</tt><b>LEGACY</b> <tt>)
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>Inclusion of the <i><sys/time.h></i> header may make visible all symbols from the <a href=
|
||||
"../../basedefs/sys/select.h.html"><i><sys/select.h></i></a> header.</p>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_64_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_64_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_64_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_64_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../sys/select.h.html#tag_13_58"><i><sys/select.h></i></a> , <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> , the System Interfaces volume of IEEE Std 1003.1-2001, <a
|
||||
href="../../functions/getitimer.html"><i>getitimer</i>()</a>, <a href=
|
||||
"../../functions/gettimeofday.html"><i>gettimeofday</i>()</a>, <a href="../../functions/select.html"><i>select</i>()</a>, <a href=
|
||||
"../../functions/setitimer.html"><i>setitimer</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_64_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 4, Version 2.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_64_09"></a>Issue 5</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The type of <i>tv_usec</i> is changed from <b>long</b> to <b>suseconds_t</b>.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_64_10"></a>Issue 6</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <b>restrict</b> keyword is added to the prototypes for <a href=
|
||||
"../../functions/gettimeofday.html"><i>gettimeofday</i>()</a>, <a href="../../functions/select.html"><i>select</i>()</a>, and <a
|
||||
href="../../functions/setitimer.html"><i>setitimer</i>()</a>.</p>
|
||||
|
||||
<p>The note is added that inclusion of this header may also make symbols visible from <a href=
|
||||
"../../basedefs/sys/select.h.html"><i><sys/select.h></i></a>.</p>
|
||||
|
||||
<p>The <a href="../../functions/utimes.html"><i>utimes</i>()</a> function is marked LEGACY.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
112
study/Ref-docs/POSIX/susv3/basedefs/sys/timeb.h.html
Normal file
112
study/Ref-docs/POSIX/susv3/basedefs/sys/timeb.h.html
Normal file
@@ -0,0 +1,112 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/timeb.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/timeb.h>"></a> <a name="tag_13_65"></a><!-- <sys/timeb.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_65_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/timeb.h - additional definitions for date and time</blockquote>
|
||||
|
||||
<h4><a name="tag_13_65_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<div class="box"><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt=
|
||||
"[Option Start]" border="0"> #include <sys/timeb.h> <img src="../../images/opt-end.gif" alt="[Option End]" border=
|
||||
"0"></tt></div>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_65_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/timeb.h></i> header shall define the <b>timeb</b> structure that includes at least the following members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>time_t time </tt> The seconds portion of the current time. <tt>
|
||||
unsigned short millitm </tt> The milliseconds portion of the current time. <tt>
|
||||
short timezone</tt> The local timezone in minutes west of Greenwich. <tt>
|
||||
short dstflag </tt> TRUE if Daylight Savings Time is in effect. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>time_t</b> type shall be defined as described in <a href="../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a>
|
||||
.</p>
|
||||
|
||||
<p>The following shall be declared as a function and may also be defined as a macro. A function prototype shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt>int ftime(struct timeb *); (</tt><b>LEGACY</b> <tt>)
|
||||
</tt>
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_65_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_65_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_65_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_65_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> , <a href="time.h.html"><i><time.h></i></a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_65_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 4, Version 2.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_65_09"></a>Issue 6</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <a href="../../functions/ftime.html"><i>ftime</i>()</a> function is marked LEGACY.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
106
study/Ref-docs/POSIX/susv3/basedefs/sys/times.h.html
Normal file
106
study/Ref-docs/POSIX/susv3/basedefs/sys/times.h.html
Normal file
@@ -0,0 +1,106 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/times.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/times.h>"></a> <a name="tag_13_66"></a><!-- <sys/times.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_66_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/times.h - file access and modification times structure</blockquote>
|
||||
|
||||
<h4><a name="tag_13_66_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<p><tt>#include <sys/times.h></tt></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_66_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/times.h></i> header shall define the structure <b>tms</b>, which is returned by <a href=
|
||||
"../../functions/times.html"><i>times</i>()</a> and includes at least the following members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>clock_t tms_utime </tt> User CPU time. <tt>
|
||||
clock_t tms_stime </tt> System CPU time. <tt>
|
||||
clock_t tms_cutime</tt> User CPU time of terminated child processes. <tt>
|
||||
clock_t tms_cstime</tt> System CPU time of terminated child processes. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>clock_t</b> type shall be defined as described in <a href="../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a>
|
||||
.</p>
|
||||
|
||||
<p>The following shall be declared as a function and may also be defined as a macro. A function prototype shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt>clock_t times(struct tms *);
|
||||
</tt>
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_66_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_66_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_66_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_66_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> , the System Interfaces volume of
|
||||
IEEE Std 1003.1-2001, <a href="../../functions/times.html"><i>times</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_66_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 1. Derived from Issue 1 of the SVID.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
420
study/Ref-docs/POSIX/susv3/basedefs/sys/types.h.html
Normal file
420
study/Ref-docs/POSIX/susv3/basedefs/sys/types.h.html
Normal file
@@ -0,0 +1,420 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/types.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/types.h>"></a> <a name="tag_13_67"></a><!-- <sys/types.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_67_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/types.h - data types</blockquote>
|
||||
|
||||
<h4><a name="tag_13_67_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<p><tt>#include <sys/types.h></tt></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_67_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/types.h></i> header shall include definitions for at least the following types:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt><b>blkcnt_t</b></dt>
|
||||
|
||||
<dd>Used for file block counts.</dd>
|
||||
|
||||
<dt><b>blksize_t</b></dt>
|
||||
|
||||
<dd>Used for block sizes.</dd>
|
||||
|
||||
<dt><b>clock_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used for system times in clock ticks or CLOCKS_PER_SEC; see <a href="../time.h.html"><i><time.h></i></a> . <img src=
|
||||
"../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>clockid_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('TMR')">TMR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used for clock ID type in the clock and timer functions. <img src="../../images/opt-end.gif" alt="[Option End]" border=
|
||||
"0"></dd>
|
||||
|
||||
<dt><b>dev_t</b></dt>
|
||||
|
||||
<dd>Used for device IDs.</dd>
|
||||
|
||||
<dt><b>fsblkcnt_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used for file system block counts. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>fsfilcnt_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used for file system file counts. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>gid_t</b></dt>
|
||||
|
||||
<dd>Used for group IDs.</dd>
|
||||
|
||||
<dt><b>id_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used as a general identifier; can be used to contain at least a <b>pid_t</b>, <b>uid_t</b>, or <b>gid_t</b>. <img src=
|
||||
"../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>ino_t</b></dt>
|
||||
|
||||
<dd>Used for file serial numbers.</dd>
|
||||
|
||||
<dt><b>key_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used for XSI interprocess communication. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>mode_t</b></dt>
|
||||
|
||||
<dd>Used for some file attributes.</dd>
|
||||
|
||||
<dt><b>nlink_t</b></dt>
|
||||
|
||||
<dd>Used for link counts.</dd>
|
||||
|
||||
<dt><b>off_t</b></dt>
|
||||
|
||||
<dd>Used for file sizes.</dd>
|
||||
|
||||
<dt><b>pid_t</b></dt>
|
||||
|
||||
<dd>Used for process IDs and process group IDs.</dd>
|
||||
|
||||
<dt><b>pthread_attr_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used to identify a thread attribute object. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>pthread_barrier_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('BAR')">BAR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used to identify a barrier. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>pthread_barrierattr_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('BAR')">BAR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used to define a barrier attributes object. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>pthread_cond_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used for condition variables. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>pthread_condattr_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used to identify a condition attribute object. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>pthread_key_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used for thread-specific data keys. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>pthread_mutex_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used for mutexes. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>pthread_mutexattr_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used to identify a mutex attribute object. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>pthread_once_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used for dynamic package initialization. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>pthread_rwlock_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used for read-write locks. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>pthread_rwlockattr_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used for read-write lock attributes. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>pthread_spinlock_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('SPI')">SPI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used to identify a spin lock. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>pthread_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used to identify a thread. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>size_t</b></dt>
|
||||
|
||||
<dd>Used for sizes of objects.</dd>
|
||||
|
||||
<dt><b>ssize_t</b></dt>
|
||||
|
||||
<dd>Used for a count of bytes or an error indication.</dd>
|
||||
|
||||
<dt><b>suseconds_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used for time in microseconds. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>time_t</b></dt>
|
||||
|
||||
<dd>Used for time in seconds.</dd>
|
||||
|
||||
<dt><b>timer_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('TMR')">TMR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used for timer ID returned by <a href="../../functions/timer_create.html"><i>timer_create</i>()</a>. <img src=
|
||||
"../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>trace_attr_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used to identify a trace stream attributes object. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>trace_event_id_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used to identify a trace event type. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>trace_event_set_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('TRC TEF')">TRC TEF</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]"
|
||||
border="0"> Used to identify a trace event type set. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>trace_id_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used to identify a trace stream. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt><b>uid_t</b></dt>
|
||||
|
||||
<dd>Used for user IDs.</dd>
|
||||
|
||||
<dt><b>useconds_t</b></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> Used for time in microseconds. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
</dl>
|
||||
|
||||
<p>All of the types shall be defined as arithmetic types of an appropriate length, with the following exceptions:</p>
|
||||
|
||||
<p><br>
|
||||
<sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"><br>
|
||||
<b>key_t</b><br>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
||||
<sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"><br>
|
||||
<b>pthread_attr_t</b><br>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
||||
<sup>[<a href="javascript:open_code('BAR')">BAR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"><br>
|
||||
<b>pthread_barrier_t</b><br>
|
||||
<b>pthread_barrierattr_t</b><br>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
||||
<sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"><br>
|
||||
<b>pthread_cond_t</b><br>
|
||||
<b>pthread_condattr_t</b><br>
|
||||
<b>pthread_key_t</b><br>
|
||||
<b>pthread_mutex_t</b><br>
|
||||
<b>pthread_mutexattr_t</b><br>
|
||||
<b>pthread_once_t</b><br>
|
||||
<b>pthread_rwlock_t</b><br>
|
||||
<b>pthread_rwlockattr_t</b><br>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
||||
<sup>[<a href="javascript:open_code('SPI')">SPI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"><br>
|
||||
<b>pthread_spinlock_t</b><br>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
||||
<sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"><br>
|
||||
<b>trace_attr_t</b><br>
|
||||
<b>trace_event_id_t</b><br>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
||||
<sup>[<a href="javascript:open_code('TRC TEF')">TRC TEF</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]"
|
||||
border="0"><br>
|
||||
<b>trace_event_set_t</b><br>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
||||
<sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"><br>
|
||||
<b>trace_id_t</b><br>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
||||
</p>
|
||||
|
||||
<p>Additionally:</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p><b>mode_t</b> shall be an integer type.</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p><b>nlink_t</b>, <b>uid_t</b>, <b>gid_t</b>, and <b>id_t</b> shall be integer types.</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p><b>blkcnt_t</b> and <b>off_t</b> shall be signed integer types.</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> <b>fsblkcnt_t</b>, <b>fsfilcnt_t</b>, <img src="../../images/opt-end.gif" alt="[Option End]" border="0"> and
|
||||
<b>ino_t</b> shall be defined as unsigned integer types.</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p><b>size_t</b> shall be an unsigned integer type.</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p><b>blksize_t</b>, <b>pid_t</b>, and <b>ssize_t</b> shall be signed integer types.</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p><b>time_t</b> and <b>clock_t</b> shall be integer or real-floating types.</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>The type <b>ssize_t</b> shall be capable of storing values at least in the range [-1, {SSIZE_MAX}]. <sup>[<a href=
|
||||
"javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border="0"> The type
|
||||
<b>useconds_t</b> shall be an unsigned integer type capable of storing values at least in the range [0, 1000000]. The type
|
||||
<b>suseconds_t</b> shall be a signed integer type capable of storing values at least in the range [-1, 1000000]. <img src=
|
||||
"../../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
||||
|
||||
<p>The implementation shall support one or more programming environments in which the widths of <b>blksize_t</b>, <b>pid_t</b>,
|
||||
<b>size_t</b>, <b>ssize_t</b>, <b>suseconds_t</b>, and <b>useconds_t</b> are no greater than the width of type <b>long</b>. The
|
||||
names of these programming environments can be obtained using the <a href="../../functions/confstr.html"><i>confstr</i>()</a>
|
||||
function or the <a href="../../utilities/getconf.html"><i>getconf</i></a> utility.</p>
|
||||
|
||||
<p>There are no defined comparison or assignment operators for the following types:</p>
|
||||
|
||||
<p><br>
|
||||
<sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"><br>
|
||||
<b>pthread_attr_t</b><br>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
||||
<sup>[<a href="javascript:open_code('BAR')">BAR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"><br>
|
||||
<b>pthread_barrier_t</b><br>
|
||||
<b>pthread_barrierattr_t</b><br>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
||||
<sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"><br>
|
||||
<b>pthread_cond_t</b><br>
|
||||
<b>pthread_condattr_t</b><br>
|
||||
<b>pthread_mutex_t</b><br>
|
||||
<b>pthread_mutexattr_t</b><br>
|
||||
<b>pthread_rwlock_t</b><br>
|
||||
<b>pthread_rwlockattr_t</b><br>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
||||
<sup>[<a href="javascript:open_code('SPI')">SPI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"><br>
|
||||
<b>pthread_spinlock_t</b><br>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
||||
<sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"><br>
|
||||
<b>trace_attr_t</b><br>
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
||||
</p>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_67_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_67_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_67_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_67_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="time.h.html"><i><time.h></i></a> , the System Interfaces volume of IEEE Std 1003.1-2001, <a href=
|
||||
"../../functions/confstr.html"><i>confstr</i>()</a>, the Shell and Utilities volume of IEEE Std 1003.1-2001, <a href=
|
||||
"../../utilities/getconf.html"><i>getconf</i></a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_67_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 1. Derived from Issue 1 of the SVID.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_67_09"></a>Issue 5</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <b>clockid_t</b> and <b>timer_t</b> types are defined for alignment with the POSIX Realtime Extension.</p>
|
||||
|
||||
<p>The types <b>blkcnt_t</b>, <b>blksize_t</b>, <b>fsblkcnt_t</b>, <b>fsfilcnt_t</b>, and <b>suseconds_t</b> are added.</p>
|
||||
|
||||
<p>Large File System extensions are added.</p>
|
||||
|
||||
<p>Updated for alignment with the POSIX Threads Extension.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_67_10"></a>Issue 6</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <b>pthread_barrier_t</b>, <b>pthread_barrierattr_t</b>, and <b>pthread_spinlock_t</b> types are added for alignment with
|
||||
IEEE Std 1003.1j-2000.</p>
|
||||
|
||||
<p>The margin code is changed from XSI to THR for the <b>pthread_rwlock_t</b> and <b>pthread_rwlockattr_t</b> types as Read-Write
|
||||
Locks have been absorbed into the POSIX Threads option. The threads types are marked THR.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
119
study/Ref-docs/POSIX/susv3/basedefs/sys/uio.h.html
Normal file
119
study/Ref-docs/POSIX/susv3/basedefs/sys/uio.h.html
Normal file
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/uio.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/uio.h>"></a> <a name="tag_13_68"></a><!-- <sys/uio.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_68_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/uio.h - definitions for vector I/O operations</blockquote>
|
||||
|
||||
<h4><a name="tag_13_68_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<div class="box"><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt=
|
||||
"[Option Start]" border="0"> #include <sys/uio.h> <img src="../../images/opt-end.gif" alt="[Option End]" border=
|
||||
"0"></tt></div>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_68_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/uio.h></i> header shall define the <b>iovec</b> structure that includes at least the following members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>void *iov_base </tt> Base address of a memory region for input or output. <tt>
|
||||
size_t iov_len </tt> The size of the memory pointed to by <i>iov_base.</i> <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <i><sys/uio.h></i> header uses the <b>iovec</b> structure for scatter/gather I/O.</p>
|
||||
|
||||
<p>The <b>ssize_t</b> and <b>size_t</b> types shall be defined as described in <a href=
|
||||
"../../basedefs/sys/types.h.html"><i><sys/types.h></i></a>.</p>
|
||||
|
||||
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt>ssize_t readv(int, const struct iovec *, int);
|
||||
ssize_t writev(int, const struct iovec *, int);
|
||||
</tt>
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_68_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The implementation can put a limit on the number of scatter/gather elements which can be processed in one call. The symbol
|
||||
{IOV_MAX} defined in <a href="../../basedefs/limits.h.html"><i><limits.h></i></a> should always be used to learn about the
|
||||
limits instead of assuming a fixed value.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_68_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>Traditionally, the maximum number of scatter/gather elements the system can process in one call were described by the symbolic
|
||||
value {UIO_MAXIOV}. In IEEE Std 1003.1-2001 this value is replaced by the constant {IOV_MAX} which can be found in <a
|
||||
href="../../basedefs/limits.h.html"><i><limits.h></i></a>.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_68_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_68_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../limits.h.html#tag_13_24"><i><limits.h></i></a> , <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> , the System Interfaces volume of IEEE Std 1003.1-2001, <a
|
||||
href="../../functions/read.html"><i>read</i>()</a>, <a href="../../functions/write.html"><i>write</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_68_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 4, Version 2.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_68_09"></a>Issue 6</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>Text referring to scatter/gather I/O is added to the DESCRIPTION.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
106
study/Ref-docs/POSIX/susv3/basedefs/sys/un.h.html
Normal file
106
study/Ref-docs/POSIX/susv3/basedefs/sys/un.h.html
Normal file
@@ -0,0 +1,106 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/un.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/un.h>"></a> <a name="tag_13_69"></a><!-- <sys/un.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_69_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/un.h - definitions for UNIX domain sockets</blockquote>
|
||||
|
||||
<h4><a name="tag_13_69_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<p><tt>#include <sys/un.h></tt></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_69_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/un.h></i> header shall define the <b>sockaddr_un</b> structure that includes at least the following
|
||||
members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>sa_family_t sun_family </tt> Address family. <tt>
|
||||
char sun_path[] </tt> Socket pathname. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The <b>sockaddr_un</b> structure is used to store addresses for UNIX domain sockets. Values of this type shall be cast by
|
||||
applications to <b>struct sockaddr</b> for use with socket functions.</p>
|
||||
|
||||
<p>The <b>sa_family_t</b> type shall be defined as described in <a href=
|
||||
"../sys/socket.h.html#tag_13_61"><i><sys/socket.h></i></a> .</p>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_69_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The size of <i>sun_path</i> has intentionally been left undefined. This is because different implementations use different
|
||||
sizes. For example, 4.3 BSD uses a size of 108, and 4.4 BSD uses a size of 104. Since most implementations originate from BSD
|
||||
versions, the size is typically in the range 92 to 108.</p>
|
||||
|
||||
<p>Applications should not assume a particular length for <i>sun_path</i> or assume that it can hold {_POSIX_PATH_MAX} characters
|
||||
(255).</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_69_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_69_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_69_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../sys/socket.h.html#tag_13_61"><i><sys/socket.h></i></a> , the System Interfaces volume of
|
||||
IEEE Std 1003.1-2001, <a href="../../functions/bind.html"><i>bind</i>()</a>, <a href=
|
||||
"../../functions/socket.html"><i>socket</i>()</a>, <a href="../../functions/socketpair.html"><i>socketpair</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_69_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 6. Derived from the XNS, Issue 5.2 specification.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
106
study/Ref-docs/POSIX/susv3/basedefs/sys/utsname.h.html
Normal file
106
study/Ref-docs/POSIX/susv3/basedefs/sys/utsname.h.html
Normal file
@@ -0,0 +1,106 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/utsname.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/utsname.h>"></a> <a name="tag_13_70"></a><!-- <sys/utsname.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_70_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/utsname.h - system name structure</blockquote>
|
||||
|
||||
<h4><a name="tag_13_70_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<p><tt>#include <sys/utsname.h></tt></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_70_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/utsname.h></i> header shall define the structure <b>utsname</b> which shall include at least the following
|
||||
members:</p>
|
||||
|
||||
<pre>
|
||||
<tt>char sysname[] </tt> Name of this implementation of the operating system. <tt>
|
||||
char nodename[]</tt> Name of this node within an implementation-defined <tt>
|
||||
</tt> communications network. <tt>
|
||||
char release[] </tt> Current release level of this implementation. <tt>
|
||||
char version[] </tt> Current version level of this release. <tt>
|
||||
char machine[] </tt> Name of the hardware type on which the system is running. <tt>
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>The character arrays are of unspecified size, but the data stored in them shall be terminated by a null byte.</p>
|
||||
|
||||
<p>The following shall be declared as a function and may also be defined as a macro:</p>
|
||||
|
||||
<pre>
|
||||
<tt>int uname(struct utsname *);
|
||||
</tt>
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_70_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_70_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_70_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_70_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The System Interfaces volume of IEEE Std 1003.1-2001, <a href="../../functions/uname.html"><i>uname</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_70_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 1. Derived from Issue 1 of the SVID.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
196
study/Ref-docs/POSIX/susv3/basedefs/sys/wait.h.html
Normal file
196
study/Ref-docs/POSIX/susv3/basedefs/sys/wait.h.html
Normal file
@@ -0,0 +1,196 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title><sys/wait.h></title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../../jscript/dotcode.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="<sys/wait.h>"></a> <a name="tag_13_71"></a><!-- <sys/wait.h> -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_13_71_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>sys/wait.h - declarations for waiting</blockquote>
|
||||
|
||||
<h4><a name="tag_13_71_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<p><tt>#include <sys/wait.h></tt></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_71_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i><sys/wait.h></i> header shall define the following symbolic constants for use with <a href=
|
||||
"../../functions/waitpid.html"><i>waitpid</i>()</a>:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>WNOHANG</dt>
|
||||
|
||||
<dd>Do not hang if no status is available; return immediately.</dd>
|
||||
|
||||
<dt>WUNTRACED</dt>
|
||||
|
||||
<dd>Report status of stopped child process.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <i><sys/wait.h></i> header shall define the following macros for analysis of process status values:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>WEXITSTATUS</dt>
|
||||
|
||||
<dd>Return exit status.</dd>
|
||||
|
||||
<dt>WIFCONTINUED</dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> True if child has been continued. <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
||||
|
||||
<dt>WIFEXITED</dt>
|
||||
|
||||
<dd>True if child exited normally.</dd>
|
||||
|
||||
<dt>WIFSIGNALED</dt>
|
||||
|
||||
<dd>True if child exited due to uncaught signal.</dd>
|
||||
|
||||
<dt>WIFSTOPPED</dt>
|
||||
|
||||
<dd>True if child is currently stopped.</dd>
|
||||
|
||||
<dt>WSTOPSIG</dt>
|
||||
|
||||
<dd>Return signal number that caused process to stop.</dd>
|
||||
|
||||
<dt>WTERMSIG</dt>
|
||||
|
||||
<dd>Return signal number that caused process to terminate.</dd>
|
||||
</dl>
|
||||
|
||||
<p><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> The following symbolic constants shall be defined as possible values for the <i>options</i> argument to <a href=
|
||||
"../../functions/waitid.html"><i>waitid</i>()</a>:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>WEXITED</dt>
|
||||
|
||||
<dd>Wait for processes that have exited.</dd>
|
||||
|
||||
<dt>WSTOPPED</dt>
|
||||
|
||||
<dd>Status is returned for any child that has stopped upon receipt of a signal.</dd>
|
||||
|
||||
<dt>WCONTINUED</dt>
|
||||
|
||||
<dd>Status is returned for any child that was stopped and has been continued.</dd>
|
||||
|
||||
<dt>WNOHANG</dt>
|
||||
|
||||
<dd>Return immediately if there are no children to wait for.</dd>
|
||||
|
||||
<dt>WNOWAIT</dt>
|
||||
|
||||
<dd>Keep the process whose status is returned in <i>infop</i> in a waitable state.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The type <b>idtype_t</b> shall be defined as an enumeration type whose possible values shall include at least the following:
|
||||
P_ALL P_PID P_PGID <img src="../../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
||||
|
||||
<p>The <b>id_t</b> and <b>pid_t</b> types shall be defined as described in <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> .</p>
|
||||
|
||||
<p><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../../images/opt-start.gif" alt="[Option Start]" border=
|
||||
"0"> The <b>siginfo_t</b> type shall be defined as described in <a href="../signal.h.html#tag_13_43"><i><signal.h></i></a>
|
||||
.</p>
|
||||
|
||||
<p>The <b>rusage</b> structure shall be defined as described in <a href=
|
||||
"../sys/resource.h.html#tag_13_57"><i><sys/resource.h></i></a> .</p>
|
||||
|
||||
<p>Inclusion of the <i><sys/wait.h></i> header may also make visible all symbols from <a href=
|
||||
"../../basedefs/signal.h.html"><i><signal.h></i></a> and <a href=
|
||||
"../../basedefs/sys/resource.h.html"><i><sys/resource.h></i></a>. <img src="../../images/opt-end.gif" alt="[Option End]"
|
||||
border="0"></p>
|
||||
|
||||
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
|
||||
|
||||
<pre>
|
||||
<tt>pid_t wait(int *);
|
||||
<sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup><img src="../../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
int waitid(idtype_t, id_t, siginfo_t *, int);
|
||||
<img src="../../images/opt-end.gif" alt="[Option End]" border="0">
|
||||
pid_t waitpid(pid_t, int *, int);
|
||||
</tt>
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_13_71_04"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_71_05"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_71_06"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_71_07"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="../signal.h.html#tag_13_43"><i><signal.h></i></a> , <a href=
|
||||
"../sys/resource.h.html#tag_13_57"><i><sys/resource.h></i></a> , <a href=
|
||||
"../sys/types.h.html#tag_13_67"><i><sys/types.h></i></a> , the System Interfaces volume of IEEE Std 1003.1-2001, <a
|
||||
href="../../functions/wait.html"><i>wait</i>()</a>, <a href="../../functions/waitid.html"><i>waitid</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_71_08"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 3.</p>
|
||||
|
||||
<p>Included for alignment with the POSIX.1-1988 standard.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_13_71_09"></a>Issue 6</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i>wait3</i>() function is removed.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../../mindex.html">Main Index</a> | <a href="../../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../../utilities/contents.html">XCU</a> | <a href="../../functions/contents.html">XSH</a> | <a href=
|
||||
"../../xrat/contents.html">XRAT</a> ]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user