# 2.11BSD#431 - /usr/src/lib/libc/gen/alarm.c

##### Functions

    alarm             X

       1: /*
       2:  * Copyright (c) 1983 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  */
       6:
       7: #if defined(LIBC_SCCS) && !defined(lint)
       8: static char sccsid[] = "@(#)alarm.c	5.2 (Berkeley) 3/9/86";
       9: #endif LIBC_SCCS and not lint
      10:
      11: /*
      12:  * Backwards compatible alarm.
      13:  */
      14: #include <sys/time.h>
      15:
      16: alarm(secs)
      17:     int secs;
      18: {
      19:     struct itimerval it, oitv;
      20:     register struct itimerval *itp = &it;
      21:
      22:     timerclear(&itp->it_interval);
      23:     itp->it_value.tv_sec = secs;
      24:     itp->it_value.tv_usec = 0;
      25:     if (setitimer(ITIMER_REAL, itp, &oitv) < 0)
      26:         return (-1);
      27:     if (oitv.it_value.tv_usec)
      28:         oitv.it_value.tv_sec++;
      29:     return (oitv.it_value.tv_sec);
      30: }

#### Defined functions

alarm defined in line 16; used 308 times

- in /usr/include/unistd.h line 58
- in /usr/src/bin/login/login.c line 106, 297
- in /usr/src/bin/ping/ping.c line 387, 396
- in /usr/src/bin/sh/xec.c line 244
- in /usr/src/bin/tcsh/sh.c line 1433
- in /usr/src/bin/tcsh/sh.types.h line 90, 142
- in /usr/src/bin/tcsh/tc.func.c line 729
- in /usr/src/bin/write.c line 143-148(2)
- in /usr/src/games/atc/graphics.c line 260, 336
- in /usr/src/games/atc/input.c line 281, 317
- in /usr/src/games/atc/main.c line 142, 155, 168
- in /usr/src/games/backgammon/main.c line 196, 204
- in /usr/src/games/battlestar/fly.c line 122, 195, 209, 246-251(2)
- in /usr/src/games/boggle/boggle.c line 111, 596
- in /usr/src/games/hunt/hunt.c line 411, 425, 436
- in /usr/src/games/robots/move_robs.c line 96
- in /usr/src/games/robots/play_level.c line 48
- in /usr/src/games/sail/pl_7.c line 61, 104
- in /usr/src/games/worm.c line 179, 196, 233, 277
- in /usr/src/libexec/comsat/comsat.c line 119, 176
- in /usr/src/libexec/ftpd/ftpcmd.y line 396, 859-864(2)
- in /usr/src/libexec/getty/main.c line 94, 211, 217, 236
- in /usr/src/libexec/getty/subr.c line 322
- in /usr/src/libexec/identd/src/identd.c line 656, 707
- in /usr/src/libexec/rexecd/rexecd.c line 97, 107, 114-118(2)
- in /usr/src/libexec/rlogind/rlogind.c line 142-147(2)
- in /usr/src/libexec/rshd/rshd.c line 187, 202
- in /usr/src/libexec/talkd/talkd.c line 65, 90
- in /usr/src/libexec/tcpd/rfc931.c line 104, 160
- in /usr/src/libexec/tcpd/safe_finger.c line 90
- in /usr/src/libexec/tftpd/tftpd.c line 143, 331-333(2), 394-396(2), 431-433(2)
- in /usr/src/local/qterm/qterm.c line 334, 556, 804, 832-834(2), 848-850(2)
- in /usr/src/local/zmodem/minirb.c line 147-148(2)
- in /usr/src/local/zmodem/rz.c line 699-701(2)
- in /usr/src/local/zmodem/sz.c line 1226-1228(2)
- in /usr/src/new/jove/jove.c line 1055, 1281
- in /usr/src/new/jove/portsrv.c line 68
- in /usr/src/new/jove/util.c line 137-140(2)
- in /usr/src/new/nntp/server/netaux.c line 194
- in /usr/src/new/nntp/server/serve.c line 195-200(2), 234
- in /usr/src/new/nntp/server/spawn.c line 80, 104, 238
- in /usr/src/new/nntp/xmit/remote.c line 311, 326-329(2)
- in /usr/src/old/cu/cu.c line 93, 99
- in /usr/src/old/dump/dumpoptr.c line 55, 72
- in /usr/src/sbin/dump/dumpoptr.c line 59, 76
- in /usr/src/sbin/init/init.c line 163-168(2)
- in /usr/src/sbin/routed/timer.c line 76
- in /usr/src/sbin/routed/tools/query.c line 77
- in /usr/src/sbin/shutdown/shutdown.c line 216, 223, 233, 239
- in /usr/src/ucb/PORT/systat/cmds.c line 42, 72, 86, 156, 169
- in /usr/src/ucb/PORT/systat/main.c line 190
- in /usr/src/ucb/ex/ex_subr.c line 826
- in /usr/src/ucb/ex/ex_vget.c line 613-617(2), 626, 643
- in /usr/src/ucb/netstat/if.c line 246, 312
- in /usr/src/ucb/tftp/main.c line 505
- in /usr/src/ucb/tftp/tftp.c line 117, 123, 210, 216, 222
- in /usr/src/usr.bin/tip/aculib/biz22.c line 128-130(2), 150-152(2)
- in /usr/src/usr.bin/tip/aculib/biz31.c line 150-152(2), 171-173(2)
- in /usr/src/usr.bin/tip/aculib/courier.c line 122-124(2), 169-171(2)
- in /usr/src/usr.bin/tip/aculib/df.c line 67
- in /usr/src/usr.bin/tip/aculib/dn11.c line 44, 64-69(2), 86
- in /usr/src/usr.bin/tip/aculib/hayes.c line 153-155(2)
- in /usr/src/usr.bin/tip/aculib/penril.c line 161-163(2)
- in /usr/src/usr.bin/tip/aculib/v3451.c line 138-143(2), 150
- in /usr/src/usr.bin/tip/aculib/v831.c line 50, 72-77(2), 95
- in /usr/src/usr.bin/tip/aculib/ventel.c line 161-163(2)
- in /usr/src/usr.bin/tip/cmds.c line 315, 321-325(2), 402-404(2)
- in /usr/src/usr.bin/tip/hunt.c line 50-53(2)
- in /usr/src/usr.bin/uucp/aculib/att2224.c line 21, 27, 33-37(2), 48-52(2), 66-71(2), 113-117(2)
- in /usr/src/usr.bin/uucp/aculib/bsdtcp.c line 52, 73-77(2)
- in /usr/src/usr.bin/uucp/aculib/cds224.c line 38-40(2)
- in /usr/src/usr.bin/uucp/aculib/df12.c line 56-58(2)
- in /usr/src/usr.bin/uucp/aculib/df2.c line 40-42(2), 69, 101, 118
- in /usr/src/usr.bin/uucp/aculib/dn.c line 42-44(2), 69, 101, 116
- in /usr/src/usr.bin/uucp/aculib/hys.c line 66-68(2), 111, 119-124(2)
- in /usr/src/usr.bin/uucp/aculib/hys24.c line 54-56(2)
- in /usr/src/usr.bin/uucp/aculib/hysq.c line 73, 81, 110-113(2)
- in /usr/src/usr.bin/uucp/aculib/mic.c line 42, 50
- in /usr/src/usr.bin/uucp/aculib/nov.c line 42-44(2)
- in /usr/src/usr.bin/uucp/aculib/pen.c line 30-32(2)
- in /usr/src/usr.bin/uucp/aculib/pnet.c line 38-44(3)
- in /usr/src/usr.bin/uucp/aculib/rvmacs.c line 77-81(2), 152, 162
- in /usr/src/usr.bin/uucp/aculib/sy.c line 45, 53
- in /usr/src/usr.bin/uucp/aculib/unet.c line 36-38(2)
- in /usr/src/usr.bin/uucp/aculib/va212.c line 29-31(2)
- in /usr/src/usr.bin/uucp/aculib/va811.c line 46-48(2)
- in /usr/src/usr.bin/uucp/aculib/va820.c line 48-50(2), 89, 151
- in /usr/src/usr.bin/uucp/aculib/vad.c line 36-38(2)
- in /usr/src/usr.bin/uucp/aculib/vent.c line 27-30(2)
- in /usr/src/usr.bin/uucp/aculib/vmacs.c line 78, 150
- in /usr/src/usr.bin/uucp/cico.c line 253, 269, 282, 528-532(2), 539, 556, 566, 599-603(2), 637, 649
- in /usr/src/usr.bin/uucp/condevs.c line 200, 227, 460
- in /usr/src/usr.bin/uucp/conn.c line 279-281(2), 613, 619-624(2), 642
- in /usr/src/usr.bin/uucp/fio.c line 147, 161-164(2), 327-329(2)
- in /usr/src/usr.bin/uucp/pk1.c line 294, 311, 382, 417-421(2), 428
- in /usr/src/usr.bin/uucp/tio.c line 48, 62, 74, 80, 88, 121-123(2), 131-133(2), 177-179(2), 189-191(2), 198
- in /usr/src/usr.bin/uucp/uucpd.c line 155, 184
- in /usr/src/usr.lib/libU77/alarm_.c line 31-36(2)
- in /usr/src/usr.lib/libstubs/stubs.c line 243
- in /usr/src/usr.sbin/inetd/inetd.c line 377, 638
- in /usr/src/usr.sbin/ntp/ntpdc.c line 206, 228, 253
- in /usr/src/usr.sbin/rwhod/rwhod.c line 317
- in /usr/src/usr.sbin/sendmail.MX/src/clock.c line 147, 187-197(4)
- in /usr/src/usr.sbin/sendmail.MX/src/queue.c line 608
- in /usr/src/usr.sbin/sendmail/src/clock.c line 147, 187-197(4)
- in /usr/src/usr.sbin/sendmail/src/queue.c line 595
- in /usr/src/usr.sbin/syslogd/syslogd.c line 699

#### Defined variables

sccsid defined in line 8; never used

Last modified: 1986-03-10 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 571 |