Annotation of Gnu-Mach/kern/xpr.h, revision 1.1.1.4

1.1.1.2   root        1: /*
1.1       root        2:  * Mach Operating System
                      3:  * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
                      4:  * All Rights Reserved.
1.1.1.2   root        5:  *
1.1       root        6:  * Permission to use, copy, modify and distribute this software and its
                      7:  * documentation is hereby granted, provided that both the copyright
                      8:  * notice and this permission notice appear in all copies of the
                      9:  * software, derivative works or modified versions, and any portions
                     10:  * thereof, and that both notices appear in supporting documentation.
1.1.1.2   root       11:  *
1.1       root       12:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     13:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
                     14:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
1.1.1.2   root       15:  *
1.1       root       16:  * Carnegie Mellon requests users of this software to return to
1.1.1.2   root       17:  *
1.1       root       18:  *  Software Distribution Coordinator  or  [email protected]
                     19:  *  School of Computer Science
                     20:  *  Carnegie Mellon University
                     21:  *  Pittsburgh PA 15213-3890
1.1.1.2   root       22:  *
1.1       root       23:  * any improvements or extensions that they make and grant Carnegie Mellon
                     24:  * the rights to redistribute these changes.
                     25:  */
                     26: /*
1.1.1.2   root       27:  * Include file for xpr circular buffer silent tracing.
1.1       root       28:  *
                     29:  */
                     30: /*
1.1.1.2   root       31:  * If the kernel flag XPRDEBUG is set, the XPR macro is enabled.  The
1.1       root       32:  * macro should be invoked something like the following:
                     33:  *     XPR(XPR_SYSCALLS, ("syscall: %d, 0x%x\n", syscallno, arg1);
                     34:  * which will expand into the following code:
                     35:  *     if (xprflags & XPR_SYSCALLS)
                     36:  *             xpr("syscall: %d, 0x%x\n", syscallno, arg1);
1.1.1.4 ! root       37:  * Xpr will log the pointer to the printf string and up to 6 arguments,
1.1       root       38:  * along with a timestamp and cpuinfo (for multi-processor systems), into
                     39:  * a circular buffer.  The actual printf processing is delayed until after
                     40:  * the buffer has been collected.  It is assumed that the text/data segments
                     41:  * of the kernel can easily be reconstructed in a post-processor which
                     42:  * performs the printf processing.
                     43:  *
1.1.1.2   root       44:  * If the XPRDEBUG compilation switch is not set, the XPR macro expands
1.1       root       45:  * to nothing.
                     46:  */
                     47: 
                     48: #ifndef        _KERN_XPR_H_
                     49: #define _KERN_XPR_H_
                     50: 
1.1.1.3   root       51: #ifndef        KERNEL
1.1       root       52: #include <sys/features.h>
1.1.1.2   root       53: #endif /* KERNEL */
1.1       root       54: 
                     55: #include <machine/xpr.h>
                     56: 
                     57: #if    XPR_DEBUG
                     58: 
                     59: #define XPR(flags,xprargs) if(xprflags&flags) xpr xprargs
                     60: 
                     61: extern int xprflags;
                     62: /*
                     63:  * flags for message types.
                     64:  */
                     65: #define XPR_SYSCALLS   0x00000001
                     66: #define XPR_TRAPS      0x00000002
                     67: #define XPR_SCHED      0x00000004
                     68: #define XPR_NPTCP      0x00000008
                     69: #define XPR_NP         0x00000010
                     70: #define XPR_TCP                0x00000020
                     71: 
                     72: #define        XPR_VM_OBJECT           (1 << 8)
                     73: #define        XPR_VM_OBJECT_CACHE     (1 << 9)
                     74: #define        XPR_VM_PAGE             (1 << 10)
                     75: #define        XPR_VM_PAGEOUT          (1 << 11)
                     76: #define        XPR_MEMORY_OBJECT       (1 << 12)
                     77: #define        XPR_VM_FAULT            (1 << 13)
                     78: #define        XPR_INODE_PAGER         (1 << 14)
                     79: #define        XPR_INODE_PAGER_DATA    (1 << 15)
                     80: 
1.1.1.2   root       81: #else  /* XPR_DEBUG */
1.1       root       82: #define XPR(flags,xprargs)
1.1.1.2   root       83: #endif /* XPR_DEBUG */
1.1       root       84: 
                     85: struct xprbuf {
                     86:        char    *msg;
                     87:        int     arg1,arg2,arg3,arg4,arg5;
                     88:        int     timestamp;
                     89:        int     cpuinfo;
                     90: };
                     91: 
1.1.1.3   root       92: extern void xpr(char *, int, int, int, int, int);
                     93: extern void xpr_dump(struct xprbuf *, int);
                     94: extern void xprinit(void);
                     95: extern void xprbootstrap(void);
1.1       root       96: 
1.1.1.2   root       97: #endif /* _KERN_XPR_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.