pthread_delay_np.html 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML>
  3. <HEAD>
  4. <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
  5. <TITLE>PTHREAD_DELAY_NP manual page</TITLE>
  6. <META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.3 (Linux)">
  7. <META NAME="CREATED" CONTENT="20050505;322600">
  8. <META NAME="CHANGED" CONTENT="20050505;21371500">
  9. <!-- manual page source format generated by PolyglotMan v3.2, -->
  10. <!-- available at http://polyglotman.sourceforge.net/ -->
  11. </HEAD>
  12. <BODY LANG="en-GB" BGCOLOR="#ffffff" DIR="LTR">
  13. <H4>POSIX Threads for Windows – REFERENCE - <A HREF="http://sources.redhat.com/pthreads-win32">Pthreads-w32</A></H4>
  14. <P><A HREF="index.html">Reference Index</A></P>
  15. <P><A HREF="#toc">Table of Contents</A></P>
  16. <H2><A HREF="#toc0" NAME="sect0">Name</A></H2>
  17. <P STYLE="font-weight: medium">pthread_delay_np – suspend the
  18. thread for a specified period</P>
  19. <H2><A HREF="#toc1" NAME="sect1">Synopsis</A></H2>
  20. <P><B>#include &lt;pthread.h&gt;</B>
  21. </P>
  22. <P><B>int pthread_delay_np (const struct timespec *</B>interval<B>);</B></P>
  23. <H2><A HREF="#toc2" NAME="sect2">Description</A></H2>
  24. <P><B>pthread_delay_np</B> causes a thread to delay execution for a
  25. specific period of time. This period ends at the current time plus
  26. the specified interval. The routine will not return before the end of
  27. the period is reached, but may return an arbitrary amount of time
  28. after the period has gone by. This can be due to system load, thread
  29. priorities, and system timer granularity.</P>
  30. <P>Specifying an interval of zero (0) seconds and zero (0)
  31. nanoseconds is allowed and can be used to force the thread to give up
  32. the processor or to deliver a pending cancellation request.</P>
  33. <H2><A HREF="#toc3" NAME="sect3">Cancellation</A></H2>
  34. <P><B>pthread_delay_np </B>is a cancellation point.</P>
  35. <H2><A HREF="#toc4" NAME="sect4">Return Value</A></H2>
  36. <P>If an error condition occurs, <B>pthread_delay_np</B> returns an
  37. integer value indicating the type of error.</P>
  38. <H2><A HREF="#toc5" NAME="sect5">Errors</A></H2>
  39. <P>The <B>pthread_delay_np</B> function returns the following error
  40. code on error:
  41. </P>
  42. <DL>
  43. <DL>
  44. <DT STYLE="margin-right: 1cm; margin-bottom: 0.5cm"><B>EINVAL</B>
  45. </DT></DL>
  46. </DL>
  47. <P STYLE="margin-left: 2cm">
  48. The value specified by interval is invalid.</P>
  49. <H2><A HREF="#toc6" NAME="sect6">Author</A></H2>
  50. <P>Ross Johnson for use with <A HREF="http://sources.redhat.com/pthreads-win32">Pthreads-w32</A>.</P>
  51. <HR>
  52. <P><A NAME="toc"></A><B>Table of Contents</B></P>
  53. <UL>
  54. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect0" NAME="toc0">Name</A>
  55. </P>
  56. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect1" NAME="toc1">Synopsis</A>
  57. </P>
  58. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect2" NAME="toc2">Description</A>
  59. </P>
  60. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect3" NAME="toc3">Cancellation</A>
  61. </P>
  62. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect4" NAME="toc4">Return
  63. Value</A>
  64. </P>
  65. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect5" NAME="toc5">Errors</A>
  66. </P>
  67. <LI><P><A HREF="#sect6" NAME="toc6">Author</A>
  68. </P>
  69. </UL>
  70. </BODY>
  71. </HTML>