home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 9.ddi / usr / include / sys / strstat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  1.8 KB  |  58 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ifndef _SYS_STRSTAT_H
  11. #define _SYS_STRSTAT_H
  12.  
  13. #ident    "@(#)/usr/include/sys/strstat.h.sl 1.1 4.0 12/08/90 51297 AT&T-USL"
  14.  
  15. /*
  16.  * Streams Statistics header file.  This file
  17.  * defines the counters which are maintained for statistics gathering
  18.  * under Streams. 
  19.  */
  20.  
  21. typedef struct {
  22.     int use;    /* current item usage count */
  23.     int total;    /* total item usage count */
  24.     int max;    /* maximum item usage count */
  25.     int fail;    /* count of allocation failures */
  26.     } alcdat;
  27.  
  28. struct  strstat {
  29.     alcdat stream;        /* stream allocation data */
  30.     alcdat queue;        /* queue allocation data */
  31.     alcdat msgblock;    /* message block allocation data */
  32.     alcdat mdbblock;    /* mesg/data/buffer triplet allocation data */
  33.     alcdat linkblk;        /* linkblk allocation data */
  34.     alcdat strevent;    /* strevent allocation data */
  35.     } ;
  36.  
  37.  
  38. /* in the following macro, x is assumed to be of type alcdat */
  39.  
  40. #define BUMPUP(X)    {(X).use++;  (X).total++;\
  41.              if ((X).use > (X).max) (X).max = (X).use; }
  42.  
  43.  
  44. /* per-module statistics structure */
  45.  
  46. struct module_stat {
  47.     long ms_pcnt;        /* count of calls to put proc */
  48.     long ms_scnt;        /* count of calls to service proc */
  49.     long ms_ocnt;        /* count of calls to open proc */
  50.     long ms_ccnt;        /* count of calls to close proc */
  51.     long ms_acnt;        /* count of calls to admin proc */
  52.     char *ms_xptr;        /* pointer to private statistics */
  53.     short ms_xsize;        /* length of private statistics buffer */
  54.     };
  55.  
  56.  
  57. #endif    /* _SYS_STRSTAT_H */
  58.