For KSEM formats for other versions of OS/2 see:
Locations
KSEMSHR Shared Kernel Semaphore
┌─────────────────────────┬────────┬────────┬────────┬────────────────────┐│Field Name │Off │Length │Type │Description │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │ks_Signature │+0 │4 │D │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │ks_bFlags │+4 │1 │B │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │ks_bType │+5 │1 │B │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │ks_Owner │+6 │2 │W │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │ks_cusPendingWriters │+8 │2 │W │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │ks_cusNest │+a │2 │W │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │ks_cusReaders │+c │2 │W │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │ks_cusPendingReaders │+e │2 │W │ │ └─────────────────────────┴────────┴────────┴────────┴────────────────────┘
KSEMMTX MUTEX Kernel Semaphore
┌─────────────────────────┬────────┬────────┬────────┬────────────────────┐ │Field Name │Off │Length │Type │Description │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │ksm_Signature │+0 │4 │D │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │ksm_bFlags │+4 │1 │B │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │ksm_bType │+5 │1 │B │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │ksm_Owner │+6 │2 │W │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │ksm_cusPendingWriters │+8 │2 │W │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │ksm_cusNest │+a │2 │W │ │ └─────────────────────────┴────────┴────────┴────────┴────────────────────┘
KSEMEVT Event Kernel Semaphore
┌─────────────────────────┬────────┬────────┬────────┬────────────────────┐ │Field Name │Off │Length │Type │Description │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │kse_Signature │+0 │4 │D │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │kse_bFlags │+4 │1 │B │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │kse_bType │+5 │1 │B │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │kse_Owner │+6 │2 │W │ │ ├─────────────────────────┼────────┼────────┼────────┼────────────────────┤ │kse_cusPendingWriters │+8 │2 │W │ │ └─────────────────────────┴────────┴────────┴────────┴────────────────────┘
Ksem flag definitions.
┌────────────────┬────────┬───────────┐ │Name │Bit Mask│Description│ ├────────────────┼────────┼───────────┤ │KSEM_NOINTERRUPT│0x1 │ │ ├────────────────┼────────┼───────────┤ │KSEM_WRITER │0x2 │ │ ├────────────────┼────────┼───────────┤ │KSEM_DISPLAYID │0x4 │ │ ├────────────────┼────────┼───────────┤ │KSEM_NOBLOCK │0x8 │ │ └────────────────┴────────┴───────────┘