Annotation of coherent/f/usr/include/kernel/ddi_lock.h, revision 1.1.1.1

1.1       root        1: #ifndef        __KERNEL_DDI_LOCK_H__
                      2: #define        __KERNEL_DDI_LOCK_H__
                      3: 
                      4: /*
                      5:  * This is an internal header file, not intended for general use.
                      6:  *
                      7:  * This is a registry of value and constants for the lock hierarchy values
                      8:  * recommended for use in internal DDI/DKI basic and read/write locking
                      9:  * operations. Many of these hierarchy values are outside the range that
                     10:  * are permitted to DDI/DKI-compliant drivers, and a special value in the
                     11:  * "lk_flags" member of the "lkinfop" structure passed to LOCK_ALLOC () is
                     12:  * necessary to permit access to this range of hierarchy values.
                     13:  *
                     14:  * We also specify a recommended minimum priority value here which should be
                     15:  * used with the indicated lock whenever a specific value is not indicated.
                     16:  */
                     17: 
                     18: enum {
                     19:        INTERNAL_LOCK = 1,              /* access to reserved hierarchies */
                     20: 
                     21:        /*
                     22:         * For polling, the global lock nests outside the "pollhead" lock
                     23:         * which nests outside the "pollwait" lock.
                     24:         */
                     25: 
                     26:        pollwait_hierarchy = 40,
                     27: #define        pollwait_priority       plhi
                     28: 
                     29:        pollhead_hierarchy = 39,
                     30: #define        pollhead_priority       plhi
                     31: 
                     32:        poll_global_hierarchy = 38,
                     33: #define        poll_global_priority    plhi
                     34: 
                     35: 
                     36:        /*
                     37:         * For the timeout system. The timeout code calls defer_int_cpu ().
                     38:         */
                     39: 
                     40:        timeout_global_hierarchy = 39,
                     41: #define        timeout_global_priority plhi
                     42: 
                     43: 
                     44:        /*
                     45:         * For the defer system.
                     46:         */
                     47: 
                     48:        defer_hierarchy = 40,
                     49: #define        defer_priority          plhi
                     50: 
                     51: 
                     52:        /*
                     53:         * Process-related locks.
                     54:         */
                     55: 
                     56:        proc_global_hierarchy = 40,
                     57: #define        proc_global_priority    plhi
                     58: 
                     59: 
                     60:        /*
                     61:         * For streams, the stream directory lock nests outside the stream
                     62:         * head lock, which nests outside STREAMS memory allocation. STREAMS
                     63:         * locks are all at "plstr" by definition *except* for the streams
                     64:         * heap locks, which have a priority conditional on various factors.
                     65:         * Both of the streams heap locks call defer... () routines.
                     66:         */
                     67: 
                     68:        stream_heap_hierarchy = 39,
                     69:        stream_head_hierarchy = 38,
                     70:        stream_dir_hierarchy = 37,
                     71: 
                     72: 
                     73:        /*
                     74:         * The STREAMS schedule, bufcall event, qprocsoff (), and trace-
                     75:         * sequence locks are all disjoint.
                     76:         */
                     77: 
                     78:        stream_schedule_hierarchy = 40,
                     79:        stream_event_hierarchy = 40,
                     80:        stream_proc_hierarchy = 40,
                     81:        stream_seq_hierarchy = 40
                     82: 
                     83: };
                     84: 
                     85: #endif /* ! defined (__KERNEL_DDI_LOCK_H__) */

unix.superglobalmegacorp.com

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