home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * @(#) log.h 1.1 88/05/18
- *
- * Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987, 1988.
- * Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987, 1988.
- * This Module contains Proprietary Information of
- * The Santa Cruz Operation, Microsoft Corporation
- * and AT&T, and should be treated as Confidential.
- */
-
- /*
- * THIS FILE CONTAINS CODE WHICH IS DESIGNED TO BE
- * PORTABLE BETWEEN DIFFERENT MACHINE ARCHITECTURES
- * AND CONFIGURATIONS. IT SHOULD NOT REQUIRE ANY
- * MODIFICATIONS WHEN ADAPTING XENIX TO NEW HARDWARE.
- */
-
- /*
- * Header file for the Streams Log Driver
- */
-
- struct log {
- unsigned log_state;
- queue_t *log_rdq;
- int log_bcnt;
- };
-
- /*
- * Driver state values.
- */
- #define LOGOPEN 01
-
- /*
- * Module information structure fields
- */
- #define LOG_MID 44
- #define LOG_NAME "LOG"
- #define LOG_MINPS 0
- #define LOG_MAXPS 512
- #define LOG_HIWAT 512
- #define LOG_LOWAT 256
-
- extern strlog();
-
- #ifdef NOTDEF /* temporary */
- extern struct log log_log[]; /* sad device state table */
- extern int log_cnt; /* number of configured minor devices */
- extern int log_bsz; /* size of internal buffer of log messages */
- #endif
-
- /*
- * STRLOG(mid,sid,level,flags,fmt,args) should be used for those trace
- * calls that are only to be made during debugging.
- */
- #ifdef DEBUG
- #define STRLOG strlog
- #else
- #define STRLOG
- #endif
-
-
- /*
- * Utility macros for strlog.
- */
-
- /*
- * logadjust - move a character pointer up to the next int boundary
- * after its current value. Assumes sizeof(int) is 2**n bytes for some integer n.
- */
- #define logadjust(wp) (char *)(((unsigned)wp + sizeof(int)) & ~(sizeof(int)-1))
-
- /*
- * logstrcpy(dp, sp) copies string sp to dp.
- */
-
- #ifdef u3b2
- asm char *
- logstrcpy(dp, sp)
- {
- % reg s1, s2;
-
- MOVW s1,%r0
- MOVW s2,%r1
- STRCPY
- MOVW %r0,s1
- MOVW %r1,s2
- }
-
- #else
-
- /*
- * This is a catchall definition for those processors that have not had
- * this coded in assembler above.
- */
- #define logstrcpy(dp, sp) for (; *dp = *sp; dp++, sp++)
-
- #endif
-