| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 | <title>db_env_set_func_pwrite</title> |
| 7 | <link rel="stylesheet" href="apiReference.css" type="text/css" /> |
| 8 | <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> |
| 9 | <link rel="start" href="index.html" title="Berkeley DB C API Reference" /> |
| 10 | <link rel="up" href="setfunc.html" title="Appendix C. Berkeley DB Application Space Static Functions" /> |
| 11 | <link rel="prev" href="db_env_set_func_pread.html" title="db_env_set_func_pread" /> |
| 12 | <link rel="next" href="db_env_set_func_read.html" title="db_env_set_func_read" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">db_env_set_func_pwrite</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="db_env_set_func_pread.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Appendix C. |
| 26 | Berkeley DB Application Space Static Functions |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="db_env_set_func_read.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="sect1" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title" style="clear: both"><a id="db_env_set_func_pwrite"></a>db_env_set_func_pwrite</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <pre class="programlisting">#include <db.h> |
| 42 | |
| 43 | int |
| 44 | db_env_set_func_pwrite(ssize_t (*func_pwrite)(int fd, const void *buf, |
| 45 | size_t nbytes, off_t offset)); </pre> |
| 46 | <p> |
| 47 | Replace Berkeley DB calls to the IEEE/ANSI Std 1003.1 (POSIX) |
| 48 | <span class="bold"><strong>pwrite</strong></span> function with <span class="bold"><strong>func_pwrite</strong></span>, which must conform to the standard |
| 49 | interface specification. |
| 50 | </p> |
| 51 | <p> |
| 52 | The <code class="function">db_env_set_func_pwrite()</code> configures all operations performed |
| 53 | by a process and all of its threads of control, not operations |
| 54 | confined to a single database environment. |
| 55 | </p> |
| 56 | <p> |
| 57 | Although the <code class="function">db_env_set_func_pwrite()</code> may be called at any time |
| 58 | during the life of the application, it should normally be called |
| 59 | before making calls to the <a class="xref" href="envcreate.html" title="db_env_create">db_env_create</a> or |
| 60 | <a class="xref" href="dbcreate.html" title="db_create">db_create</a> methods. |
| 61 | </p> |
| 62 | <p> |
| 63 | The <code class="function">db_env_set_func_pwrite()</code> <span> |
| 64 | function returns a non-zero error value on failure and 0 on success. |
| 65 | </span> |
| 66 | </p> |
| 67 | <div class="sect2" lang="en" xml:lang="en"> |
| 68 | <div class="titlepage"> |
| 69 | <div> |
| 70 | <div> |
| 71 | <h3 class="title"><a id="idp55672232"></a>Parameters</h3> |
| 72 | </div> |
| 73 | </div> |
| 74 | </div> |
| 75 | <div class="sect3" lang="en" xml:lang="en"> |
| 76 | <div class="titlepage"> |
| 77 | <div> |
| 78 | <div> |
| 79 | <h4 class="title"><a id="idp55672424"></a>func_pwrite</h4> |
| 80 | </div> |
| 81 | </div> |
| 82 | </div> |
| 83 | <p> |
| 84 | The <span class="bold"><strong>func_pwrite</strong></span> parameter is the |
| 85 | replacement function. It must conform to the standard interface |
| 86 | specification. |
| 87 | </p> |
| 88 | </div> |
| 89 | </div> |
| 90 | <div class="sect2" lang="en" xml:lang="en"> |
| 91 | <div class="titlepage"> |
| 92 | <div> |
| 93 | <div> |
| 94 | <h3 class="title"><a id="idp55670904"></a>See Also</h3> |
| 95 | </div> |
| 96 | </div> |
| 97 | </div> |
| 98 | <p> |
| 99 | <a href="../../programmer_reference/program_runtime.html" class="olink">Run-time configuration</a> |
| 100 | </p> |
| 101 | </div> |
| 102 | </div> |
| 103 | <div class="navfooter"> |
| 104 | <hr /> |
| 105 | <table width="100%" summary="Navigation footer"> |
| 106 | <tr> |
| 107 | <td width="40%" align="left"><a accesskey="p" href="db_env_set_func_pread.html">Prev</a> </td> |
| 108 | <td width="20%" align="center"> |
| 109 | <a accesskey="u" href="setfunc.html">Up</a> |
| 110 | </td> |
| 111 | <td width="40%" align="right"> <a accesskey="n" href="db_env_set_func_read.html">Next</a></td> |
| 112 | </tr> |
| 113 | <tr> |
| 114 | <td width="40%" align="left" valign="top">db_env_set_func_pread </td> |
| 115 | <td width="20%" align="center"> |
| 116 | <a accesskey="h" href="index.html">Home</a> |
| 117 | </td> |
| 118 | <td width="40%" align="right" valign="top"> db_env_set_func_read</td> |
| 119 | </tr> |
| 120 | </table> |
| 121 | </div> |
| 122 | </body> |
| 123 | </html> |