This change updates phlib with broader native API compatibility shims, new CRC32/CRC32C tables, and safer utility helpers. It also fixes a number of synchronization, formatting, environment, and process-creation edge cases, adds correlation-vector support, hardens SID conversion and image-resource loading, and cleans up several Windows compatibility fixes across the library.
Replace ReadULongPtrAcquire(&Value) with a direct read of Value in PhpOptimizeQueuedLockListEx and PhpPrepareToWakeQueuedLock. This removes unnecessary atomic acquire semantics at those sites and reduces overhead by using the existing Value variable directly.
Use ReadULongPtrAcquire to read Condition->Value into a local variable before checking the PH_QUEUED_LOCK_WAITERS flag and passing the value to PhpfWakeQueuedLockEx. This prevents re-reading races and ensures proper acquire memory ordering in PhfPulseCondition and PhfPulseAllCondition while preserving existing wake semantics.
Replace __analysis_assume_lock_acquired annotations with the standardized _Analysis_assume_lock_acquired_ calls and add explicit braces around case branches. The annotations are inserted before releasing/acquiring queued locks, critical sections and fast locks to aid static analysis; wrapping the case bodies in scopes prevents scoping issues and potential warnings. No functional behavior changes intended.