/usr/share/doc/libucommon-dev/a00201.html is in libucommon-doc 3.2.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>UCommon: ucommon/platform.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>ucommon/platform.h File Reference</h1>
<p>Various miscelanous platform specific headers and defines.
<a href="#_details">More...</a></p>
<code>#include <<a class="el" href="a00201_source.html">pthread.h</a>></code><br/>
<code>#include <features.h></code><br/>
<code>#include <bits/wordsize.h></code><br/>
<code>#include <stddef.h></code><br/>
<code>#include <bits/types.h></code><br/>
<code>#include <time.h></code><br/>
<code>#include <signal.h></code><br/>
<code>#include <bits/sigcontext.h></code><br/>
<code>#include <bits/pthreadtypes.h></code><br/>
<code>#include <endian.h></code><br/>
<code>#include <bits/sigset.h></code><br/>
<code>#include <sys/types.h></code><br/>
<div class="dynheader">
Include dependency graph for platform.h:</div>
<div class="dynsection">
<div class="center"><img src="a00259.png" border="0" usemap="#ucommon_2platform_8h_map" alt=""/></div>
</div>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dynsection">
<div class="center"><img src="a00260.png" border="0" usemap="#ucommon_2platform_8hdep_map" alt=""/></div>
<map name="ucommon_2platform_8hdep_map" id="ucommon_2platform_8hdep">
<area shape="rect" id="node4" href="a00185.html" title="Locking classes for member function automatic operations." alt="" coords="2221,237,2367,267"/><area shape="rect" id="node7" href="a00187.html" title="This is the GNU telephonic audio library for the GNU uCommon C++ framework." alt="" coords="2106,624,2245,653"/><area shape="rect" id="node10" href="a00208.html" title="Thread classes and sychronization objects." alt="" coords="1454,315,1598,344"/><area shape="rect" id="node13" href="a00193.html" title="Thread-aware file system manipulation class." alt="" coords="1799,392,1927,421"/><area shape="rect" id="node16" href="a00189.html" title="A common buffered I/O class is used to stream character data without need for stdlib..." alt="" coords="1847,469,1986,499"/><area shape="rect" id="node22" href="a00210.html" title="Top level include file for the GNU uCommon C++ core library." alt="" coords="837,624,1005,653"/><area shape="rect" id="node24" href="a00202.html" title="This library holds the ucommon scripting engine code." alt="" coords="353,701,491,731"/><area shape="rect" id="node26" href="a00203.html" title="This library holds basic crytographic functions and secure socket support for use..." alt="" coords="930,701,1077,731"/><area shape="rect" id="node42" href="a00186.html" title="Atomic pointers and locks." alt="" coords="383,160,530,189"/><area shape="rect" id="node46" href="a00188.html" title="A simple class to perform bitmap manipulation." alt="" coords="605,160,751,189"/><area shape="rect" id="node50" href="a00190.html" title="Support for various automatic counting objects." alt="" coords="45,83,194,112"/><area shape="rect" id="node53" href="a00191.html" title="Basic classes for manipulating time and date based data, particularly that may be..." alt="" coords="269,469,429,499"/><area shape="rect" id="node57" href="a00194.html" title="Parsing of config files that have keyword/value pairs." alt="" coords="757,315,911,344"/><area shape="rect" id="node60" href="a00195.html" title="Linked objects, lists, templates, and containers." alt="" coords="981,160,1119,189"/><area shape="rect" id="node65" href="a00197.html" title="Private heaps, pools, and associations." alt="" coords="1306,237,1461,267"/><area shape="rect" id="node103" href="a00198.html" title="Support classes for manipulation of numbers as strings." alt="" coords="319,392,479,421"/><area shape="rect" id="node108" href="a00199.html" title="A common object base class with auto-pointer support." alt="" coords="838,83,979,112"/><area shape="rect" id="node113" href="a00200.html" title="The GNU Common C++ persistance engine by Daniel Silverstone." alt="" coords="531,83,678,112"/><area shape="rect" id="node29" href="a00206.html" title="Any ucommon streaming classes that are built from std::streamio facilities and that..." alt="" coords="1623,469,1773,499"/><area shape="rect" id="node33" href="a00196.html" title="Support for memory mapped objects." alt="" coords="1191,469,1346,499"/><area shape="rect" id="node38" href="a00212.html" title="Basic array and reusable object factory heap support." alt="" coords="1437,547,1578,576"/><area shape="rect" id="node19" href="a00204.html" title="Generic shell parsing and application services." alt="" coords="1855,547,1986,576"/><area shape="rect" id="node87" href="a00205.html" title="Common socket class and address manipulation." alt="" coords="1151,315,1295,344"/><area shape="rect" id="node94" href="a00209.html" title="Realtime timers and timer queues." alt="" coords="1138,237,1282,267"/><area shape="rect" id="node70" href="a00207.html" title="A common string class and character string support functions." alt="" coords="1133,392,1271,421"/><area shape="rect" id="node79" href="a00211.html" title="Basic UCommon Unicode support." alt="" coords="1109,547,1261,576"/><area shape="rect" id="node82" href="a00213.html" title="XML "SAX" (stream) parsing support from GNU Common C++." alt="" coords="909,547,1034,576"/></map>
</div>
<p><a href="a00201_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Namespaces</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">namespace </td><td class="memItemRight" valign="bottom"><a class="el" href="a00214.html">ucc</a></td></tr>
<p><tr><td class="mdescLeft"> </td><td class="mdescRight"><p>Common namespace for all ucommon objects. </p>
<br/></td></tr>
</p>
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad10ef148ba8327bd530fc6c32c1e181c"></a><!-- doxytag: member="platform.h::__EXPORT" ref="ad10ef148ba8327bd530fc6c32c1e181c" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>__EXPORT</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ed18cba305b6aa05dbdacdada3db4df"></a><!-- doxytag: member="platform.h::__LOCAL" ref="a5ed18cba305b6aa05dbdacdada3db4df" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>__LOCAL</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aca890f63cdea692ad06a46c1745b9601"></a><!-- doxytag: member="platform.h::__MALLOC" ref="aca890f63cdea692ad06a46c1745b9601" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>__MALLOC</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4aee2a17d54e97aad863f89aeec81370"></a><!-- doxytag: member="platform.h::__PRINTF" ref="a4aee2a17d54e97aad863f89aeec81370" args="(x, y)" -->
#define </td><td class="memItemRight" valign="bottom"><b>__PRINTF</b>(x, y)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8ea98d56fe3aecbf554d3feaccf6ece9"></a><!-- doxytag: member="platform.h::__SCANF" ref="a8ea98d56fe3aecbf554d3feaccf6ece9" args="(x, y)" -->
#define </td><td class="memItemRight" valign="bottom"><b>__SCANF</b>(x, y)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad44924736167f82a10ae2891fc98a608"></a><!-- doxytag: member="platform.h::_POSIX_PTHREAD_SEMANTICS" ref="ad44924736167f82a10ae2891fc98a608" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>_POSIX_PTHREAD_SEMANTICS</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a443747bad6a2c99b390ad3b41496e860"></a><!-- doxytag: member="platform.h::_THREADSAFE" ref="a443747bad6a2c99b390ad3b41496e860" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>_THREADSAFE</b> 1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a24d2d71eea325f5251ed56373cc83efd"></a><!-- doxytag: member="platform.h::_UCOMMON_EXTENDED_" ref="a24d2d71eea325f5251ed56373cc83efd" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>_UCOMMON_EXTENDED_</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aed2dc2ccf257c8305725af7d5fc471e5"></a><!-- doxytag: member="platform.h::crit" ref="aed2dc2ccf257c8305725af7d5fc471e5" args="(x, text)" -->
#define </td><td class="memItemRight" valign="bottom"><b>crit</b>(x, text) if(!(x)) cpr_runtime_error(text)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a28886d59fbdc2dccd82cc4887e967d0d"></a><!-- doxytag: member="platform.h::END_NAMESPACE" ref="a28886d59fbdc2dccd82cc4887e967d0d" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>END_NAMESPACE</b> }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5fdc7facea201bfce4ad308105f88d0c"></a><!-- doxytag: member="platform.h::INVALID_HANDLE_VALUE" ref="a5fdc7facea201bfce4ad308105f88d0c" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>INVALID_HANDLE_VALUE</b> -1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a26769957ec1a2beaf223f33b66ee64ab"></a><!-- doxytag: member="platform.h::INVALID_SOCKET" ref="a26769957ec1a2beaf223f33b66ee64ab" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>INVALID_SOCKET</b> -1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a453fa17a6ece9c8d96c6312c2e333dd9"></a><!-- doxytag: member="platform.h::NAMESPACE_UCOMMON" ref="a453fa17a6ece9c8d96c6312c2e333dd9" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>NAMESPACE_UCOMMON</b> namespace ucc {</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8de3ed741dadc9c979a4ff17c0a9116e"></a><!-- doxytag: member="platform.h::NDEBUG" ref="a8de3ed741dadc9c979a4ff17c0a9116e" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>NDEBUG</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abe6604c42dad18d6d9ec76a270ef850d"></a><!-- doxytag: member="platform.h::UCOMMON_ABI" ref="abe6604c42dad18d6d9ec76a270ef850d" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>UCOMMON_ABI</b> 3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6e4fce0fa13b36f8b31f4d56111b0a44"></a><!-- doxytag: member="platform.h::UCOMMON_NAMESPACE" ref="a6e4fce0fa13b36f8b31f4d56111b0a44" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>UCOMMON_NAMESPACE</b> ucc</td></tr>
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1540dca57d43779772b9c10fc2f17f83"></a><!-- doxytag: member="platform.h::fd_t" ref="a1540dca57d43779772b9c10fc2f17f83" args="" -->
typedef int </td><td class="memItemRight" valign="bottom"><b>fd_t</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="a00201.html#a564498016effaee1f3384e07b7ced24f">sighandler_t</a> )(int)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convenient typedef for signal handlers. <a href="#a564498016effaee1f3384e07b7ced24f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a30353f381f5fccbb956eea1f3a110b6c"></a><!-- doxytag: member="platform.h::socket_t" ref="a30353f381f5fccbb956eea1f3a110b6c" args="" -->
typedef int </td><td class="memItemRight" valign="bottom"><b>socket_t</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Typedef for millisecond timer values. <a href="#af412159e5cef839836a5e7b19ee75d1c"></a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00201.html#aec6d33ffff1d527a4f54ec7d94787a27">cpr_memalloc</a> (size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Portable memory allocation helper function. <a href="#aec6d33ffff1d527a4f54ec7d94787a27"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00201.html#a4f34bef5a6063f977cf3b41e6d7db116">cpr_memassign</a> (size_t size, caddr_t address, size_t known)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Portable memory placement helper function. <a href="#a4f34bef5a6063f977cf3b41e6d7db116"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00201.html#a4880da985609d497e8ddb71652ca1e33">cpr_memswap</a> (void *mem1, void *mem2, size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Portable swap code. <a href="#a4880da985609d497e8ddb71652ca1e33"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00201.html#a873d0643afa826c6af4071f189005015">cpr_runtime_error</a> (const char *text)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to handle runtime errors. <a href="#a873d0643afa826c6af4071f189005015"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template<class T > </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">T * </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00201.html#a5fc126f9a4406cb2d0d054488cf00809">init</a> (T *memory)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Template function to initialize memory by invoking default constructor. <a href="#a5fc126f9a4406cb2d0d054488cf00809"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc9e88b75cd2a5f1031bfd07840049cc"></a><!-- doxytag: member="platform.h::lsb_getlong" ref="afc9e88b75cd2a5f1031bfd07840049cc" args="(uint8_t *b)" -->
uint32_t </td><td class="memItemRight" valign="bottom"><b>lsb_getlong</b> (uint8_t *b)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8790a4aef4c019a4047f1448180522ee"></a><!-- doxytag: member="platform.h::lsb_getshort" ref="a8790a4aef4c019a4047f1448180522ee" args="(uint8_t *b)" -->
uint16_t </td><td class="memItemRight" valign="bottom"><b>lsb_getshort</b> (uint8_t *b)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a458254936d4ad346438ca2d04e03c94c"></a><!-- doxytag: member="platform.h::lsb_setlong" ref="a458254936d4ad346438ca2d04e03c94c" args="(uint8_t *b, uint32_t v)" -->
void </td><td class="memItemRight" valign="bottom"><b>lsb_setlong</b> (uint8_t *b, uint32_t v)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8aa5331fca6fa075085f526eb51d4bc7"></a><!-- doxytag: member="platform.h::lsb_setshort" ref="a8aa5331fca6fa075085f526eb51d4bc7" args="(uint8_t *b, uint16_t v)" -->
void </td><td class="memItemRight" valign="bottom"><b>lsb_setshort</b> (uint8_t *b, uint16_t v)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5489c1da20ad993afcbd7a53dbb61ac1"></a><!-- doxytag: member="platform.h::msb_getlong" ref="a5489c1da20ad993afcbd7a53dbb61ac1" args="(uint8_t *b)" -->
uint32_t </td><td class="memItemRight" valign="bottom"><b>msb_getlong</b> (uint8_t *b)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6190a908026c9c8c29556261da527bae"></a><!-- doxytag: member="platform.h::msb_getshort" ref="a6190a908026c9c8c29556261da527bae" args="(uint8_t *b)" -->
uint16_t </td><td class="memItemRight" valign="bottom"><b>msb_getshort</b> (uint8_t *b)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aad07a04ca9c73478552b61bb4e70f473"></a><!-- doxytag: member="platform.h::msb_setlong" ref="aad07a04ca9c73478552b61bb4e70f473" args="(uint8_t *b, uint32_t v)" -->
void </td><td class="memItemRight" valign="bottom"><b>msb_setlong</b> (uint8_t *b, uint32_t v)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4dfb426b2a9be9a8c777ff91e42d6c1d"></a><!-- doxytag: member="platform.h::msb_setshort" ref="a4dfb426b2a9be9a8c777ff91e42d6c1d" args="(uint8_t *b, uint16_t v)" -->
void </td><td class="memItemRight" valign="bottom"><b>msb_setshort</b> (uint8_t *b, uint16_t v)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00201.html#a51dc097f57d77981bcf963b87423e85f">operator new</a> (size_t size, caddr_t address, size_t known)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A placement new operator where we know the allocated size. <a href="#a51dc097f57d77981bcf963b87423e85f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00201.html#accc8c72bfa1e4436b32153e649479690">operator new</a> (size_t size, caddr_t address)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A placement new operator where we assume the size of memory is good. <a href="#accc8c72bfa1e4436b32153e649479690"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00201.html#a2c7ac8dd4bafcd4e8fc240be94321b7a">operator new</a> (size_t size, size_t extra)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Overdraft new to allocate extra memory for object from heap. <a href="#a2c7ac8dd4bafcd4e8fc240be94321b7a"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Various miscelanous platform specific headers and defines. </p>
<p>This is used to support ucommon on different platforms. The ucommon library assumes at least a real posix threading library is present or will build thread support native on Microsoft Windows legacy platform. This header also deals with issues related to common base types. </p>
<p>Definition in file <a class="el" href="a00201_source.html">platform.h</a>.</p>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="a564498016effaee1f3384e07b7ced24f"></a><!-- doxytag: member="platform.h::sighandler_t" ref="a564498016effaee1f3384e07b7ced24f" args=")(int)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* <a class="el" href="a00201.html#a564498016effaee1f3384e07b7ced24f">sighandler_t</a>)(int)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Convenient typedef for signal handlers. </p>
<p>Definition at line <a class="el" href="a00201_source.html#l00299">299</a> of file <a class="el" href="a00201_source.html">platform.h</a>.</p>
</div>
</div>
<a class="anchor" id="af412159e5cef839836a5e7b19ee75d1c"></a><!-- doxytag: member="platform.h::timeout_t" ref="af412159e5cef839836a5e7b19ee75d1c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef unsigned long <a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Typedef for millisecond timer values. </p>
<p>Definition at line <a class="el" href="a00201_source.html#l00300">300</a> of file <a class="el" href="a00201_source.html">platform.h</a>.</p>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="aec6d33ffff1d527a4f54ec7d94787a27"></a><!-- doxytag: member="platform.h::cpr_memalloc" ref="aec6d33ffff1d527a4f54ec7d94787a27" args="(size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* cpr_memalloc </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Portable memory allocation helper function. </p>
<p>Handles out of heap error as a runtime error. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of memory block to allocate from heap. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>memory address of allocated heap space. </dd></dl>
</div>
</div>
<a class="anchor" id="a4f34bef5a6063f977cf3b41e6d7db116"></a><!-- doxytag: member="platform.h::cpr_memassign" ref="a4f34bef5a6063f977cf3b41e6d7db116" args="(size_t size, caddr_t address, size_t known)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* cpr_memassign </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">caddr_t </td>
<td class="paramname"> <em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>known</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Portable memory placement helper function. </p>
<p>This is used to process "placement" new operators where a new object is constructed over a pre-allocated area of memory. This handles invalid values through runtime error. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of object being constructed. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>where the object is being placed. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>known</em> </td><td>size of the location we are constructing the object in. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a4880da985609d497e8ddb71652ca1e33"></a><!-- doxytag: member="platform.h::cpr_memswap" ref="a4880da985609d497e8ddb71652ca1e33" args="(void *mem1, void *mem2, size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cpr_memswap </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>mem1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>mem2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Portable swap code. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>mem1</em> </td><td>to swap. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>mem2</em> </td><td>to swap. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of swap area. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a873d0643afa826c6af4071f189005015"></a><!-- doxytag: member="platform.h::cpr_runtime_error" ref="a873d0643afa826c6af4071f189005015" args="(const char *text)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cpr_runtime_error </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>text</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Function to handle runtime errors. </p>
<p>When using the standard C library, runtime errors are handled by a simple abort. When using the stdc++ library with stdexcept, then std::runtime_error will be thrown. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>text</em> </td><td>of runtime error. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a5fc126f9a4406cb2d0d054488cf00809"></a><!-- doxytag: member="platform.h::init" ref="a5fc126f9a4406cb2d0d054488cf00809" args="(T *memory)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<class T > </div>
<table class="memname">
<tr>
<td class="memname">T* init </td>
<td>(</td>
<td class="paramtype">T * </td>
<td class="paramname"> <em>memory</em></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Template function to initialize memory by invoking default constructor. </p>
<p>If NULL is passed, then NULL is returned without any constructor called. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>memory</em> </td><td>to initialize. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>memory initialized. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="a00008.html#a0">cipher.cpp</a>, <a class="el" href="a00005.html#a0">script.cpp</a>, and <a class="el" href="a00006.html#a0">ssl.cpp</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="a00201_source.html#l00516">516</a> of file <a class="el" href="a00201_source.html">platform.h</a>.</p>
</div>
</div>
<a class="anchor" id="a51dc097f57d77981bcf963b87423e85f"></a><!-- doxytag: member="platform.h::operator new" ref="a51dc097f57d77981bcf963b87423e85f" args="(size_t size, caddr_t address, size_t known)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* operator new </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">caddr_t </td>
<td class="paramname"> <em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>known</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A placement new operator where we know the allocated size. </p>
<p>We find out how much memory is needed by the new and can prevent the object from exceeding the available space we are placing the object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of memory needed for object. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>where to place object. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>known</em> </td><td>size of location we are placing object. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>memory we placed object. </dd></dl>
<p>Definition at line <a class="el" href="a00201_source.html#l00467">467</a> of file <a class="el" href="a00201_source.html">platform.h</a>.</p>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="a00201_a51dc097f57d77981bcf963b87423e85f_cgraph.png" border="0" usemap="#a00201_a51dc097f57d77981bcf963b87423e85f_cgraph_map" alt=""></div>
<map name="a00201_a51dc097f57d77981bcf963b87423e85f_cgraph_map" id="a00201_a51dc097f57d77981bcf963b87423e85f_cgraph">
<area shape="rect" id="node3" href="a00201.html#a4f34bef5a6063f977cf3b41e6d7db116" title="Portable memory placement helper function." alt="" coords="161,5,284,35"/></map>
</div>
</p>
</div>
</div>
<a class="anchor" id="accc8c72bfa1e4436b32153e649479690"></a><!-- doxytag: member="platform.h::operator new" ref="accc8c72bfa1e4436b32153e649479690" args="(size_t size, caddr_t address)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* operator new </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">caddr_t </td>
<td class="paramname"> <em>address</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A placement new operator where we assume the size of memory is good. </p>
<p>We construct the object at a specified place in memory which we assume is valid for our needs. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of memory needed for object. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>where to place object. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>memory we placed object. </dd></dl>
<p>Definition at line <a class="el" href="a00201_source.html#l00454">454</a> of file <a class="el" href="a00201_source.html">platform.h</a>.</p>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="a00201_accc8c72bfa1e4436b32153e649479690_cgraph.png" border="0" usemap="#a00201_accc8c72bfa1e4436b32153e649479690_cgraph_map" alt=""></div>
<map name="a00201_accc8c72bfa1e4436b32153e649479690_cgraph_map" id="a00201_accc8c72bfa1e4436b32153e649479690_cgraph">
<area shape="rect" id="node3" href="a00201.html#a4f34bef5a6063f977cf3b41e6d7db116" title="Portable memory placement helper function." alt="" coords="161,5,284,35"/></map>
</div>
</p>
</div>
</div>
<a class="anchor" id="a2c7ac8dd4bafcd4e8fc240be94321b7a"></a><!-- doxytag: member="platform.h::operator new" ref="a2c7ac8dd4bafcd4e8fc240be94321b7a" args="(size_t size, size_t extra)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* operator new </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>extra</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Overdraft new to allocate extra memory for object from heap. </p>
<p>This is used for objects that must have a known class size but store extra data behind the class. The last member might be an unsized or 0 element array, and the actual size needed from the heap is hence not the size of the class itself but is known by the routine allocating the object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of object. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>extra</em> </td><td>heap space needed for data. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="a00201_source.html#l00443">443</a> of file <a class="el" href="a00201_source.html">platform.h</a>.</p>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="a00201_a2c7ac8dd4bafcd4e8fc240be94321b7a_cgraph.png" border="0" usemap="#a00201_a2c7ac8dd4bafcd4e8fc240be94321b7a_cgraph_map" alt=""></div>
<map name="a00201_a2c7ac8dd4bafcd4e8fc240be94321b7a_cgraph_map" id="a00201_a2c7ac8dd4bafcd4e8fc240be94321b7a_cgraph">
<area shape="rect" id="node3" href="a00201.html#aec6d33ffff1d527a4f54ec7d94787a27" title="Portable memory allocation helper function." alt="" coords="160,5,272,35"/></map>
</div>
</p>
</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:10 2010 for UCommon by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
|