55 lines
2.1 KiB
HTML
55 lines
2.1 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
||
|
<title>Read/write locks are recursive</title>
|
||
|
<!-- Begin Header Records ========================================== -->
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<!-- Change History: -->
|
||
|
<!-- YYMMDD USERID Change description -->
|
||
|
<!-- NETMG2 SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
|
||
|
<!-- RCHVMW2 on 29 Jan 1999 at 10:01:37 -->
|
||
|
<!--File Edited November 2001 -->
|
||
|
<!--End Header Records -->
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<!-- Java sync-link -->
|
||
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
||
|
</script>
|
||
|
|
||
|
<h2>Read/write locks are recursive</h2>
|
||
|
|
||
|
<p>The i5/OS implementation of read/write locks provides a recursive behavior
|
||
|
not only for shared read locks (as the thread standard specifies), but for
|
||
|
exclusive write locks as well. The following statements apply to read/write
|
||
|
locks on i5/OS:</p>
|
||
|
|
||
|
<ul>
|
||
|
<li>A thread can acquire any number of shared read locks on a read/write lock.
|
||
|
Each successful shared read lock that is acquired must be released by a call to
|
||
|
<strong>pthread_rwlock_unlock()</strong>.</li>
|
||
|
|
||
|
<li>A thread can acquire any number of exclusive write locks on a read/write
|
||
|
lock. Each successful exclusive write lock that is acquired must be released by
|
||
|
a call to <strong>pthread_rwlock_unlock()</strong>.</li>
|
||
|
</ul>
|
||
|
|
||
|
<hr>
|
||
|
<center>
|
||
|
<table cellpadding="2" cellspacing="2">
|
||
|
<tr align="center">
|
||
|
<td valign="middle" align="center">
|
||
|
<a href="rzah4mst.htm">Pthread APIs</a> |
|
||
|
<a href="aplist.htm">APIs by category</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</center>
|
||
|
</body>
|
||
|
</html>
|
||
|
|