Commit Graph

42 Commits

Author SHA1 Message Date
dmex 66e276b763 Improve phlib API compatibility and utilities
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.
2026-09-30 00:45:00 +10:00
dmex 52c79d814d Use direct Value reads in queuedlock.c
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.
2026-04-15 13:51:47 +10:00
dmex 853021a2c3 Read Condition->Value with acquire semantics
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.
2026-04-13 12:16:38 +10:00
dmex 6c9368b54a Update SAL annotations 2026-04-12 10:54:21 +10:00
dmex 75dc02c1bd Update queuedlock.c 2026-04-08 00:05:52 +10:00
dmex 7bc6c71dfd Add analysis lock assumptions and braces
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.
2026-04-07 23:25:50 +10:00
dmex 5c1d1a1227 Add __analysis_assume_lock_acquired 2026-01-16 09:00:20 +11:00
dmex 3f55a60c98 re-organized phlib 2025-05-22 07:48:42 +10:00
dmex e33f65dc4f Update SAL annotations and status consistency 2025-03-26 20:27:26 +11:00
dmex ac2ed17cff Add initial cmake support and fix compatibility issues 2025-02-28 12:18:01 +11:00
dmex a651f76d18 Fix SAL cast warnings 2024-12-28 14:20:40 +11:00
dmex 3d2a191941 Add Acquire and Release Semantics 2024-12-01 17:41:56 +11:00
Johnny Shaw c6e44b2fea Update copyright and license (#1256) 2022-06-13 20:33:49 -06:00
dmex d06f6610b0 Fix github file encoding issues 2017-04-27 19:12:40 +10:00
Wen Jia Liu 1989541f2f Reorder #include statements 2016-04-10 14:24:00 +10:00
Wen Jia Liu 9c59091e87 Add .def file for exports; Reduce compilation time; Reorganize header files 2016-02-25 16:58:43 +11:00
Wen Jia Liu 210540c242 Update dates 2016-02-22 12:04:29 +11:00
Wen Jia Liu f387b70c05 Reflow phlib comments to 100 character width 2016-02-05 04:02:29 +11:00
Wen Jia Liu ecbc3324ea Fix comment indentation 2016-02-03 20:11:07 +11:00
Wen Jia Liu f754b78c89 Reorganize queued lock types for better readability 2016-02-03 15:27:29 +11:00
Wen Jia Liu 2db873c2e1 Remove PPVOID definition 2015-06-01 06:57:14 +00:00
Wen Jia Liu 90e92f2348 converted all annotations to SAL 2.0 2013-11-10 06:25:03 +00:00
Wen Jia Liu 615930620e patch by xhmikosr 2011-08-25 02:43:45 +00:00
Wen Jia Liu c2afc273b4 * removed KphHandle argument from KPH functions
* removed control Create functions
* consistently use VOID for functions with no parameters
* PPVOID -> PVOID *
* PhRefreshMupDevicePrefixes -> PhUpdateMupDevicePrefixes, PhRefreshDosDevicePrefixes -> PhUpdateDosDevicePrefixes
2011-08-22 03:12:13 +00:00
Wen Jia Liu 411bb11ba4 improved PhReleaseQueuedLockExclusive 2011-06-18 11:57:29 +00:00
Wen Jia Liu 9aca3b75a2 * bump to 2.13
* updated dates
2011-02-26 11:24:01 +00:00
Wen Jia Liu 31d3bd4dc7 final copyright changes 2011-01-11 22:37:45 +00:00
Wen Jia Liu 93a3c51849 added missing copyright info 2010-12-31 06:46:55 +00:00
Wen Jia Liu 61afa1c419 added general stats system 2010-10-26 10:21:33 +00:00
Wen Jia Liu cc73d89eed * added optional initialization of phlib components
* added "static" to many global variables
2010-09-27 08:09:49 +00:00
Wen Jia Liu a732bae8ea * added PhMatchWildcards
* added insert functions for PH_FULL_STRING
* added PhFinalStringBuilderString
2010-09-05 03:08:17 +00:00
Wen Jia Liu e7ea447374 added PhfWaitForConditionEx 2010-08-07 03:47:17 +00:00
Wen Jia Liu fc995655bf * added PH_BARRIER
* fixed wake event
2010-08-07 01:51:15 +00:00
Wen Jia Liu 726ede024a * optimized some startup code
* moved PhCurrentUserName from phlib to ProcessHacker
2010-07-31 06:35:55 +00:00
Wen Jia Liu 5201c2c0b4 * added old threadpool defs
* fixed some other minor things
2010-07-12 00:37:47 +00:00
Wen Jia Liu 47dc9f2084 improved synchronization definitions 2010-06-16 06:50:30 +00:00
Wen Jia Liu 68aeb13348 minor fixes 2010-06-12 09:52:33 +00:00
Wen Jia Liu d10c995c2a * fixed documentation
* updated HACKING.txt
* removing 1 byte padding from kprocesshacker.c
2010-05-02 03:13:29 +00:00
Wen Jia Liu e20b540a10 fixed typos 2010-04-28 01:29:41 +00:00
Wen Jia Liu 3bb2815380 added some more comments 2010-04-08 00:10:29 +00:00
Wen Jia Liu 4790292c73 * fixed handle table bugs
* added PhQueryInformationHandleTable/PhSetInformationHandleTable
* fixed PhfPulse(All)Condition
* added Wake Event
2010-03-25 06:37:04 +00:00
Wen Jia Liu d66d377d66 restructured common code into phlib 2010-03-11 04:15:11 +00:00