Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > acb94a8b2a4b1c8c2a966ed9ee99ffe4 > files > 281

lib64wcs-devel-4.18-2.mga4.x86_64.rpm

<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>WCSLIB 4.18: Thread-safety</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">WCSLIB 4.18
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="index.html">WCSLIB 4.18 and PGSBOX 4.18</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Thread-safety </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>With the following exceptions WCSLIB 4.18 is thread-safe:</p>
<ul>
<li>The C code generated by Flex is not re-entrant. Flex does have the capacity for producing re-entrant scanners but they have a different API. This may be handled by a compile-time option in future but in the meantime calls to the header parsers should be serialized via a mutex.</li>
<li>The low-level functions <a class="el" href="wcs_8h.html#a42b2578d76ace7ca6114d82b7ae46a89" title="Memory allocation for PVi_ma. ">wcsnpv()</a> and <a class="el" href="wcs_8h.html#ae790c9ce6c9b7a4845cf1c3c97b1e97a" title="Memory allocation for PSi_ma. ">wcsnps()</a> are not thread-safe but within the library itself they are only used by the Flex scanners <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a>. They would rarely need to be used by application programmers.</li>
<li>Diagnostic functions that print the contents of the various structs, namely <a class="el" href="cel_8h.html#adb2e4565f61a9de5fe278d9035850dc3" title="Print routine for the celprm struct. ">celprt()</a>, <a class="el" href="lin_8h.html#a946005b038f5c584691630b5d39369e3" title="Print routine for the linprm struct. ">linprt()</a>, <a class="el" href="prj_8h.html#a8785bdf33bdaa3d9d52fd51b621ec8d5" title="Print routine for the prjprm struct. ">prjprt()</a>, <a class="el" href="spc_8h.html#a7304d0d00bcf9d2bad1f56ba6d8322ea" title="Print routine for the spcprm struct. ">spcprt()</a>, <a class="el" href="tab_8h.html#a6b3768349e9a5e925aab24effddc584f" title="Print routine for the tabprm struct. ">tabprt()</a>, <a class="el" href="wcs_8h.html#ab9aeb8cf1afb1bfb22e989580d90fca8" title="Print routine for the wcsprm struct. ">wcsprt()</a>, and <a class="el" href="wcs_8h.html#a8fe5dcd9927240dc0348b850ee662367" title="Print error messages from a wcsprm struct. ">wcsperr()</a> use printf() which is thread-safe by the POSIX requirement on <code>stdio</code>. However, this is only at the function level. Where multiple threads invoke these functions simultaneously their output is likely to be interleaved.</li>
<li><a class="el" href="wcserr_8h.html#a1691b8bd184d40ca6fda255be078fa53" title="Enable/disable error messaging. ">wcserr_enable()</a> sets a static variable and so is not thread-safe. However, this facility is not intended to be used dynamically. If detailed error messages are required, enable wcserr when execution starts and don't change it. </li>
</ul>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Jul 13 2013 20:00:27 for WCSLIB 4.18 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>