Commit Graph

63 Commits

Author SHA1 Message Date
dmex 1add68f167 Use atomic ordering for provider state
The provider thread state and run-id reads now use acquire semantics, while state writes use release semantics to prevent stale reads during start/stop/boost transitions. The defer-delete path also relies on the interlocked list push's ordering instead of an extra explicit barrier. This keeps the synchronization correct and avoids redundant memory-ordering operations.
2026-10-01 16:16:29 +10:00
dmex f9d77e5cb7 Assert non-negative oldRefCount
Add an assert in PhReferenceObjectEx to ensure the previous reference count (oldRefCount) is >= 0 after the interlocked add. This debug-time check helps detect reference-count underflow issues during development.
2026-05-05 21:08:20 +10:00
dmex f76415964f Use NoFence for debug object lists
PhDbgObjectListLock (queued exclusive), so the NoFence variants avoid redundant memory fences and reduce overhead during debug object insertion/removal.
2026-04-07 23:01:18 +10:00
Johnny Shaw 3d27bc0c43 Rename PhReferenceObjectSafe to Unsafe 2026-03-20 17:40:54 -06:00
dmex bd9effd7b0 Update documentation and types 2025-12-12 19:42:59 +11:00
dmex 5423ff7cfb Merge dev branch fixes (#2680) 2025-09-07 05:06:34 +10:00
Johnny Shaw 9ae42cba81 clang-msvc fix single-bit-bitfield-constant-conversion 2025-08-09 20:31:20 -06:00
Johnny Shaw d4d294d272 phlib ref try use free list 2025-07-12 14:41:30 -06:00
dmex 3f55a60c98 re-organized phlib 2025-05-22 07:48:42 +10:00
dmex 1c1ea52b71 Update SAL annotations 2025-04-22 06:13:46 +10:00
dmex f92eab7083 Update SDK for const compatibility
Resolves C++ SDK compatibility issues
2024-10-17 04:33:07 +11:00
dmex 8a14e44f0d Add PhGetObjectRefCount 2024-05-31 04:48:11 +10:00
dmex 5d3ba9983b Add TLS support 2023-11-22 07:03:55 +11:00
dmex d92c212e15 Add PhInitializeSListHead 2023-09-25 01:06:23 +10:00
dmex 0268499ae3 Add debug assert #1693 2023-04-26 09:47:32 +10:00
dmex e6e1feb895 Inline PhReferenceObjects and PhDereferenceObjects 2023-04-26 03:44:45 +10:00
namazso 9608c01673 Remove tautological comparison (#1693) 2023-04-21 08:09:25 +10:00
dmex ca78f64a97 Remove unused references 2023-03-31 16:50:38 +11:00
Johnny Shaw c6e44b2fea Update copyright and license (#1256) 2022-06-13 20:33:49 -06:00
dmex d3a8f59245 Remove unused return status 2020-06-20 21:34:40 +10:00
dmex 2af6d40da8 Fix vs2019 SAL checks 2020-02-26 23:44:09 +10:00
dmex d3ca8873fc Fix macro usage 2019-02-01 23:01:17 +01:00
dmex 5457f91e13 Add PhGetCapabilityGuidName 2019-01-29 22:08:33 +01:00
dmex 7f67a60871 Move PhReferenceObjects 2019-01-22 21:29:18 +01: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 f181de196e Remove deprecated functions; Make Pha* functions inline 2016-02-25 16:58:44 +11:00
Wen Jia Liu 23f83db57c Add execution environment support to work queue; Use low I/O priority for signature verification 2016-02-24 22:45:25 +11:00
Wen Jia Liu 9996edca71 Reorganize header files (more modularity); Simplify phlib initialization 2016-02-24 15:27:51 +11:00
Wen Jia Liu 77c9849cd8 Fix flaw in object manager preventing PhReferenceObjectSafe from working properly 2016-02-15 14:18:21 +11:00
Wen Jia Liu 314ae30107 Make PhReferenceObjectSafe return value consistent with PhReferenceObject 2016-02-14 22:26:59 +11:00
Wen Jia Liu f387b70c05 Reflow phlib comments to 100 character width 2016-02-05 04:02:29 +11:00
Wen Jia Liu d33f875f26 Significant object manager changes: simpler interface; size of object header has been halved 2015-06-28 15:48:23 +00:00
Wen Jia Liu 3c2337ebb5 Improve string APIs 2015-05-31 09:42:33 +00:00
Wen Jia Liu db33e54cb2 Code reorganization and function renames 2015-05-30 13:45:20 +00:00
Wen Jia Liu 1fb3e787e6 Rename auto pool functions 2015-05-25 13:03:04 +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 940562aaf5 removed all security-related code from the object manager 2011-06-04 04:32:46 +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 d75c698927 * added additional debug info to ref
* optimized PhCreateIsDotNetContext
2010-09-20 04:03:16 +00:00
Wen Jia Liu 52b1fa91e5 * fixed file dialogs on XP
* removed incorrect assertion in PhDrainAutoPool
2010-09-17 10:10:18 +00:00
Wen Jia Liu 8793831559 some micro-optimizations (including ASSUME_NO_DEFAULT) 2010-09-13 08:36:42 +00:00
Wen Jia Liu 90c99e38e8 * use HEAP_GENERATE_EXCEPTIONS instead of checking
* use STATUS_NO_MEMORY instead of STATUS_INSUFFICIENT_RESOURCES
2010-09-12 00:15:27 +00:00
Wen Jia Liu 378559dd1b fixed compilation in debug mode 2010-09-03 07:47:08 +00:00
Wen Jia Liu 698a9e06fc * PhCreateString(L"") -> PhReferenceEmptyString()
* removed AdditionalReferences parameter from PhCreateObject
2010-09-03 07:44:29 +00:00
Wen Jia Liu ea822c6397 added PH_ prefixes to some #defines 2010-09-02 11:09:40 +00:00