Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec(2)

fork(2)

getclock(3)

gettimer(3)

reltimer(3)

rmtimer(3)

setclock(3)

MKTIMER(3)                           SysV                           MKTIMER(3)



NAME
     mktimer - allocate a per-process timer

SYNOPSIS
     #include <sys/timers.h>

     timer_t mktimer (clock_type, notify_type, itimercbp)
     int clock_type;
     int notify_type;
     void *itimercbp;

DESCRIPTION
     The mktimer function is used to allocate a per-process timer using a
     specified system-wide clock as its time base.  The mktimer function
     returns a unique timer ID of type timer_t, which is used to identify the
     timer in per-process timer requests (see gettimer(3)).

     The clock_type  argument specifies the system-wide clock to be used as a
     per-process time base for the new timer. The notify_type argument
     specifies the mechanism by which a process is to be notified when the
     per-process timer times out.

     The system allows each process to allocate one per-process timer whose
     clock_type argument is specified by the TIMEOFDAY symbolic constant
     (defined in the timers.h include file), using the notification mechanism
     whose notify_type argument is specified by the DELIVERY_SIGNALS symbolic
     constant.

     Under these conditions, whenever the timer expires, the system sends a
     SIGALRM signal to the process.

     Per-process timers are not inherited by a child process across a fork(2)
     or exec(2).

DIAGNOSTICS
     Upon successful completion, the mktimer function returns a timer_t value,
     which may be passed to a per-process timer call.  Otherwise, mktimer
     returns a value of (timer_t)-1 and sets errno to indicate the error.

ERRORS
     If the mktimer function fails, errno may be set to one of the following
     values:

     [EAGAIN]       The calling process has already allocated all available
                    timers.

     [EINVAL]       The clock_type or notify_type argument is invalid.

SEE ALSO
     exec(2), fork(2), getclock(3), gettimer(3), reltimer(3), rmtimer(3),
     setclock(3), <sys/timers.h>

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026