![]() |
DVBCore
22.3.0
Open Source DVB Engine
|
System Interface, Operating System. More...
#include <stdio.h>
#include <techtype.h>
#include <dbgfuncs.h>
#include "stbhwos.h"
#include "stbheap.h"
#include "hbbtv_sif_types.h"
Functions | |
void * | HBBTV_OSAlloc (U32BIT size) |
Allocates the specified number of bytes. More... | |
void | HBBTV_OSFree (void *ptr) |
Releases previously allocated memory. More... | |
void * | HBBTV_OSCreateMutex (void) |
Creates a new mutex. More... | |
void | HBBTV_OSDeleteMutex (void *mutex) |
Deletes an exisiting mutex. More... | |
void | HBBTV_OSMutexLock (void *mutex) |
Locks the specified mutex. More... | |
void | HBBTV_OSMutexUnlock (void *mutex) |
Unlocks the specified mutex. More... | |
void * | HBBTV_OSCreateCountSemaphore (U32BIT value) |
Creates a new counting semaphore, with the count set to value. More... | |
void | HBBTV_OSDeleteSemaphore (void *semaphore) |
Deletes an exisiting semaphore. More... | |
void | HBBTV_OSSemaphoreWait (void *semaphore) |
Waits for specified semaphore to be cleared. More... | |
BOOLEAN | HBBTV_OSSemaphoreWaitTimeout (void *semaphore, U16BIT timeout) |
Waits a specified timeout period for a specified semaphore to be cleared. More... | |
void | HBBTV_OSSemaphoreSignal (void *semaphore) |
Clears specified semaphore. More... | |
void * | HBBTV_OSCreateTask (void(*function)(void *), void *param, U32BIT stack, U8BIT priority, U8BIT *name) |
Creates a new task. More... | |
void | HBBTV_OSDestroyTask (void *task_id) |
Destroys the specified task. More... | |
void | HBBTV_OSTaskDelay (U16BIT time) |
Suspends current task for given period. More... | |
U32BIT | HBBTV_OSGetClockMilliseconds (void) |
Returns the number of milliseconds since the system booted. More... | |
U32BIT | HBBTV_OSGetTimeNow (void) |
Returns the current time. More... | |
void * | HBBTV_OSCreateQueue (U16BIT msg_size, U16BIT msg_max) |
Creates a new message queue. More... | |
void | HBBTV_OSDeleteQueue (void *queue) |
Deletes the specified message queue. More... | |
BOOLEAN | HBBTV_OSReadQueue (void *queue, void *msg, U16BIT msg_size, U16BIT timeout) |
Reads a message from specified queue. More... | |
BOOLEAN | HBBTV_OSWriteQueue (void *queue, void *msg, U16BIT msg_size, U16BIT timeout) |
Writes a message to specified queue. More... | |
System Interface, Operating System.
void* HBBTV_OSAlloc | ( | U32BIT | size | ) |
Allocates the specified number of bytes.
size | Required size of new memory block. |
void* HBBTV_OSCreateCountSemaphore | ( | U32BIT | value | ) |
Creates a new counting semaphore, with the count set to value.
value | Initial value of count |
void* HBBTV_OSCreateMutex | ( | void | ) |
Creates a new mutex.
void* HBBTV_OSCreateQueue | ( | U16BIT | msg_size, |
U16BIT | msg_max | ||
) |
Creates a new message queue.
msg_size | Size of each message in queue |
msg_max | Maximum number of messages in queue |
void* HBBTV_OSCreateTask | ( | void(*)(void *) | function, |
void * | param, | ||
U32BIT | stack, | ||
U8BIT | priority, | ||
U8BIT * | name | ||
) |
Creates a new task.
function | Pointer to callback function |
param | Parameter of above function |
stack | Size of stack required in bytes |
priority | 0 - 15 (15 is highest) |
name | Name to assign to task |
void HBBTV_OSDeleteMutex | ( | void * | mutex | ) |
Deletes an exisiting mutex.
mutex | Mutex handle |
void HBBTV_OSDeleteQueue | ( | void * | queue | ) |
Deletes the specified message queue.
queue | Queue handle |
void HBBTV_OSDeleteSemaphore | ( | void * | semaphore | ) |
Deletes an exisiting semaphore.
semaphore | Semaphore handle |
void HBBTV_OSDestroyTask | ( | void * | task_id | ) |
Destroys the specified task.
task_id | Task handle |
void HBBTV_OSFree | ( | void * | ptr | ) |
Releases previously allocated memory.
ptr | Pointer to the memory block to be freed |
U32BIT HBBTV_OSGetClockMilliseconds | ( | void | ) |
Returns the number of milliseconds since the system booted.
U32BIT HBBTV_OSGetTimeNow | ( | void | ) |
Returns the current time.
void HBBTV_OSMutexLock | ( | void * | mutex | ) |
Locks the specified mutex.
mutex | Mutex handle |
void HBBTV_OSMutexUnlock | ( | void * | mutex | ) |
Unlocks the specified mutex.
mutex | Mutex handle |
BOOLEAN HBBTV_OSReadQueue | ( | void * | queue, |
void * | msg, | ||
U16BIT | msg_size, | ||
U16BIT | timeout | ||
) |
Reads a message from specified queue.
queue | Queue handle |
msg | Pointer to the buffer where the received message will be copied |
msg_size | Size of message |
timeout | Timeout value (ms) |
void HBBTV_OSSemaphoreSignal | ( | void * | semaphore | ) |
Clears specified semaphore.
semaphore | Semaphore handle |
void HBBTV_OSSemaphoreWait | ( | void * | semaphore | ) |
Waits for specified semaphore to be cleared.
semaphore | Semaphore handle |
BOOLEAN HBBTV_OSSemaphoreWaitTimeout | ( | void * | semaphore, |
U16BIT | timeout | ||
) |
Waits a specified timeout period for a specified semaphore to be cleared.
semaphore | Semaphore handle |
timeout | The timeout in milliseconds, HBBTV_OS_TIMEOUT_NOW or HBBTV_OS_TIMEOUT_NEVER |
void HBBTV_OSTaskDelay | ( | U16BIT | time | ) |
Suspends current task for given period.
time | Number of milliseconds the task will be suspended |
BOOLEAN HBBTV_OSWriteQueue | ( | void * | queue, |
void * | msg, | ||
U16BIT | msg_size, | ||
U16BIT | timeout | ||
) |
Writes a message to specified queue.
queue | Queue handle |
msg | Pointer to the message to be written |
msg_size | Size of message |
timeout | Timeout value (ms) |