!*** MODULE $GLOCKDEF *** !DEC$ OPTIONS/ALIGN=(RECORDS=PACKED,COMMONS=PACKED)/NOWARN PARAMETER glock$c_nowait = '00000001'X ! $acquire_lock will not auto-wait PARAMETER glock$c_nospin = '00000002'X ! $acquire_lock will not spin PARAMETER glock$c_nobreak = '00000004'X ! $acquire_lock will not break lock ownership PARAMETER glock$c_auto_wait = '00000008'X ! kernel mode code waints an automatic wait PARAMETER glock$c_num_nodes = '00000040'X ! max number of gnodes supported PARAMETER glcktbl$c_process = '00000000'X ! lock region is mapped in P2 space PARAMETER glcktbl$c_system = '00000001'X ! lock region is mapped in S2 space PARAMETER glcktbl$c_private = '00000002'X ! lock region is pre-allocated STRUCTURE /glock_hist/ INTEGER*4 glock_hist$l_pc INTEGER*4 glock_hist$q_lock(2) END STRUCTURE ! glock_hist PARAMETER glock_hist$c_entries = '0000000A'X PARAMETER glock$m_owned = '00000001'X PARAMETER glock$m_broken = '00000002'X PARAMETER glock$m_waiters = '00000004'X PARAMETER glock$m_process = '00000008'X PARAMETER glock$m_reserved_4_7 = '000000F0'X PARAMETER glock$m_owner_count = '0000FF00'X PARAMETER glock$m_node = '00FF0000'X PARAMETER glock$m_node_seq = '00000000'X PARAMETER glock$m_owner = '00000000'X STRUCTURE /GLOCK/ INTEGER*4 glock$l_flink ! Forward link (lock handle) INTEGER*4 glock$l_spare1 ! not used INTEGER*2 glock$w_size ! size of structure BYTE glock$b_type ! Structure type BYTE glock$b_subtype ! subtype BYTE glock$b_ipl ! IPL to raise to on acquire BYTE glock$b_prev_ipl ! IPL to lower to on release BYTE glock$b_rank ! Rank of lock BYTE glock$b_spare2 ! not used UNION MAP INTEGER*4 glock$q_lock(2) ! the lock END MAP MAP UNION MAP PARAMETER glock$bS_flags = 8 PARAMETER glock$bV_flags = 0 BYTE %FILL (1) ! lock flags END MAP MAP PARAMETER glock$S_owned = 1 PARAMETER glock$V_owned = 0 ! lock is owned PARAMETER glock$S_broken = 1 PARAMETER glock$V_broken = 1 ! lock ownership is broken PARAMETER glock$S_waiters = 1 PARAMETER glock$V_waiters = 2 ! there are waiters PARAMETER glock$S_process = 1 PARAMETER glock$V_process = 3 ! lock is owned in process context PARAMETER glock$S_reserved_4_7 = 4 PARAMETER glock$V_reserved_4_7 = 4 BYTE %FILL (1) ! the unused bits END MAP END UNION PARAMETER glock$bS_owner_count = 8 PARAMETER glock$bV_owner_count = 8 ! nested owner count PARAMETER glock$bS_node = 8 PARAMETER glock$bV_node = 16 ! node where lock is owned PARAMETER glock$wS_node_seq = 16 PARAMETER glock$wV_node_seq = 24 ! node sequence number PARAMETER glock$S_owner = 24 PARAMETER glock$V_owner = 40 BYTE %FILL (7) ! owner EPID or CPU # END MAP END UNION INTEGER*4 glock$q_thread_id(2) ! thread id of lock owner INTEGER*4 glock$q_waiters(2) ! bitmask of waiters INTEGER*4 glock$l_timeout ! wait timeout CHARACTER*16 glock$t_name ! lock name INTEGER*4 glock$l_spare4 ! not used INTEGER*4 glock$l_spare5 ! not used INTEGER*4 glock$l_history_idx ! next history longword to be used RECORD /glock_hist/ glock$r_history(1:10) ! acquire - release history END STRUCTURE ! GLOCK PARAMETER glock$c_length = '00000040'X ! Length PARAMETER glock$k_length = '00000040'X ! Length PARAMETER glock$c_max_length = '000000C0'X ! max length PARAMETER glock$k_max_length = '000000C0'X ! max length PARAMETER glock_lock$m_owned = '00000001'X PARAMETER glock_lock$m_broken = '00000002'X PARAMETER glock_lock$m_waiters = '00000004'X PARAMETER glock_lock$m_process = '00000008'X PARAMETER glock_lock$m_reserved_4_7 = '000000F0'X PARAMETER glock_lock$m_owner_count = '0000FF00'X PARAMETER glock_lock$m_node = '00FF0000'X PARAMETER glock_lock$m_node_seq = '00000000'X PARAMETER glock_lock$m_owner = '00000000'X STRUCTURE /glock_lock/ UNION MAP INTEGER*4 glock_lock$q_lock(2) ! the lock END MAP MAP UNION MAP PARAMETER glock_lock$bS_flags = 8 PARAMETER glock_lock$bV_flags = 0 BYTE %FILL (1) ! lock flags END MAP MAP PARAMETER glock_lock$S_owned = 1 PARAMETER glock_lock$V_owned = 0 ! lock is owned PARAMETER glock_lock$S_broken = 1 PARAMETER glock_lock$V_broken = 1 ! lock ownership is broken PARAMETER glock_lock$S_waiters = 1 PARAMETER glock_lock$V_waiters = 2 ! there are waiters PARAMETER glock_lock$S_process = 1 PARAMETER glock_lock$V_process = 3 ! lock is owned in process context PARAMETER glock_lock$S_reserved_4_7 = 4 PARAMETER glock_lock$V_reserved_4_7 = 4 BYTE %FILL (1) ! the unused bits END MAP END UNION PARAMETER glock_lock$bS_owner_count = 8 PARAMETER glock_lock$bV_owner_count = 8 ! nested owner count PARAMETER glock_lock$bS_node = 8 PARAMETER glock_lock$bV_node = 16 ! node where lock is owned PARAMETER glock_lock$wS_node_seq = 16 PARAMETER glock_lock$wV_node_seq = 24 ! node sequence number PARAMETER glock_lock$S_owner = 24 PARAMETER glock_lock$V_owner = 40 BYTE %FILL (7) ! owner EPID or CPU # END MAP END UNION END STRUCTURE ! glock_lock PARAMETER glcktbl$m_valid = '00000001'X PARAMETER glcktbl$m_private = '00000002'X PARAMETER glcktbl$m_space = '00000004'X PARAMETER glcktbl$m_reserved_3_7 = '000000F8'X STRUCTURE /GLCKTBL/ INTEGER*4 glcktbl$l_flink ! Forward link (region offset) INTEGER*2 glcktbl$w_lock_size ! size of locks for the table UNION MAP BYTE glcktbl$b_flags ! lock table flags END MAP MAP PARAMETER glcktbl$S_valid = 1 PARAMETER glcktbl$V_valid = 0 ! lock table is valid PARAMETER glcktbl$S_private = 1 PARAMETER glcktbl$V_private = 1 ! user allocated lock memory PARAMETER glcktbl$S_space = 1 PARAMETER glcktbl$V_space = 2 ! clear for process, set for system PARAMETER glcktbl$S_reserved_3_7 = 5 PARAMETER glcktbl$V_reserved_3_7 = 3 BYTE %FILL (1) ! the unused bits END MAP END UNION BYTE glcktbl$b_accmode ! access mode of global section INTEGER*4 glcktbl$q_reg_id(2) ! ID of shared memory region INTEGER*4 glcktbl$q_reg_phys_size(2) ! physical size of shared memory region INTEGER*4 glcktbl$q_reg_virt_size(2) ! virtual size of shared memory region INTEGER*4 glcktbl$q_num_locks(2) ! number of locks in the region INTEGER*4 glcktbl$l_free_list ! free glock list INTEGER*4 glcktbl$l_used_list ! used glock list INTEGER*4 glcktbl$q_nodes(2) ! bitmask of connected nodes INTEGER*4 glcktbl$q_glock_handle(2) ! handle of embedded glock BYTE glcktbl$b_glock(1:64) ! embedded GLOCK INTEGER*2 glcktbl$w_ref_counts(1:64) ! per-node ref counters END STRUCTURE ! GLCKTBL PARAMETER glcktbl$c_length = '00000100'X ! Length PARAMETER glcktbl$k_length = '00000100'X ! Length STRUCTURE /glock_nodeb/ INTEGER*4 glock_nodeb$q_lock_handle(2) ! lockhandle for ipint BYTE glock_nodeb$b_spares(1:24) ! pad to 32 bytes END STRUCTURE ! glock_nodeb PARAMETER glock_nodeb$c_length = '00000020'X ! length STRUCTURE /gmdb_glock/ INTEGER*4 gmdb_glock$q_nodes(2) ! connected nodes INTEGER*4 gmdb_glock$q_max_nodes(2) ! max nodes supported INTEGER*4 gmdb_glock$q_flags(2) ! flags INTEGER*4 gmdb_glock$q_handle(2) ! lock handle BYTE gmdb_glock$b_lock(1:64) ! GLOCK for the locking portion of the GMDB BYTE gmdb_glock$b_lcktbl(1:256) ! embedded GLCKTBL for locks in the GMDB INTEGER*4 gmdb_glock$q_num_tables(2,1:2) ! number of locktables in the regions INTEGER*4 gmdb_glock$l_free_list(1:2) ! lists of free lock tables INTEGER*4 gmdb_glock$l_used_list(1:2) ! lists of used lock tables INTEGER*4 gmdb_glock$q_reg_handle(2,1:2) ! lock handles for locktable list locks BYTE gmdb_glock$b_prc_lock(1:64) ! GLOCK for process locktable lists BYTE gmdb_glock$b_sys_lock(1:64) ! GLOCK for system locktable lists RECORD /glock_nodeb/ gmdb_glock$r_nodeb(1:64) ! per node cells END STRUCTURE ! gmdb_glock PARAMETER gmdb_glock$c_length = '00000A10'X ! Length !DEC$ END OPTIONS