mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 23:53:19 +00:00
[NTOSKRNL] Misc fixes to VACB reference counting
This fixes various bugs linked to VACB counting: - VACB not released when it should be - Reference count expectations not being accurate For the record, VACB should always have at least a reference count of 1, unless you are to free it and removed it from any linked list. This commit also adds a bunch of asserts that should help triggering invalid reference counting. It should also fix numerous ASSERT currently triggered and may help fixing random behaviours in Cc. CORE-14285 CORE-14401 CORE-14293
This commit is contained in:
parent
ad3bda1c8d
commit
13b57fb5b5
4 changed files with 63 additions and 26 deletions
|
@ -519,3 +519,24 @@ IsPointInRange(
|
|||
}
|
||||
|
||||
#define CcBugCheck(A, B, C) KeBugCheckEx(CACHE_MANAGER, BugCheckFileId | ((ULONG)(__LINE__)), A, B, C)
|
||||
|
||||
#if DBG
|
||||
#define CcRosVacbIncRefCount(vacb) CcRosVacbIncRefCount_(vacb,__FILE__,__LINE__)
|
||||
#define CcRosVacbDecRefCount(vacb) CcRosVacbDecRefCount_(vacb,__FILE__,__LINE__)
|
||||
|
||||
VOID
|
||||
CcRosVacbIncRefCount_(
|
||||
PROS_VACB vacb,
|
||||
PCSTR file,
|
||||
INT line);
|
||||
|
||||
VOID
|
||||
CcRosVacbDecRefCount_(
|
||||
PROS_VACB vacb,
|
||||
PCSTR file,
|
||||
INT line);
|
||||
|
||||
#else
|
||||
#define CcRosVacbIncRefCount(vacb) (++((vacb)->ReferenceCount))
|
||||
#define CcRosVacbDecRefCount(vacb) (--((vacb)->ReferenceCount))
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue