Lifecycle management of threads #29

Merged
harraiken merged 240 commits from threads into master 2026-09-07 13:45:09 +02:00
2 changed files with 44 additions and 0 deletions
Showing only changes of commit f436efbd11 - Show all commits

View File

@@ -22,6 +22,11 @@ namespace OB
STATIC GENERAL_LOOKASIDE NameBufferList;
public:
STATIC XTFASTCALL VOID InitializeObjectAttributes(OUT POBJECT_ATTRIBUTES ObjectAttributes,
IN PUNICODE_STRING ObjectName,
IN ULONG Attributes,
IN HANDLE Directory,
IN PVOID SecurityDescriptor);
STATIC XTAPI XTSTATUS InitializeObjectManager(VOID);
STATIC XTAPI VOID InitializeSystemLookasideList(VOID);
};

View File

@@ -9,6 +9,45 @@
#include <xtos.hh>
/**
* Initializes an object attributes structure.
*
* @param ObjectAttributes
* Supplies a pointer to the object attributes structure to be initialized.
*
* @param ObjectName
* Supplies an optional pointer to a Unicode string representing the object name.
*
* @param Attributes
* Supplies a bitmask of flags controlling object behavior.
*
* @param Directory
* Supplies an optional handle to the root directory for relative path parsing.
*
* @param SecurityDescriptor
* Supplies an optional pointer to a security descriptor for the object.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTFASTCALL
VOID
OB::Manager::InitializeObjectAttributes(OUT POBJECT_ATTRIBUTES ObjectAttributes,
IN PUNICODE_STRING ObjectName,
IN ULONG Attributes,
IN HANDLE Directory,
IN PVOID SecurityDescriptor)
{
/* Initialize the object attributes structure */
ObjectAttributes->Attributes = Attributes;
ObjectAttributes->Length = sizeof(OBJECT_ATTRIBUTES);
ObjectAttributes->ObjectName = ObjectName;
ObjectAttributes->RootDirectory = Directory;
ObjectAttributes->SecurityDescriptor = SecurityDescriptor;
ObjectAttributes->SecurityQualityOfService = NULLPTR;
}
/**
* Initializes the Object Manager subsystem.
*