CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
cmlabs::ThreadDataHeader Struct Reference

Header at the start of the ThreadManager's contiguous storage block. More...

#include <ThreadManager.h>

Public Attributes

uint32 size
 Total size of the storage block in bytes.
uint32 count
 Capacity: number of ThreadStats slots allocated.
uint32 activeCount
 Number of slots currently holding a live (non-terminated) thread.
uint32 statColPolicy
 Statistics collection policy (THREAD_STATS_OFF / ADHOC / central), from utils::GetThreadStatColAbility().
uint64 time [10]
 Rolling timestamps of process-wide summary samples (newest first).
uint64 currentCPUTicks [10]
 Rolling process-wide summed CPU ticks matching time.
uint32 bitFieldSize
 Size in bytes of the slot-occupancy bitfield that follows this header.

Detailed Description

Header at the start of the ThreadManager's contiguous storage block.

The block layout is: ThreadDataHeader, then an occupancy bitfield of bitFieldSize bytes (one bit per slot; see GETTHREADSTATS), then count ThreadStats records. The whole block is a single malloc'ed region so it can be resized and snapshotted atomically under the manager's mutex.

Definition at line 128 of file ThreadManager.h.

Member Data Documentation

◆ activeCount

◆ bitFieldSize

uint32 cmlabs::ThreadDataHeader::bitFieldSize

Size in bytes of the slot-occupancy bitfield that follows this header.

Definition at line 135 of file ThreadManager.h.

Referenced by cmlabs::ThreadManager::createThread(), and cmlabs::ThreadManager::resizeThreadStorage().

◆ count

◆ currentCPUTicks

uint64 cmlabs::ThreadDataHeader::currentCPUTicks[10]

Rolling process-wide summed CPU ticks matching time.

Definition at line 134 of file ThreadManager.h.

◆ size

uint32 cmlabs::ThreadDataHeader::size

Total size of the storage block in bytes.

Definition at line 129 of file ThreadManager.h.

Referenced by cmlabs::ThreadManager::resizeThreadStorage().

◆ statColPolicy

uint32 cmlabs::ThreadDataHeader::statColPolicy

Statistics collection policy (THREAD_STATS_OFF / ADHOC / central), from utils::GetThreadStatColAbility().

Definition at line 132 of file ThreadManager.h.

Referenced by cmlabs::ThreadManager::resizeThreadStorage().

◆ time

uint64 cmlabs::ThreadDataHeader::time[10]

Rolling timestamps of process-wide summary samples (newest first).

Definition at line 133 of file ThreadManager.h.


The documentation for this struct was generated from the following file: