home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 202.img / SCO386N2.TD0 / usr / include / sys / log.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-18  |  1.9 KB  |  99 lines

  1.  
  2. /*
  3.  *    @(#) log.h 1.1 88/05/18 
  4.  *
  5.  *    Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987, 1988.
  6.  *    Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987, 1988.
  7.  *    This Module contains Proprietary Information of
  8.  *    The Santa Cruz Operation, Microsoft Corporation
  9.  *    and AT&T, and should be treated as Confidential.
  10.  */
  11.  
  12. /*
  13.  * THIS FILE CONTAINS CODE WHICH IS DESIGNED TO BE
  14.  * PORTABLE BETWEEN DIFFERENT MACHINE ARCHITECTURES
  15.  * AND CONFIGURATIONS. IT SHOULD NOT REQUIRE ANY
  16.  * MODIFICATIONS WHEN ADAPTING XENIX TO NEW HARDWARE.
  17.  */
  18.  
  19. /*
  20.  * Header file for the Streams Log Driver
  21.  */
  22.  
  23. struct log {
  24.     unsigned log_state;
  25.     queue_t *log_rdq;
  26.     int     log_bcnt;
  27. };
  28.  
  29. /*
  30.  * Driver state values.
  31.  */
  32. #define LOGOPEN     01
  33.  
  34. /* 
  35.  * Module information structure fields
  36.  */
  37. #define LOG_MID        44
  38. #define LOG_NAME    "LOG"
  39. #define LOG_MINPS    0
  40. #define LOG_MAXPS    512
  41. #define LOG_HIWAT    512
  42. #define LOG_LOWAT    256
  43.  
  44. extern strlog();
  45.  
  46. #ifdef NOTDEF /* temporary */
  47. extern struct log log_log[];        /* sad device state table */
  48. extern int log_cnt;            /* number of configured minor devices */
  49. extern int log_bsz;            /* size of internal buffer of log messages */
  50. #endif
  51.  
  52. /*
  53.  * STRLOG(mid,sid,level,flags,fmt,args) should be used for those trace
  54.  * calls that are only to be made during debugging.
  55.  */
  56. #ifdef DEBUG
  57. #define STRLOG    strlog
  58. #else
  59. #define STRLOG
  60. #endif
  61.  
  62.  
  63. /*
  64.  * Utility macros for strlog.
  65.  */
  66.  
  67. /*
  68.  * logadjust - move a character pointer up to the next int boundary
  69.  * after its current value.  Assumes sizeof(int) is 2**n bytes for some integer n. 
  70.  */
  71. #define logadjust(wp) (char *)(((unsigned)wp + sizeof(int)) & ~(sizeof(int)-1))
  72.  
  73. /*
  74.  * logstrcpy(dp, sp) copies string sp to dp.
  75.  */
  76.  
  77. #ifdef u3b2
  78. asm     char *
  79. logstrcpy(dp, sp) 
  80. {
  81. %    reg s1, s2;
  82.  
  83.     MOVW s1,%r0
  84.     MOVW s2,%r1
  85.     STRCPY
  86.     MOVW %r0,s1
  87.     MOVW %r1,s2
  88. }
  89.  
  90. #else
  91.  
  92. /*
  93.  * This is a catchall definition for those processors that have not had
  94.  * this coded in assembler above.
  95.  */
  96. #define logstrcpy(dp, sp)  for (; *dp = *sp; dp++, sp++)
  97.  
  98. #endif
  99.