nn::os::ManagedThread::TryInitialize Member Function#include <nn/os.h> template <typename T, typename U, typename Stack> nn::Result TryInitialize( void(*)(T) f, U param, Stack & stack, s32 priority = PRIORITY_DEFAULT, s32 coreNo = CORE_NO_DEFAULT ); template <typename T, typename Stack> nn::Result TryInitialize( void(*)(T *) f, const T & param, Stack & stack, s32 priority = PRIORITY_DEFAULT, s32 coreNo = CORE_NO_DEFAULT ); template <typename T, typename Stack> nn::Result TryInitialize( void(*)(const T *) f, const T & param, Stack & stack, s32 priority = PRIORITY_DEFAULT, s32 coreNo = CORE_NO_DEFAULT ); template <typename Stack> nn::Result TryInitialize( void(*)() f, Stack & stack, s32 priority = PRIORITY_DEFAULT, s32 coreNo = CORE_NO_DEFAULT );
| TryInitialize ( void(*)(T), U, Stack &, s32, s32 ) | Specifies a buffer for the stack and creates a thread. |
| TryInitialize ( void(*)(T *), const T &, Stack &, s32, s32 ) | Specifies a buffer for the stack and creates a thread. |
| TryInitialize ( void(*)(const T *), const T &, Stack &, s32, s32 ) | Specifies a buffer for the stack and creates a thread. |
| TryInitialize ( void(*)(), Stack &, s32, s32 ) | Specifies a buffer for the stack and creates a thread. |
TryInitialize ( void(*)(T), U, Stack &, s32, s32 )
Uses the buffer specified by the user for a stack and creates a thread. To actually begin the processing of the thread you need to call Start.
param is copied to the buffer once the value has been passed as the stack, and then passed from there as the f argument.
The stack argument must be a class instance that has the GetStackBottom member function (which returns an uptr type value as the address of the bottom of the stack) and the GetStackSize member function (which returns a size_t type value for the stack size. StackBuffer satisfies these conditions and can be used as the argument.
You need to call InitializeEnvironment before using ManagedThread.
TryInitialize ( void(*)(T *), const T &, Stack &, s32, s32 )
Performs the same processing as the TryInitialize<T, U, Stack> function, with the exception that the data referenced by param is copied to the buffer passed as the stack, and the pointer to that copied region is passed as the f argument. For details, see the TryInitialize<T, U, Stack> function.
TryInitialize ( void(*)(const T *), const T &, Stack &, s32, s32 )
Performs the same processing as the TryInitialize<T, U, Stack> function, with the exception that the data referenced by param is copied to the buffer passed as the stack, and the pointer to that copied region is passed as the f argument. For details, see the TryInitialize<T, U, Stack> function.
TryInitialize ( void(*)(), Stack &, s32, s32 )
Performs the same processing as the TryInitialize<T, U, Stack> function, with the exception that a function that does not take arguments is used as the thread function. For details, see the TryInitialize<T, U, Stack> function.
CONFIDENTIAL