11 #ifndef ZFORCE_OSABSTRACTIONLAYER_H
12 #define ZFORCE_OSABSTRACTIONLAYER_H 1
14 #ifndef ZFORCECOMMON_H
15 #error Please include "zForceCommon.h" before this file.
58 void * ( * Malloc) (
size_t size);
69 void ( *
Free) (
void * memoryPointer);
85 void * ( * Realloc) (
void * memoryPointer,
size_t size);
101 void * ( * MallocWithPattern) (
size_t size, uint8_t pattern);
291 void ( *
Sleep) (uint32_t milliSeconds);
299 DLLINTERNAL
bool OsAbstractionLayer_Initialize (
OsAbstractionLayer * osAbstractionLayer,
void zForceThread
Typecast to underlying (system) type.
Definition: OsAbstractionLayer.h:20
void zForceSemaphore
Typecast to underlying (system) type.
Definition: OsAbstractionLayer.h:19
void zForceMutex
Typecast to underlying (system) type.
Definition: OsAbstractionLayer.h:18
Overrides for OS Functions.
Definition: OsAbstractionLayer.h:44
void(* Sleep)(uint32_t milliSeconds)
Sleep for a specified amount of MilliSeconds.
Definition: OsAbstractionLayer.h:291
void(* Free)(void *memoryPointer)
Free previously allocated memory area.
Definition: OsAbstractionLayer.h:69
bool(* InitializeMutex)(zForceMutex **zForceMutex)
Initialize Mutex.
Definition: OsAbstractionLayer.h:116
uint64_t(* GetTimeMilliSeconds)(void)
Get time in MilliSeconds.
Definition: OsAbstractionLayer.h:245
bool(* IncrementSemaphore)(zForceSemaphore *zForceSemaphore)
Increment Semaphore.
Definition: OsAbstractionLayer.h:217
bool(* DestroyMutex)(zForceMutex *zForceMutex)
Destroy Mutex.
Definition: OsAbstractionLayer.h:161
bool(* InitializeSemaphore)(zForceSemaphore **zForceSemaphore, uint32_t initialValue)
Initialize Semaphore.
Definition: OsAbstractionLayer.h:182
bool(* DestroySemaphore)(zForceSemaphore *zForceSemaphore)
Destroy Semaphore.
Definition: OsAbstractionLayer.h:233
bool(* LockMutex)(zForceMutex *zForceMutex)
Lock Mutex.
Definition: OsAbstractionLayer.h:131
bool(* CreateThread)(zForceThread **zForceThread, void(*entryPoint)(void *), void *arguments)
Create Thread and run it.
Definition: OsAbstractionLayer.h:263
bool(* UnlockMutex)(zForceMutex *zForceMutex)
Unlock Mutex.
Definition: OsAbstractionLayer.h:146
bool(* WaitForThreadExit)(zForceThread *zForceThread)
Wait for Thread to exit.
Definition: OsAbstractionLayer.h:279
bool(* WaitForSemaphore)(zForceSemaphore *zForceSemaphore, uint32_t timeoutMs)
Wait for Semaphore.
Definition: OsAbstractionLayer.h:201
Wrapper for threads.
Definition: OsAbstractionLayer.h:30
void(* EntryPoint)(void *)
Entry function for the thread.
Definition: OsAbstractionLayer.h:32
zForceThread * zForceThread
Thread pointer.
Definition: OsAbstractionLayer.h:31
void * Arguments
Arguments for the entry function.
Definition: OsAbstractionLayer.h:33