00001 #ifndef lkidef_h 00002 #define lkidef_h 00003 00004 #define LKI_K_LENGTH 24 00005 #define LKI_C_LENGTH 24 00006 00007 struct _lkidef { 00008 union { 00009 unsigned int lki_l_mstlkid; 00010 unsigned int lki_l_lockid; 00011 }; 00012 unsigned int lki_l_pid; 00013 union { 00014 unsigned int lki_l_mstcsid; 00015 unsigned int lki_l_sysid; 00016 }; 00017 unsigned char lki_b_rqmode; 00018 unsigned char lki_b_grmode; 00019 char lki_b_queue; 00020 char lki_$$_spare; 00021 union { 00022 unsigned int lki_l_lkid; 00023 unsigned int lki_l_remlkid; 00024 }; 00025 union { 00026 unsigned int lki_l_csid; 00027 unsigned int lki_l_remsysid; 00028 }; 00029 }; 00030 00031 #define LKI_K_BR_LENGTH 56 00032 #define LKI_C_BR_LENGTH 56 00033 00034 struct _lkidef_br { 00035 struct _lkidef lki_r_lki_base; 00036 unsigned long long lki_q_rqstart; 00037 unsigned long long lki_q_rqlength; 00038 unsigned long long lki_q_grstart; 00039 unsigned long long lki_q_grlength; 00040 }; 00041 00042 #define LKI_M_SYSNAM 0x80000000 00043 00044 struct _namspace { 00045 union { 00046 struct { 00047 unsigned short int lki_w_group; 00048 unsigned char lki_b_rmod; 00049 unsigned char lki_b_status; 00050 }; 00051 struct { 00052 unsigned lki_$_fill : 31; 00053 unsigned lki_v_sysnam : 1; 00054 }; 00055 }; 00056 }; 00057 00058 struct _statef { 00059 unsigned char lki_b_state_rqmode; 00060 unsigned char lki_b_state_grmode; 00061 char lki_b_state_queue; 00062 }; 00063 00064 #define LKIUSR_K_LENGTH 20 00065 #define LKIUSR_C_LENGTH 20 00066 #define LKIUSR_K_BLOCKER_START 20 00067 00068 struct _lkiusrdef { 00069 unsigned long long lkiusr_q_start; 00070 unsigned long long lkiusr_q_length; 00071 unsigned char lkiusr_b_rqmode; 00072 unsigned char lkiusr_b_ignore_own; 00073 short int lki_$_fill_1; 00074 }; 00075 00076 struct _rngdef { 00077 unsigned long long lki__rng_q_rqstart; 00078 unsigned long long lki__rng_q_rqlength; 00079 unsigned long long lki__rng_q_grstart; 00080 unsigned long long lki__rng_q_grlength; 00081 }; 00082 00083 #define LKI_C_GRANTED 1 00084 #define LKI_C_CONVERT 0 00085 #define LKI_C_WAITING -1 00086 #define LKI_C_RETRY -2 00087 #define LKI_C_SCSWAIT -3 00088 #define LKI_C_RSPNOTQED -4 00089 #define LKI_C_RSPQUEUED -5 00090 #define LKI_C_RSPGRANTD -6 00091 #define LKI_C_RSPDOLOCL -7 00092 #define LKI_C_RSPRESEND -8 00093 00094 #define LKI_C_LKBTYPE 1 00095 #define LKI_C_RSBTYPE 2 00096 #define LKI_C_LISTEND 0 00097 00098 #define LKI__PID 256 00099 #define LKI__STATE 257 00100 #define LKI__PARENT 258 00101 #define LKI__LCKREFCNT 259 00102 #define LKI__LOCKID 260 00103 #define LKI__REMLKID 261 00104 #define LKI__MSTLKID 262 00105 #define LKI__LKID 263 00106 #define LKI__CSID 264 00107 #define LKI__BRL 265 00108 00109 #define LKI__RANGE 266 00110 #define LKI__LASTLKB 267 00111 00112 #define LKI__NAMSPACE 512 00113 #define LKI__RESNAM 513 00114 #define LKI__RSBREFCNT 514 00115 #define LKI__VALBLK 515 00116 #define LKI__SYSTEM 516 00117 #define LKI__LCKCOUNT 517 00118 #define LKI__BLOCKEDBY 518 00119 #define LKI__BLOCKING 519 00120 #define LKI__LOCKS 520 00121 #define LKI__CVTCOUNT 521 00122 #define LKI__WAITCOUNT 522 00123 #define LKI__GRANTCOUNT 523 00124 #define LKI__MSTCSID 524 00125 #define LKI__VALBLKST 525 00126 #define LKI__BLOCKEDBY_BR 526 00127 #define LKI__BLOCKING_BR 527 00128 #define LKI__LOCKS_BR 528 00129 #define LKI__BLOCKER_BR 529 00130 00131 #define LKI__LASTRSB 530 00132 #define LKISND_K_HDRLEN 16 00133 #define LKISND_C_HDRLEN 16 00134 00135 struct _lkisnddef { 00136 unsigned short int lkisnd_w_retsize; 00137 unsigned short int lkisnd_w_status; 00138 unsigned short int lkisnd_w_flags; 00139 unsigned short int lkisnd_w_seqnum; 00140 unsigned short int lkisnd_w_size; 00141 unsigned char lkisnd_b_type; 00142 unsigned char lkisnd_b_fill_2; 00143 unsigned char lkisnd_b_item_length; 00144 unsigned char lkisnd_b_fill_3; 00145 unsigned short int lkisnd_w_fill_4; 00146 }; 00147 00148 #endif 00149