xref: /illumos-gate/usr/src/man/man3c/ualarm.3c (revision 72d3dbb9ab4481606cb93caca98ba3b3a8eb6ce2)
108eb1913SGarrett D'Amore.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
2c10c16deSRichard Lowe.\"  Copyright (c) 1980 Regents of the University of California.  All rights reserved.  The Berkeley software License Agreement specifies the terms and conditions for redistribution.  Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved  Portions Copyright (c) 1992,
3c10c16deSRichard Lowe.\" X/Open Company Limited  All Rights Reserved
4c10c16deSRichard Lowe.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
5c10c16deSRichard Lowe.\" http://www.opengroup.org/bookstore/.
6c10c16deSRichard Lowe.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
7c10c16deSRichard Lowe.\"  This notice shall appear on any product containing this material.
808eb1913SGarrett D'Amore.Dd "Aug 16, 2014"
908eb1913SGarrett D'Amore.Dt UALARM 3C
1008eb1913SGarrett D'Amore.Os
1108eb1913SGarrett D'Amore.Sh NAME
1208eb1913SGarrett D'Amore.Nm ualarm
1308eb1913SGarrett D'Amore.Nd schedule signal after interval in microseconds
1408eb1913SGarrett D'Amore.Sh SYNOPSIS
1508eb1913SGarrett D'Amore.In unistd.h
1608eb1913SGarrett D'Amore.Ft useconds_t
1708eb1913SGarrett D'Amore.Fn ualarm "useconds_t useconds" "useconds_t interval"
1808eb1913SGarrett D'Amore.Sh DESCRIPTION
1908eb1913SGarrett D'AmoreThe
2008eb1913SGarrett D'Amore.Fn ualarm
2108eb1913SGarrett D'Amorefunction causes the
2208eb1913SGarrett D'Amore.Dv SIGALRM
2308eb1913SGarrett D'Amoresignal to be generated for
24c10c16deSRichard Lowethe calling process after the number of real-time microseconds specified by the
2508eb1913SGarrett D'Amore.Fa useconds
26*72d3dbb9SYuri Pankovargument has elapsed.
27*72d3dbb9SYuri PankovWhen the
2808eb1913SGarrett D'Amore.Fa interval
2908eb1913SGarrett D'Amoreargument is
30c10c16deSRichard Lowenon-zero, repeated timeout notification occurs with a period in microseconds
31*72d3dbb9SYuri Pankovspecified by the
32*72d3dbb9SYuri Pankov.Fa interval
33*72d3dbb9SYuri Pankovargument.
34*72d3dbb9SYuri PankovIf the notification signal,
3508eb1913SGarrett D'Amore.Dv SIGALRM ,
3608eb1913SGarrett D'Amoreis not caught or ignored, the calling process is terminated.
3708eb1913SGarrett D'Amore.Lp
38c10c16deSRichard LoweBecause of scheduling delays, resumption of execution when the signal is caught
39c10c16deSRichard Lowemay be delayed an arbitrary amount of time.
4008eb1913SGarrett D'Amore.Lp
4108eb1913SGarrett D'AmoreInteractions between
4208eb1913SGarrett D'Amore.Fn ualarm
4308eb1913SGarrett D'Amoreand either
4408eb1913SGarrett D'Amore.Xr alarm 2
4508eb1913SGarrett D'Amoreor
4608eb1913SGarrett D'Amore.Xr sleep 3C
4708eb1913SGarrett D'Amoreare unspecified.
4808eb1913SGarrett D'Amore.Sh RETURN VALUES
4908eb1913SGarrett D'AmoreThe
5008eb1913SGarrett D'Amore.Fn ualarm
5108eb1913SGarrett D'Amorefunction returns the number of microseconds remaining from
5208eb1913SGarrett D'Amorethe previous
5308eb1913SGarrett D'Amore.Fn ualarm
54*72d3dbb9SYuri Pankovcall.
55*72d3dbb9SYuri PankovIf no timeouts are pending or if
5608eb1913SGarrett D'Amore.Fn ualarm
5708eb1913SGarrett D'Amorehas not previously been called,
5808eb1913SGarrett D'Amore.Fn ualarm
5908eb1913SGarrett D'Amorereturns 0.
6008eb1913SGarrett D'Amore.Sh ERRORS
61c10c16deSRichard LoweNo errors are defined.
6208eb1913SGarrett D'Amore.Sh USAGE
6308eb1913SGarrett D'AmoreThe
6408eb1913SGarrett D'Amore.Fn ualarm
6508eb1913SGarrett D'Amorefunction is a simplified interface to
6608eb1913SGarrett D'Amore.Xr setitimer 2 ,
6708eb1913SGarrett D'Amoreand uses the
6808eb1913SGarrett D'Amore.Dv ITIMER_REAL
69*72d3dbb9SYuri Pankovinterval timer.
70*72d3dbb9SYuri PankovIt's use has been deprecated in favor of the
7108eb1913SGarrett D'Amore.Xr timer_create 3C
7208eb1913SGarrett D'Amorefamily of functions.
7308eb1913SGarrett D'Amore.Sh INTERFACE STABILITY
7408eb1913SGarrett D'Amore.Sy Obsolete Standard .
7508eb1913SGarrett D'Amore.Sh SEE ALSO
7608eb1913SGarrett D'Amore.Xr alarm 2 ,
7708eb1913SGarrett D'Amore.Xr setitimer 2 ,
7808eb1913SGarrett D'Amore.Xr sighold 3C ,
7908eb1913SGarrett D'Amore.Xr signal 3C ,
8008eb1913SGarrett D'Amore.Xr sleep 3C ,
8108eb1913SGarrett D'Amore.Xr timer_create 3C ,
8208eb1913SGarrett D'Amore.Xr usleep 3C ,
8308eb1913SGarrett D'Amore.Xr unistd.h 3HEAD ,
8408eb1913SGarrett D'Amore.Xr standards 5
8508eb1913SGarrett D'Amore.Sh STANDARDS
8608eb1913SGarrett D'AmoreThe
8708eb1913SGarrett D'Amore.Fn ualarm
88*72d3dbb9SYuri Pankovfunction is available in the following compilation environments.
89*72d3dbb9SYuri PankovSee
9008eb1913SGarrett D'Amore.Xr standards 5 .
9108eb1913SGarrett D'Amore.Lp
9208eb1913SGarrett D'Amore.Bl -bullet -compact
9308eb1913SGarrett D'Amore.\".It
9408eb1913SGarrett D'Amore.\".St -p1003.1-90
9508eb1913SGarrett D'Amore.\".It
9608eb1913SGarrett D'Amore.\".St -p1003.1b-93
9708eb1913SGarrett D'Amore.\".It
9808eb1913SGarrett D'Amore.\".St -p1003.1c-95
9908eb1913SGarrett D'Amore.\".It
10008eb1913SGarrett D'Amore.\".St -p1003.1-2001
10108eb1913SGarrett D'Amore.\".It
10208eb1913SGarrett D'Amore.\".St -xpg3
10308eb1913SGarrett D'Amore.\".It
10408eb1913SGarrett D'Amore.\".St -xpg4
10508eb1913SGarrett D'Amore.It
10608eb1913SGarrett D'Amore.St -xpg4.2
10708eb1913SGarrett D'Amore.It
10808eb1913SGarrett D'Amore.St -susv2
10908eb1913SGarrett D'Amore.It
11008eb1913SGarrett D'Amore.St -susv3
11108eb1913SGarrett D'Amore.El
11208eb1913SGarrett D'Amore.Lp
11308eb1913SGarrett D'AmoreIt is marked obsolete in
11408eb1913SGarrett D'Amore.St -susv3 , and was removed from
11508eb1913SGarrett D'Amore.St -p1003.1-2008 .
116