ReactOS 0.4.16-dev-329-g9223134
object.h
Go to the documentation of this file.
1#pragma once
2
4{
8
25
26static __inline VOID
28{
29 PTHREADINFO W32Thread;
30
32 ASSERT(W32Thread != NULL);
33 ASSERT(UserReferenceEntry != NULL);
34 UserReferenceEntry->obj = obj;
36 PushEntryList(&W32Thread->ReferencesList, &UserReferenceEntry->Entry);
37#if DBG
38 W32Thread->cRefObjectCo++;
39#endif
40}
41
42static __inline VOID
44{
45 PTHREADINFO W32Thread;
46 PSINGLE_LIST_ENTRY ReferenceEntry;
47 PUSER_REFERENCE_ENTRY UserReferenceEntry;
48
49 ASSERT(obj != NULL);
51 ASSERT(W32Thread != NULL);
52 ReferenceEntry = PopEntryList(&W32Thread->ReferencesList);
53 ASSERT(ReferenceEntry != NULL);
54 UserReferenceEntry = CONTAINING_RECORD(ReferenceEntry, USER_REFERENCE_ENTRY, Entry);
55 ASSERT(UserReferenceEntry != NULL);
56
57 ASSERT(obj == UserReferenceEntry->obj);
59#if DBG
60 W32Thread->cRefObjectCo--;
61#endif
62}
63
65
66/* EOF */
unsigned char BOOLEAN
#define NULL
Definition: types.h:112
unsigned int BOOL
Definition: ntddk_ex.h:94
ASMGENDATA Table[]
Definition: genincdata.c:61
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
static const struct newhuff ht[]
Definition: huffman.h:296
enum _HANDLE_TYPE HANDLE_TYPE
#define ASSERT(a)
Definition: mode.c:44
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID Owner
Definition: rtlfuncs.h:1609
#define _In_
Definition: no_sal2.h:158
#define FASTCALL
Definition: nt_native.h:50
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
Definition: object.c:495
BOOLEAN UserDestroyObjectsForOwner(PUSER_HANDLE_TABLE Table, PVOID Owner)
Definition: object.c:754
struct _USER_REFERENCE_ENTRY USER_REFERENCE_ENTRY
static __inline VOID UserDerefObjectCo(PVOID obj)
Definition: object.h:43
PVOID FASTCALL UserAssignmentLock(PVOID *ppvObj, PVOID pvNew)
Definition: object.c:839
static __inline VOID UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
Definition: object.h:27
PVOID FASTCALL UserCreateObject(PUSER_HANDLE_TABLE ht, struct _DESKTOP *pDesktop, PTHREADINFO pti, HANDLE *h, HANDLE_TYPE type, ULONG size)
PVOID FASTCALL UserReferenceObjectByHandle(HANDLE handle, HANDLE_TYPE type)
Definition: object.c:741
BOOL FASTCALL UserDeleteObject(HANDLE h, HANDLE_TYPE type)
Definition: object.c:717
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13
BOOL FASTCALL UserObjectInDestroy(HANDLE)
Definition: object.c:703
PVOID FASTCALL ValidateHandle(HANDLE handle, HANDLE_TYPE type)
void FreeProcMarkObject(_In_ PVOID Object)
Definition: object.c:175
struct _USER_REFERENCE_ENTRY * PUSER_REFERENCE_ENTRY
BOOL FASTCALL UserCreateHandleTable(VOID)
Definition: object.c:536
BOOL FASTCALL UserDereferenceObject(PVOID obj)
Definition: object.c:644
BOOL FASTCALL UserMarkObjectDestroy(PVOID)
Definition: object.c:621
void DbgUserDumpHandleTable()
PVOID FASTCALL UserAssignmentUnlock(PVOID *ppvObj)
Definition: object.c:860
PVOID UserGetObjectNoErr(PUSER_HANDLE_TABLE, HANDLE, HANDLE_TYPE)
Definition: object.c:481
VOID FASTCALL UserReferenceObject(PVOID obj)
Definition: object.c:731
base of all file and directory entries
Definition: entries.h:83
Definition: ntbasedef.h:636
SINGLE_LIST_ENTRY ReferencesList
Definition: win32.h:157
Definition: object.h:4
SINGLE_LIST_ENTRY Entry
Definition: object.h:5
PVOID obj
Definition: object.h:6
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
FORCEINLINE VOID PushEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PSINGLE_LIST_ENTRY Entry)
Definition: rtlfuncs.h:256
FORCEINLINE PSINGLE_LIST_ENTRY PopEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead)
Definition: rtlfuncs.h:243