nn::os namespace

Namespaces

namespace detail

Classes

struct ConditionVariableType
union CpuRegister
struct EventType
union FpuRegister
Armv8 NEON register.
struct LightEventType
struct MessageQueueType
class Mutex
struct MutexType
struct SemaphoreType
struct SystemEvent
struct SystemEventType
struct ThreadType
struct TlsSlot
struct UserExceptionInfo

Enums

enum ConditionVariableStatus { ConditionVariableStatus_Timeout, ConditionVariableStatus_NoTimeout }
enum EventClearMode { EventClearMode_ManualClear, EventClearMode_AutoClear }

Typedefs

using ThreadFunction = void(*)(void*)
using Tick = u64
using Event = EventType

Functions

void InitializeMutex(MutexType*, bool, s32)
void FinalizeMutex(MutexType*)
void LockMutex(MutexType*)
auto TryLockMutex(MutexType*) -> bool
void UnlockMutex(MutexType*)
auto IsMutexLockedByCurrentThread(const MutexType*) -> bool
void SetHostArgc(s32)
auto GetHostArgc() -> s32
void SetHostArgv(char**)
auto GetHostArgv() -> char**
void InitializeVirtualAddressMemory()
auto AllocateAddressRegion(u64*, u64) -> Result
auto AllocateMemory(u64*, u64) -> Result
auto AllocateMemoryPages(u64, u64) -> Result
void AllocateMemoryBlock(u64*, u64)
void FreeMemoryBlock(u64, u64)
void SetMemoryHeapSize(u64)
void InitializeMessageQueue(nn::os::MessageQueueType*, u64* buf, u64 queueCount)
void FinalizeMessageQueue(nn::os::MessageQueueType*)
auto TrySendMessageQueue(MessageQueueType*, u64) -> bool
void SendMessageQueue(MessageQueueType*, u64)
auto TimedSendMessageQueue(MessageQueueType*, u64, nn::TimeSpan) -> bool
auto TryReceiveMessageQueue(u64* out, MessageQueueType*) -> bool
void ReceiveMessageQueue(u64* out, MessageQueueType*)
auto TimedReceiveMessageQueue(u64* out, MessageQueueType*, nn::TimeSpan) -> bool
auto TryPeekMessageQueue(u64*, MessageQueueType const*) -> bool
void PeekMessageQueue(u64*, MessageQueueType const*)
auto TimedPeekMessageQueue(u64*, MessageQueueType const*) -> bool
auto TryJamMessageQueue(nn::os::MessageQueueType*, u64) -> bool
void JamMessageQueue(nn::os::MessageQueueType*, u64)
auto TimedJamMessageQueue(nn::os::MessageQueueType*, u64, nn::TimeSpan) -> bool
void InitializeConditionVariable(ConditionVariableType*)
void FinalizeConditionVariable(ConditionVariableType*)
void SignalConditionVariable(ConditionVariableType*)
void BroadcastConditionVariable(ConditionVariableType*)
void WaitConditionVariable(ConditionVariableType*)
auto TimedWaitConditionVariable(ConditionVariableType*, nn::os::MutexType*, nn::TimeSpan) -> u8
auto CreateThread(nn::os::ThreadType*, void(*)(void*), void* arg, void* srcStack, u64 stackSize, s32 priority, s32 coreNum) -> Result
auto CreateThread(nn::os::ThreadType*, void(*)(void*), void* arg, void* srcStack, u64 stackSize, s32 priority) -> Result
void DestroyThread(nn::os::ThreadType*)
void StartThread(nn::os::ThreadType*)
void SetThreadName(nn::os::ThreadType*, char const* threadName)
void SetThreadNamePointer(nn::os::ThreadType*, char const*)
auto GetThreadNamePointer(nn::os::ThreadType const*) -> char*
auto GetCurrentThread() -> nn::os::ThreadType*
void GetCurrentStackInfo(uintptr_t* stack_addr, size_t* stack_size)
auto ChangeThreadPriority(nn::os::ThreadType* thread, s32 priority) -> s32
auto GetThreadPriority(nn::os::ThreadType const* thread) -> s32
auto GetThreadId(const nn::os::ThreadType* thread) -> u64
void YieldThread()
void SuspendThread(nn::os::ThreadType*)
void ResumeThread(nn::os::ThreadType*)
void SleepThread(nn::TimeSpan)
void WaitThread(nn::os::ThreadType*)
void SetThreadCoreMask(nn::os::ThreadType*, int, u64 mask)
void InitializeEvent(EventType*, bool initiallySignaled, EventClearMode eventClearMode)
void FinalizeEvent(EventType*)
void SignalEvent(EventType*)
void WaitEvent(EventType*)
auto TryWaitEvent(EventType*) -> bool
auto TimedWaitEvent(EventType*, nn::TimeSpan) -> bool
void ClearEvent(EventType*)
void InitializeLightEvent(LightEventType*, bool initiallySignaled, EventClearMode eventClearMode)
void FinalizeLightEvent(LightEventType*)
void SignalLightEvent(LightEventType*)
void WaitLightEvent(LightEventType*)
auto TimedWaitLightEvent(LightEventType*, nn::TimeSpan) -> bool
void ClearLightEvent(LightEventType*)
auto ConvertToTimeSpan(Tick ticks) -> TimeSpan
void InitializeSemaphore(SemaphoreType* semaphore, s32 initial_count, s32 max_count)
void FinalizeSemaphore(SemaphoreType* semaphore)
void AcquireSemaphore(SemaphoreType* semaphore)
auto TryAcquireSemaphore(SemaphoreType* semaphore) -> bool
void ReleaseSemaphore(SemaphoreType* semaphore)
void SetUserExceptionHandler(void(*)(UserExceptionInfo*), void*, ulong, UserExceptionInfo*)
void GenerateRandomBytes(void*, u64)
auto GetSystemTick() -> nn::os::Tick
auto GetSystemTickFrequency() -> nn::os::Tick
auto GetThreadAvailableCoreMask() -> u64
auto AllocateTlsSlot(TlsSlot* slot_out, void(*)(u64)) -> Result
void FreeTlsSlot(TlsSlot slot)
auto GetTlsValue(TlsSlot slot) -> u64
void SetTlsValue(TlsSlot slot, u64 value)
auto GetCurrentCoreNumber() -> u32

Enum documentation

enum nn::os::EventClearMode
#include <nn/os.h>

Typedef documentation

typedef void(*nn::os::ThreadFunction)(void*)

typedef u64 nn::os::Tick
#include <nn/os.h>

typedef EventType nn::os::Event
#include <nn/os.h>

Function documentation

void nn::os::InitializeMutex(MutexType*, bool, s32)

void nn::os::FinalizeMutex(MutexType*)

void nn::os::LockMutex(MutexType*)

bool nn::os::TryLockMutex(MutexType*)

void nn::os::UnlockMutex(MutexType*)

void nn::os::SetHostArgc(s32)
#include <nn/os.h>

s32 nn::os::GetHostArgc()
#include <nn/os.h>

void nn::os::SetHostArgv(char**)
#include <nn/os.h>

char** nn::os::GetHostArgv()
#include <nn/os.h>

void nn::os::InitializeVirtualAddressMemory()
#include <nn/os.h>

Result nn::os::AllocateMemory(u64*, u64)
#include <nn/os.h>

void nn::os::AllocateMemoryBlock(u64*, u64)
#include <nn/os.h>

void nn::os::FreeMemoryBlock(u64, u64)
#include <nn/os.h>

void nn::os::SetMemoryHeapSize(u64)
#include <nn/os.h>

void nn::os::InitializeMessageQueue(nn::os::MessageQueueType*, u64* buf, u64 queueCount)
#include <nn/os.h>

void nn::os::SendMessageQueue(MessageQueueType*, u64)
#include <nn/os.h>

bool nn::os::TryReceiveMessageQueue(u64* out, MessageQueueType*)
#include <nn/os.h>

void nn::os::ReceiveMessageQueue(u64* out, MessageQueueType*)
#include <nn/os.h>

bool nn::os::TryPeekMessageQueue(u64*, MessageQueueType const*)
#include <nn/os.h>

void nn::os::PeekMessageQueue(u64*, MessageQueueType const*)
#include <nn/os.h>

bool nn::os::TimedPeekMessageQueue(u64*, MessageQueueType const*)
#include <nn/os.h>

Result nn::os::CreateThread(nn::os::ThreadType*, void(*)(void*), void* arg, void* srcStack, u64 stackSize, s32 priority, s32 coreNum)
#include <nn/os.h>

Result nn::os::CreateThread(nn::os::ThreadType*, void(*)(void*), void* arg, void* srcStack, u64 stackSize, s32 priority)
#include <nn/os.h>

void nn::os::DestroyThread(nn::os::ThreadType*)
#include <nn/os.h>

void nn::os::StartThread(nn::os::ThreadType*)
#include <nn/os.h>

void nn::os::SetThreadName(nn::os::ThreadType*, char const* threadName)
#include <nn/os.h>

void nn::os::SetThreadNamePointer(nn::os::ThreadType*, char const*)
#include <nn/os.h>

char* nn::os::GetThreadNamePointer(nn::os::ThreadType const*)
#include <nn/os.h>

void nn::os::GetCurrentStackInfo(uintptr_t* stack_addr, size_t* stack_size)
#include <nn/os.h>

s32 nn::os::ChangeThreadPriority(nn::os::ThreadType* thread, s32 priority)
#include <nn/os.h>

s32 nn::os::GetThreadPriority(nn::os::ThreadType const* thread)
#include <nn/os.h>

u64 nn::os::GetThreadId(const nn::os::ThreadType* thread)
#include <nn/os.h>

void nn::os::YieldThread()
#include <nn/os.h>

void nn::os::SuspendThread(nn::os::ThreadType*)
#include <nn/os.h>

void nn::os::ResumeThread(nn::os::ThreadType*)
#include <nn/os.h>

void nn::os::SleepThread(nn::TimeSpan)
#include <nn/os.h>

void nn::os::WaitThread(nn::os::ThreadType*)
#include <nn/os.h>

void nn::os::SetThreadCoreMask(nn::os::ThreadType*, int, u64 mask)
#include <nn/os.h>

void nn::os::InitializeEvent(EventType*, bool initiallySignaled, EventClearMode eventClearMode)
#include <nn/os.h>

void nn::os::FinalizeEvent(EventType*)
#include <nn/os.h>

void nn::os::SignalEvent(EventType*)
#include <nn/os.h>

void nn::os::WaitEvent(EventType*)
#include <nn/os.h>

bool nn::os::TryWaitEvent(EventType*)
#include <nn/os.h>

bool nn::os::TimedWaitEvent(EventType*, nn::TimeSpan)
#include <nn/os.h>

void nn::os::ClearEvent(EventType*)
#include <nn/os.h>

void nn::os::InitializeLightEvent(LightEventType*, bool initiallySignaled, EventClearMode eventClearMode)
#include <nn/os.h>

void nn::os::FinalizeLightEvent(LightEventType*)
#include <nn/os.h>

void nn::os::SignalLightEvent(LightEventType*)
#include <nn/os.h>

void nn::os::WaitLightEvent(LightEventType*)
#include <nn/os.h>

void nn::os::ClearLightEvent(LightEventType*)
#include <nn/os.h>

TimeSpan nn::os::ConvertToTimeSpan(Tick ticks)
#include <nn/os.h>

void nn::os::InitializeSemaphore(SemaphoreType* semaphore, s32 initial_count, s32 max_count)
#include <nn/os.h>

void nn::os::FinalizeSemaphore(SemaphoreType* semaphore)
#include <nn/os.h>

void nn::os::AcquireSemaphore(SemaphoreType* semaphore)
#include <nn/os.h>

bool nn::os::TryAcquireSemaphore(SemaphoreType* semaphore)
#include <nn/os.h>

void nn::os::ReleaseSemaphore(SemaphoreType* semaphore)
#include <nn/os.h>

void nn::os::SetUserExceptionHandler(void(*)(UserExceptionInfo*), void*, ulong, UserExceptionInfo*)
#include <nn/os.h>

void nn::os::GenerateRandomBytes(void*, u64)
#include <nn/os.h>

nn::os::Tick nn::os::GetSystemTick()
#include <nn/os.h>

Result nn::os::AllocateTlsSlot(TlsSlot* slot_out, void(*)(u64))
#include <nn/os.h>

void nn::os::FreeTlsSlot(TlsSlot slot)
#include <nn/os.h>

u64 nn::os::GetTlsValue(TlsSlot slot)
#include <nn/os.h>

void nn::os::SetTlsValue(TlsSlot slot, u64 value)
#include <nn/os.h>

u32 nn::os::GetCurrentCoreNumber()
#include <nn/os.h>