10#ifndef INC_PROCESS_SCHEDULER_H
21 auto pointer = ref_process.Leak().New(
sizeof(T));
23 if (pointer.Error())
return nullptr;
25 return reinterpret_cast<T*
>(pointer.Leak().Leak());
41 return ref_process.
Leak().Delete(obj_wrapped);
63template <
typename T,
typename... Args>
#define MUST_PASS(EXPR)
Definition KernelPanic.h:37
Kernel::Bool tls_delete_class(T *obj)
Delete a C++ class (call constructor first.).
Definition ThreadLocalStorage.inl:82
T * tls_new_ptr(void)
!
Definition ThreadLocalStorage.inl:15
Kernel::Bool tls_delete_ptr(T *obj)
Delete process pointer.
Definition ThreadLocalStorage.inl:31
T * tls_new_class(Args &&... args)
Allocate a C++ class, and then call the constructor of it.
Definition ThreadLocalStorage.inl:64
ErrorOr class for error handling.
Definition ErrorOr.h:22
Ref< T > & Leak()
Definition ErrorOr.h:43
STATIC UserProcessScheduler & The()
Retrieves the singleton of the process scheduler.
Definition UserProcessScheduler.cc:450
UPS inline definitions.
Definition Device.h:12
Args && forward(Args &arg)
Forward object.
Definition Config.h:101
bool Bool
Definition Config.h:50