DtvKit_ATSC3.0
Loading...
Searching...
No Matches
atsccore_plf_os.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3 *
4 * This file is part of a DTVKit Software Component
5 * You are permitted to copy, modify or distribute this file subject to the terms
6 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
7 *
8 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
9 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
10 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
11 *
12 * If you or your organisation is not a member of DTVKit then you have access
13 * to this source code outside of the terms of the licence agreement
14 * and you are expected to delete this and any associated files immediately.
15 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
16 *******************************************************************************/
17
18#ifndef _ATSCCORE_PLF_OS_H
19#define _ATSCCORE_PLF_OS_H
20
21#include <stdio.h>
22#include <pthread.h>
23#include <time.h>
24#include <mqueue.h>
25#include <semaphore.h>
26
27#include "atsc_basetype.h"
28
39uint64_t STB_OSCreateTask(void *(*function)(void *), void *pParam, uint32_t iStack, uint8_t cPriority, uint8_t *pName);
40
47void STB_OSTaskDelay(uint32_t iTimeout);
48
55void STB_OSDestroyTask(void *pTask);
56
63int32_t STB_OSTaskPriority(void *pTask, uint32_t iPriority);
64
71uint64_t STB_OSGetCurrentTask(void);
72
79int32_t STB_OSCreateQueue(char *pQueueName);
80
87int32_t STB_OSReadQueue(int32_t iQueueDescriptor, char *pMsg, uint16_t iMsgSize);
88
95int32_t STB_OSWriteQueue(int32_t iQueueDescriptor, const char *pMsg, uint16_t iMsgSize, uint16_t iPriority );
96
103int32_t STB_OSDestroyQueue(char *pQueueName);
104
111void *STB_OSCreateSemaphore(char *pSemName, int32_t iBufSize);
112
119void STB_OSDeleteSemaphore(void *pSemaphore, char *pSemName);
120
127void STB_OSSemaphoreWait(void *pSemaphore);
128
135void STB_OSSemaphoreSignal(void *pSemaphore);
136
144int32_t STB_OSSemaphoreWaitTimeout(void *pSemaphore, uint16_t iTimeout);
145
152void STB_OSCreateMutex(void *pPtr);
153
160void STB_OSMutexLock(void *pMutex);
161
168void STB_OSMutexUnlock(void *pMutex);
169
176int32_t STB_OSDeleteMutex(void *pMutex);
177
178#endif /* _ATSCCORE_PLF_OS_H */
uint64_t STB_OSGetCurrentTask(void)
Returns the Task ID of the currently executing task.