Annotation of coherent/d/PS2_KERNEL/include/sys/buf.h, revision 1.1

1.1     ! root        1: /* (-lgl
        !             2:  *     COHERENT Version 4.0
        !             3:  *     Copyright (c) 1982, 1992 by Mark Williams Company.
        !             4:  *     All rights reserved. May not be copied without permission.
        !             5:  -lgl) */
        !             6: /*
        !             7:  * Buffer header.
        !             8:  */
        !             9: #ifndef  BUF_H
        !            10: #define  BUF_H
        !            11: 
        !            12: #include <sys/types.h>
        !            13: 
        !            14: typedef struct buf {
        !            15:        struct   buf *b_actf;           /* First in queue */
        !            16:        struct   buf *b_actl;           /* Last in queue */
        !            17:        GATE     b_gate;                /* Gate */
        !            18:        unsigned b_flag;                /* Flags */
        !            19:        dev_t    b_dev;                 /* Device */
        !            20:        daddr_t  b_bno;                 /* Block number */
        !            21:        char     b_req;                 /* I/O type */
        !            22:        char     b_err;                 /* Error */
        !            23:        unsigned b_seqn;                /* Buffer sequence number */
        !            24:        bold_t   b_map;                 /* Old map */
        !            25: #ifndef _I386
        !            26:        vaddr_t  b_count;               /* Size of I/O */
        !            27:        vaddr_t  b_resid;               /* Driver returns count here */
        !            28:        faddr_t  b_faddr;               /* Far Virtual address */
        !            29:        paddr_t  b_paddr;               /* Physical address */
        !            30: #else
        !            31:        off_t    b_count;               /* Size of I/O */
        !            32:        off_t    b_resid;               /* Driver returns count here */
        !            33:        paddr_t  b_paddr;               /*      physical  address (bytes) */
        !            34:        vaddr_t  b_vaddr;               /* kernel virtual address (bytes) */
        !            35:        unsigned long b_hashval;        /* used to index into hasharray[] */
        !            36:        struct   buf *b_LRUf;           /* Next (older) in LRU chain */
        !            37:        struct   buf *b_LRUb;           /* Previous (newer) in LRU chain */
        !            38:        struct   buf *b_hashf;          /* Next in this hash chain */
        !            39:        struct   buf *b_hashb;          /* Previous in this hash chain */
        !            40: #endif /* _I386 */
        !            41: } BUF;
        !            42: 
        !            43: /*
        !            44:  * Flags (b_flags).
        !            45:  */
        !            46: #define BFNTP  0x0001                  /* Buffer not valid */
        !            47: #define BFREQ  0x0002                  /* Buffer requested */
        !            48: #define BFERR  0x0004                  /* Error */
        !            49: #define BFMOD  0x0008                  /* Data has been modified */
        !            50: #define BFASY  0x0010                  /* Asynchrous */
        !            51: #define BFMAP  0x0020                  /* Buffer has been mapped */
        !            52: #define BFRAW  0x0040                  /* Request is raw */
        !            53: #define BFTAP  0x0080                  /* Request is to a tape */
        !            54: 
        !            55: #define BFBLK  0x4000                  /* Aligned on a block boundary */
        !            56: #define BFIOC  0x8000                  /* Perform bounds checking */
        !            57: 
        !            58: /*
        !            59:  * Requests.
        !            60:  */
        !            61: #define        BREAD   1                       /* Read */
        !            62: #define BWRITE 2                       /* Write */
        !            63: 
        !            64: #define        BNULL   ((BUF *)0)
        !            65: 
        !            66: #ifdef KERNEL
        !            67: /*
        !            68:  * Functions.
        !            69:  */
        !            70: extern BUF      *bread();              /* bio.c */
        !            71: extern BUF      *bclaim();             /* bio.c */
        !            72: extern BUF      *vread();              /* fs3.c */
        !            73: extern BUF      *aread();              /* fs3.c */
        !            74: extern daddr_t  vmap();                /* fs3.c */
        !            75: extern int      *lmap();               /* fs3.c */
        !            76: 
        !            77: /*
        !            78:  * Global variables.
        !            79:  */
        !            80: extern unsigned bufseqn;               /* Buffer sequencer */
        !            81: extern int      bufneed;               /* Buffer is needed */
        !            82: extern BUF      swapbuf;               /* Buffer for swap I/O */
        !            83: extern BUF      *bufl;                 /* Buffer headers */
        !            84: #endif /* KERNEL */
        !            85: 
        !            86: #endif /* BUF_H */

unix.superglobalmegacorp.com

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