nn::os::ManagedThread::TryInitializeUsingAutoStack Member Function

Syntax

#include <nn/os.h>

template <typename T, typename U>
nn::Result TryInitializeUsingAutoStack(
     void(*)(T) f,
     U param,
     size_t stackSize,
     s32 priority = PRIORITY_DEFAULT,
     s32 coreNo = CORE_NO_DEFAULT
);

template <typename T>
nn::Result TryInitializeUsingAutoStack(
     void(*)(T *) f,
     const T & param,
     size_t stackSize,
     s32 priority = PRIORITY_DEFAULT,
     s32 coreNo = CORE_NO_DEFAULT
);

template <typename T>
nn::Result TryInitializeUsingAutoStack(
     void(*)(const T *) f,
     const T & param,
     size_t stackSize,
     s32 priority = PRIORITY_DEFAULT,
     s32 coreNo = CORE_NO_DEFAULT
);

nn::Result TryInitializeUsingAutoStack(
     void(*)() f,
     size_t stackSize,
     s32 priority = PRIORITY_DEFAULT,
     s32 coreNo = CORE_NO_DEFAULT
);

List of Overloaded Member Functions

TryInitializeUsingAutoStack ( void(*)(T), U, size_t, s32, s32 ) Automatically allocates stack and creates thread.
TryInitializeUsingAutoStack ( void(*)(T *), const T &, size_t, s32, s32 ) Automatically allocates stack and creates thread.
TryInitializeUsingAutoStack ( void(*)(const T *), const T &, size_t, s32, s32 ) Automatically allocates stack and creates thread.
TryInitializeUsingAutoStack ( void(*)(), size_t, s32, s32 ) Automatically allocates stack and creates thread.

Description of ITryInitializeUsingAutoStack ( void(*)(T), U, size_t, s32, s32 )

Uses AutoStackManager to allocate a stack and create a thread. To actually begin the processing of the thread you need to call Start.

The only argument this function takes is the size of stack to use. For allocation and deallocation of the memory region used for the stack, the processing is transferred to AutoStackManager as configured by Thread::SetAutoStackManager.

You need to call InitializeEnvironment before using ManagedThread.

Description of TryInitializeUsingAutoStack ( void(*)(T *), const T &, size_t, s32, s32 )

Performs the same processing as the TryInitializeUsingAutoStack<T, U> 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 TryInitializeUsingAutoStack<T, U> function.

Description of ITryInitializeUsingAutoStack ( void(*)(const T *), const T &, size_t, s32, s32 )

Performs the same processing as the TryInitializeUsingAutoStack<T, U> 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 TryInitializeUsingAutoStack<T, U> function.

Description of ITryInitializeUsingAutoStack ( void(*)(), size_t, s32, s32 )

Performs the same processing as the TryInitializeUsingAutoStack<T, U> function, with the exception that a function that does not take arguments is used as the thread function. For details, see the TryInitializeUsingAutoStack<T, U> function.


CONFIDENTIAL