*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> timer_create (3)              
Title
Content
Arch
Section
 

timer_create(3)

Contents


NAME    [Toc]    [Back]

       timer_create - Allocates a per-process timer

SYNOPSIS    [Toc]    [Back]

       #include <signal.h> #include <time.h>

       int  timer_create  (       clockid_t clock_id,      struct
       sigevent *evp,      timer_t *timerid );


LIBRARY    [Toc]    [Back]

       Realtime Library (librt.so, librt.a)

PARAMETERS    [Toc]    [Back]

       The type of  clock  on  which  the  timer  is  based.  The
       CLOCK_REALTIME   clock  is  supported.   A  pointer  to  a
       sigevent structure, which defines the signal sent  to  the
       process  on  timer  expiration.  A pointer to the timer ID
       returned by the call to the timer_create function.

DESCRIPTION    [Toc]    [Back]

       The timer_create function allocates  a  per-process  timer
       using   the  specified  clock  as  the  timing  base.  The
       timer_create function returns timer_id,  which  identifies
       the timer in timer requests. The timer ID is unique within
       the calling process until the timer is deleted. The  timer
       is  unarmed  when first returned from a call to timer_create.
 To arm the timer, use the timer_settime function.

       The evp argument, if non-NULL, points to a sigevent structure,
  which  defines  the  asynchronous notification that
       occurs when the timer expires. If the sigev_notify  member
       of  evp  is  SIGEV_SIGNAL,  the structure must contain the
       signal number and data value to send to the  process  when
       the timer expires.

       SIGALRM  is  the  default signal for CLOCK_REALTIME if the
       evp argument is NULL.

       The  maximum  number  of  timers  supported  per   process
       (TIMER_MAX)  is  defined  in  the <sys/rt_limits.h> header
       file, which is indirectly included through <time.h>.

       Timers are not inherited across fork calls. An  exec  call
       disarms and deletes a timer.

RETURN VALUES    [Toc]    [Back]

       Upon  successful  completion,  a  value  of  0  (zero)  is
       returned.  The  timer_create  function  also  returns,  in
       timerid,  a pointer to the timer ID that has been created.

       An unsuccessful call returns -1, and errno is set to indicate
 the error type.








ERRORS    [Toc]    [Back]

       The timer_create function fails under the following conditions:
  The  system  lacks   sufficient   signal   queuing
       resources  to  honor the request.  The calling process has
       already created all of the  timers  it  is  allowed.   The
       specified clock ID is not defined.

SEE ALSO    [Toc]    [Back]

      
      
       Functions:  clock_getres(3),  clock_gettime(3), clock_settime(3),  timer_delete(3),  timer_gettime(3),   timer_settime(3)

       Guide to Realtime Programming



                                                  timer_create(3)
[ Back ]
 Similar pages
Name OS Title
gettimer Tru64 Get value of a per-process timer
mktimer Tru64 Allocate a per-process timer
rmtimer Tru64 Free a per-process timer
reltimer Tru64 Establishe timeout intervals of a per-process timer
nanosleep Tru64 Suspends a process from execution for the specified timer interval (P1003.1b)
timer_delete Tru64 Deallocates a previously allocated per-process timer (P1003.1b)
getnewbuf Tru64 General: Allocates a buf structure
shmget Linux allocates a shared memory segment
dmMPEG1AudioFilterStateCreate IRIX allocates new or frees DMMPEG1audiofilterstate structure.
allocb Tru64 STREAMS: Allocates a message block
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service