Changeset 2e83792c in rtems


Ignore:
Timestamp:
Jan 9, 2004, 11:39:14 PM (16 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
35d9b418
Parents:
234f7adb
Message:

2004-01-09 Joel Sherrill <joel@…>

PR 464/doc

  • clock.t, signal.t: Add documentation for usleep() and ualarm(). Also fixed a couple of calls which have the wrong .h files per the OpenGroup? site documentation.
Location:
doc/posix_users
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • doc/posix_users/ChangeLog

    r234f7adb r2e83792c  
     12004-01-09      Joel Sherrill <joel@OARcorp.com>
     2
     3        PR 464/doc
     4        * clock.t, signal.t: Add documentation for usleep() and ualarm(). Also
     5        fixed a couple of calls which have the wrong .h files per the
     6        OpenGroup site documentation.
     7
    182003-12-12      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    29
  • doc/posix_users/clock.t

    r234f7adb r2e83792c  
    1111@section Introduction
    1212
    13 The clock manager ...
     13The clock manager provides services two primary classes
     14of services.  The first focuses on obtaining and setting
     15the current date and time.  The other category of services
     16focus on allowing a thread to delay for a specific length
     17of time.
    1418
    1519The directives provided by the clock manager are:
     
    2024@item @code{clock_getres} - Get Clock Resolution
    2125@item @code{sleep} - Delay Process Execution
     26@item @code{usleep} - Delay Process Execution in Microseconds
    2227@item @code{nanosleep} - Delay with High Resolution
    2328@item @code{gettimeofday} - Get the Time of Day
     
    4045and status codes.
    4146
    42 @subsection clock_gettime -Obtain Time of Day
     47@subsection clock_gettime - Obtain Time of Day
    4348
    4449@findex clock_gettime
     
    167172
    168173@example
    169 #include <time.h>
     174#include <unistd.h>
    170175
    171176unsigned int sleep(
     
    186191
    187192This call is interruptible by a signal.
     193
     194@c
     195@c
     196@c
     197@page
     198@subsection usleep - Delay Process Execution in Microseconds
     199
     200@findex usleep
     201@cindex  delay process execution
     202@cindex  delay process execution
     203@cindex  usecs delay process execution
     204@cindex  microsecond delay process execution
     205
     206@subheading CALLING SEQUENCE:
     207
     208@example
     209#include <time.h>
     210
     211useconds_t usleep(
     212  useconds_t useconds
     213);
     214@end example
     215
     216@subheading STATUS CODES:
     217
     218This routine returns the number of unslept seconds.
     219
     220@subheading DESCRIPTION:
     221
     222The @code{sleep()} function delays the calling thread by the specified
     223number of @code{seconds}.
     224
     225The @code{usleep()} function suspends the calling thread from execution
     226until either the number of microseconds specified by the
     227@code{useconds} argument has elapsed or a signal is delivered to the
     228calling thread and its action is to invoke a signal-catching function
     229or to terminate the process.
     230
     231Because of other activity, or because of the time spent in
     232processing the call, the actual length of time the thread is
     233blocked may be longer than
     234the amount of time specified.
     235
     236@subheading NOTES:
     237
     238This call is interruptible by a signal.
     239
     240The Single UNIX Specification allows this service to be implemented using
     241the same timer as that used by the @code{alarm()} service.  This is
     242@b{NOT} the case for @b{RTEMS} and this call has no interaction with
     243the @code{SIGALRM} signal.
    188244
    189245@c
  • doc/posix_users/signal.t

    r234f7adb r2e83792c  
    3636@item @code{sigqueue} - Queue a Signal to a Process
    3737@item @code{alarm} - Schedule Alarm
     38@item @code{ualarm} - Schedule Alarm in Microseconds
    3839@end itemize
    3940
     
    861862
    862863@example
    863 #include <signal.h>
     864#include <unistd.h>
    864865
    865866unsigned int alarm(
     
    871872
    872873This call always succeeds.
    873 
    874 @subheading DESCRIPTION:
    875874
    876875If there was a previous @code{alarm()} request with time remaining,
     
    879878outstanding, then zero is returned.
    880879
    881 @subheading NOTES:
    882 
    883 NONE
     880@subheading DESCRIPTION:
     881
     882The @code{alarm()} service causes the @code{SIGALRM} signal to
     883be generated after the number of seconds specified by
     884@code{seconds} has elapsed.
     885
     886@subheading NOTES:
     887
     888Alarm requests do not queue.  If @code{alarm} is called while
     889a previous request is outstanding, the call will result in
     890rescheduling the time at which the @code{SIGALRM} signal
     891will be generated.
     892
     893If the notification signal, @code{SIGALRM}, is not caught or ignored, the
     894calling process is terminated.
     895
     896@c
     897@c
     898@c
     899@page
     900@subsection ualarm - Schedule Alarm in Microseconds
     901
     902@findex alarm
     903@findex microseonds alarm
     904@findex usecs alarm
     905@cindex schedule alarm in microseonds
     906
     907@subheading CALLING SEQUENCE:
     908
     909@example
     910#include <unistd.h>
     911
     912useconds_t ualarm(
     913  useconds_t useconds,
     914  useconds_t interval
     915);
     916@end example
     917
     918@subheading STATUS CODES:
     919
     920This call always succeeds.
     921
     922If there was a previous @code{ualarm()} request with time remaining,
     923then this routine returns the number of seconds until that outstanding
     924alarm would have fired. If no previous @code{alarm()} request was
     925outstanding, then zero is returned.
     926
     927@subheading DESCRIPTION:
     928
     929The @code{ualarm()} service causes the @code{SIGALRM} signal to
     930be generated after the number of microseconds specified by
     931@code{useconds} has elapsed.
     932
     933When @code{interval} is non-zero, repeated timeout notification occurs
     934with a period in microseconds specified by @code{interval}.
     935
     936@subheading NOTES:
     937
     938Alarm requests do not queue.  If @code{alarm} is called while
     939a previous request is outstanding, the call will result in
     940rescheduling the time at which the @code{SIGALRM} signal
     941will be generated.
     942
     943If the notification signal, @code{SIGALRM}, is not caught or ignored, the
     944calling process is terminated.
     945
Note: See TracChangeset for help on using the changeset viewer.