TryStartUsingAutoStack

nn::os::Thread::TryStartUsingAutoStack Member Function

Syntax

#include <nn/os.h>

template <typename T, typename U>
nn::Result TryStartUsingAutoStack(
     void(*)(T) f,
     U param,
     size_t stackSize,
     s32 priority = DEFAULT_THREAD_PRIORITY,
     s32 coreNo = CORE_NO_USE_PROCESS_VALUE
);

Template Arguments

Name Description
T Data type of argument(s) of the function to run (this type must be copyable).
U A type that can be converted to T.

Parameters

Name Description
in f Pointer to the function to begin running.
in param Argument to pass to the function that begins execution.
in stackSize The stack size.
in priority Priority of the thread.
in coreNo Preferred processor for the thread.

Return Values

Returns the function's execution result.

Description

Tries to initialize and run a thread.

This function attempts to initialize and run a thread; it returns an error if it fails because of insufficient resources or for any other such reason.

See Also

StartUsingAutoStack

Revision History

2011/09/01
Deleted the note about specifying a preferred processor.
2011/06/22
Added a note about specifying a preferred processor.
2010/03/28
Clarified restrictions on stackSize argument.
2010/01/07
Initial version.

CONFIDENTIAL