|
|
1.1 root 1: /* $Header: /src386/kernel/coh.386/RCS/elog.c,v 1.6 93/04/16 06:48:25 bin Exp Locker: bin $ */
2: /* (lgl-
3: * The information contained herein is a trade secret of Mark Williams
4: * Company, and is confidential information. It is provided under a
5: * license agreement, and may be copied or disclosed only under the
6: * terms of that agreement. Any reproduction or disclosure of this
7: * material without the express written authorization of Mark Williams
8: * Company or persuant to the license agreement is unlawful.
9: *
10: * COHERENT Version 2.3.37
11: * Copyright (c) 1982, 1983, 1984.
12: * An unpublished work by Mark Williams Company, Chicago.
13: * All rights reserved.
14: -lgl) */
15: /*
16: * Coherent - event/error logging facility.
17: *
18: * $Log: elog.c,v $
19: * Revision 1.6 93/04/16 06:48:25 bin
20: * Hal: kernel 76 update
21: *
22: * Revision 1.2 92/01/06 11:58:54 hal
23: * Compile with cc.mwc.
24: *
25: * Revision 1.1 88/03/24 16:19:48 src
26: * Initial revision
27: *
28: */
29: #include <sys/coherent.h>
30:
31: #define NEVENT 256
32: typedef struct {
33: char *e_event; /* Function pointer or whatever */
34: int e_time; /* Timer tick of event */
35: } EVENT;
36:
37: EVENT events[NEVENT];
38: unsigned curevent = 0;
39: unsigned totevent = 0;
40:
41: elog(eventp)
42: char *eventp;
43: {
44: register EVENT *ep;
45:
46: totevent += 1;
47: ep = &events[curevent++];
48: curevent %= NEVENT;
49: ep->e_event = eventp;
50: ep->e_time = timer.t_time;
51: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.