stos: ob: Implement ObCreateObject() helper
The ObCreateObject() is responsible for creating and allocating new objects, we'll need this to even have directories and such. Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
@@ -9,11 +9,15 @@
|
||||
#ifndef _OB_OBJECT_H_
|
||||
#define _OB_OBJECT_H_ 1
|
||||
|
||||
#include <stapi/status.h>
|
||||
#include <stdef.h>
|
||||
|
||||
/* Maximum size of system object names */
|
||||
#define OBJECT_NAMESZ 32
|
||||
|
||||
/* Slut tag for pool allocations */
|
||||
#define OBJECT_POOL_TAG 'OB'
|
||||
|
||||
/*
|
||||
* Represents valid object types
|
||||
*
|
||||
@@ -52,4 +56,17 @@ typedef struct {
|
||||
USIZE EntryCount;
|
||||
} OBJECT_DIRECTORY;
|
||||
|
||||
/*
|
||||
* Allocate and create a new objec
|
||||
*
|
||||
* @Name: Object name
|
||||
* @Type: Object type
|
||||
* @Data: Actual backing data
|
||||
* @Result: Result is written here
|
||||
*/
|
||||
ST_STATUS ObCreateObject(
|
||||
const CHAR *Name, OBJECT_TYPE Type,
|
||||
VOID *Data, ST_OBJECT **Result
|
||||
);
|
||||
|
||||
#endif /* !_OB_OBJECT_H_ */
|
||||
|
||||
Reference in New Issue
Block a user