Annotation of coherent/f/usr/include/kernel/ddi_base.h, revision 1.1

1.1     ! root        1: #ifndef        __KERNEL_DDI_BASE_H__
        !             2: #define        __KERNEL_DDI_BASE_H__
        !             3: 
        !             4: /*
        !             5:  * This internal header file defines structures and an access procedure for
        !             6:  * DDI/DKI process-level data that will not be needed outside the process
        !             7:  * context. This information corresponds to "U area" data in traditional
        !             8:  * Unix implementations. Although it may in fact be implemented that way,
        !             9:  * using an accessor macro guarantees source-level compatibility with systems
        !            10:  * that do not or can not implement a traditional U area.
        !            11:  */
        !            12: 
        !            13: /*
        !            14:  *-IMPORTS:
        !            15:  *     <common/ccompat.h>
        !            16:  *             __EXTERN_C_BEGIN__
        !            17:  *             __EXTERN_C_END__
        !            18:  *             __PROTO ()
        !            19:  *     <common/_cred.h>
        !            20:  *             cred_t
        !            21:  *     <sys/uio.h>
        !            22:  *             uio_t
        !            23:  *             iovec_t
        !            24:  */
        !            25: 
        !            26: #include <common/ccompat.h>
        !            27: #include <common/_cred.h>
        !            28: #include <sys/uio.h>
        !            29: 
        !            30: #if    __COHERENT__
        !            31: 
        !            32: /*
        !            33:  *-IMPORTS:
        !            34:  *     <sys/io.h>
        !            35:  *             IO
        !            36:  *     <sys/uproc.h>
        !            37:  *             UPROC
        !            38:  *             u.u_uid
        !            39:  *             u.u_gid
        !            40:  */
        !            41: 
        !            42: #include <sys/io.h>
        !            43: 
        !            44: #define        __KERNEL__      2
        !            45: #include <sys/uproc.h>
        !            46: #undef __KERNEL__
        !            47: 
        !            48: extern UPROC u;
        !            49: 
        !            50: #define        U_AREA()                (& u)
        !            51: 
        !            52: #elif  defined (__MSDOS__)
        !            53: 
        !            54: #include <kernel/dosproc.h>
        !            55: 
        !            56: #endif
        !            57: 
        !            58: 
        !            59: /*
        !            60:  * DDI/DKI per-process data needed only at base level.
        !            61:  *
        !            62:  * Note that it might seem like a reasonable idea to record the list of sleep
        !            63:  * locks held by a process for debugging. However, this is not possible, since
        !            64:  * the DDI/DKI specification defines SLEEP_TRYLOCK () and SLEEP_UNLOCK () as
        !            65:  * being available at interrupt level, ie. not requiring user context, making
        !            66:  * this idea impossible (it is not clear whether a process can in fact try to
        !            67:  * recursively lock a sleep lock if it has arranged for some interrupt-level
        !            68:  * activity to unlock it, but it seems reasonable).
        !            69:  */
        !            70: 
        !            71: struct ddi_base_data {
        !            72:        char            _non_empty;             /* make structure non-empty */
        !            73: };
        !            74: 
        !            75: typedef struct ddi_base_data   dbdata_t;
        !            76: 
        !            77: 
        !            78: __EXTERN_C_BEGIN__
        !            79: 
        !            80: dbdata_t      *        ddi_base_data   __PROTO ((void));
        !            81: void           DESTROY_UIO     __PROTO ((uio_t * _uiop, IO * _iop));
        !            82: cred_t       * MAKE_CRED       __PROTO ((cred_t * _cred));
        !            83: uio_t        * MAKE_UIO        __PROTO ((uio_t * _uiop, iovec_t * _iovp,
        !            84:                                          int _mode, IO * _iop));
        !            85: 
        !            86: __EXTERN_C_END__
        !            87: 
        !            88: 
        !            89: #define        ddi_base_data()         ((dbdata_t *) U_AREA ()->u_nigel)
        !            90: 
        !            91: 
        !            92: #endif /* ! defined (__KERNEL_DDI_BASE_H__) */

unix.superglobalmegacorp.com

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