|
Queue::QueueStatus | bareSendNonBlock (BareQueueHandle &handle, const U8 *buffer, NATIVE_INT_TYPE size, NATIVE_INT_TYPE priority) |
|
Queue::QueueStatus | bareSendBlock (BareQueueHandle &handle, const U8 *buffer, NATIVE_INT_TYPE size, NATIVE_INT_TYPE priority) |
|
Queue::QueueStatus | bareReceiveNonBlock (BareQueueHandle &handle, U8 *buffer, NATIVE_INT_TYPE capacity, NATIVE_INT_TYPE &actualSize, NATIVE_INT_TYPE &priority) |
|
Queue::QueueStatus | bareReceiveBlock (BareQueueHandle &handle, U8 *buffer, NATIVE_INT_TYPE capacity, NATIVE_INT_TYPE &actualSize, NATIVE_INT_TYPE &priority) |
|
U64 | getCpuUsed (U32 cpu_data[4]) |
|
U64 | getCpuTotal (U32 cpu_data[4]) |
|
SystemResources::SystemResourcesStatus | openProcStatFile (FILE *&fp) |
|
SystemResources::SystemResourcesStatus | readProcStatLine (FILE *fp, char proc_stat_line[LINE_SIZE]) |
|
SystemResources::SystemResourcesStatus | getCpuDataLine (FILE *fp, U32 cpu_index, char proc_stat_line[LINE_SIZE]) |
|
SystemResources::SystemResourcesStatus | parseCpuData (char proc_stat_line[LINE_SIZE], U32 cpu_data[4]) |
|
SystemResources::SystemResourcesStatus | getCpuData (U32 cpu_index, U32 cpu_data[4]) |
|
U64 | getMemoryTotal (FwSizeType total_ram, FwSizeType memory_unit) |
|
U64 | getMemoryUsed (FwSizeType total_ram, FwSizeType free_ram, FwSizeType memory_unit) |
|
bool | checkCastingAndTypeErrors (FwSizeType total_ram, FwSizeType free_ram, FwSizeType memory_unit, const struct sysinfo &memory_info) |
|
bool | checkInvalidMemoryCalculation (FwSizeType total_ram, FwSizeType free_ram) |
|
bool | checkMultiplicationOverflow (FwSizeType total_ram, FwSizeType memory_unit) |
|
Queue::QueueStatus | sendNonBlockIPCStub (QueueHandle *queueHandle, const U8 *buffer, NATIVE_INT_TYPE size, NATIVE_INT_TYPE priority) |
|
Queue::QueueStatus | sendBlockIPCStub (QueueHandle *queueHandle, const U8 *buffer, NATIVE_INT_TYPE size, NATIVE_INT_TYPE priority) |
|
Queue::QueueStatus | receiveNonBlockIPCStub (QueueHandle *queueHandle, U8 *buffer, NATIVE_INT_TYPE capacity, NATIVE_INT_TYPE &actualSize, NATIVE_INT_TYPE &priority) |
|
Queue::QueueStatus | receiveBlockIPCStub (QueueHandle *queueHandle, U8 *buffer, NATIVE_INT_TYPE capacity, NATIVE_INT_TYPE &actualSize, NATIVE_INT_TYPE &priority) |
|
kern_return_t | vm_stat_helper (FwSizeType &used, FwSizeType &total) |
| reads macOS virtual memory statistics for memory calculation
|
|
kern_return_t | cpu_data_helper (processor_cpu_load_info_t &cpu_load_info, U32 &cpu_count) |
| helper around raw CPU capture API
|
|
kern_return_t | cpu_by_index (U32 cpu_index, FwSizeType &used, FwSizeType &total) |
| Query for a single CPU's ticks information.
|
|
void | validate_arguments (NATIVE_UINT_TYPE &priority, NATIVE_UINT_TYPE &stack, NATIVE_UINT_TYPE &affinity, bool expect_perm) |
|
Task::TaskStatus | set_stack_size (pthread_attr_t &att, NATIVE_UINT_TYPE stack) |
|
Task::TaskStatus | set_priority_params (pthread_attr_t &att, NATIVE_UINT_TYPE priority) |
|
Task::TaskStatus | set_cpu_affinity (pthread_attr_t &att, NATIVE_UINT_TYPE cpuAffinity) |
|
Task::TaskStatus | create_pthread (NATIVE_UINT_TYPE priority, NATIVE_UINT_TYPE stackSize, NATIVE_UINT_TYPE cpuAffinity, pthread_t *&tid, void *arg, bool expect_perm) |
|
NATIVE_UINT_TYPE | checkoutIndex (PriorityQueue *pQueue, NATIVE_UINT_TYPE depth) |
|
void | returnIndex (PriorityQueue *pQueue, NATIVE_UINT_TYPE depth, NATIVE_UINT_TYPE index) |
|
Queue::QueueStatus | sendNonBlock (QueueHandle *queueHandle, const U8 *buffer, NATIVE_INT_TYPE size, NATIVE_INT_TYPE priority) |
|
Queue::QueueStatus | sendBlock (QueueHandle *queueHandle, const U8 *buffer, NATIVE_INT_TYPE size, NATIVE_INT_TYPE priority) |
|
Queue::QueueStatus | receiveNonBlock (QueueHandle *queueHandle, U8 *buffer, NATIVE_INT_TYPE capacity, NATIVE_INT_TYPE &actualSize, NATIVE_INT_TYPE &priority) |
|
Queue::QueueStatus | receiveBlock (QueueHandle *queueHandle, U8 *buffer, NATIVE_INT_TYPE capacity, NATIVE_INT_TYPE &actualSize, NATIVE_INT_TYPE &priority) |
|
void | registerReadInterceptor (ReadInterceptor funcPtr, void *ptr) |
|
void | clearReadInterceptor () |
|
void | registerWriteInterceptor (WriteInterceptor funcPtr, void *ptr) |
|
void | clearWriteInterceptor () |
|
void | registerOpenInterceptor (OpenInterceptor funcPtr, void *ptr) |
|
void | clearOpenInterceptor () |
|
void | registerSeekInterceptor (SeekInterceptor funcPtr, void *ptr) |
|
void | clearSeekInterceptor () |
|
void | setLastError (NATIVE_INT_TYPE error) |
|
File::Status | computeHash (const char *fileName, Utils::HashBuffer &hashBuffer) |
|
File::Status | readHash (const char *hashFileName, Utils::HashBuffer &hashBuffer) |
|
File::Status | writeHash (const char *hashFileName, Utils::HashBuffer hashBuffer) |
|
ValidateFile::Status | translateStatus (File::Status status, StatusFileType type) |
|
IntervalTimer.hpp:
Interval timer provides timing over a set interval to the caller. It is one of the core Os package supplied items.
IntervalTimerCommon.cpp:
Contains the common functions for interval timer. This set of functions makes no assumption on the format of the RawTime objects and thus it operates through functions that abstract that implementation away, or it is working on the raw values, as raw values.
Note: If the RawTime object is using U32 upper to store seconds and U32 lower to store nano seconds, then X86/IntervalTimer.cpp can be used, and the implementer need only fill in the getRawTime function for the specific OS.
File: Os/Log.hpp Description: this file provides an implementation of the Fw::Logger class that is backed by the Os abstraction layer.
File: Os/LogPrintf.cpp Description: an implementation on the Os::Log abstraction that routes log messages into standard printf calls.
Posix/IntervalTimer.cpp:
The Posix implementation of the interval timer shares the same raw setup as other X86 implementations. That is: the lower U32 of the RawTime is nano-seconds, and the upper U32 of RawTime object is seconds. Thus only the "getRawTime" function differs from the base X86 version of this file.
Queue.hpp:
Queues are used internally to F prime in order to support the messaging between components. The Queue class is used to abstract away from the standard OS-based queue, allowing F prime support multiple OSes in a consistent way.
Like most items in the OS package, the implementation is done in two parts. One part is the file QueueCommon.cpp
. It contains the shared code for queues regardless of the OS. The other is a .cpp file containing the OS specific backends for defined functions. (i.e. Posix/Queue.cpp).
X86/IntervalTimer.cpp:
This file supports the core functions of the IntervalTimer for X86 implementations that support the following specification for the "RawTime" object:
RawTime.lower = nanoseconds of time RawTime.upper = seconds of time.
Any implementation that fills "RawTime" via this specification can use these basic implementations.
Note: this file is cloned from the original Linux implementation.