|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Platform Specfic Header File |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef XAPLATFORM_H |
|
19 #define XAPLATFORM_H |
|
20 |
|
21 #include "openmaxalwrapper.h" |
|
22 #include "xaglobals.h" |
|
23 |
|
24 /** MACROS **/ |
|
25 |
|
26 /** TYPES **/ |
|
27 |
|
28 typedef void* XAImplMutexHandle; |
|
29 typedef void* XAImplSemHandle; |
|
30 typedef void* XAImplThreadHandle; |
|
31 typedef void* (* XAImplThreadFunction)(void *xaThdFunAargs); |
|
32 |
|
33 /** METHODS **/ |
|
34 |
|
35 /* mutex management */ |
|
36 XAresult XAImpl_CreateMutex(XAImplMutexHandle *mtx); |
|
37 XAresult XAImpl_TryLockMutex(XAImplMutexHandle mtx); |
|
38 XAresult XAImpl_LockMutex(XAImplMutexHandle mtx); |
|
39 XAresult XAImpl_UnlockMutex(XAImplMutexHandle mtx); |
|
40 void XAImpl_DeleteMutex(XAImplMutexHandle mtx); |
|
41 |
|
42 /* semaphores */ |
|
43 XAresult XAImpl_CreateSemaphore(XAImplSemHandle *sem); |
|
44 XAresult XAImpl_WaitSemaphore(XAImplSemHandle sem); |
|
45 XAresult XAImpl_PostSemaphore(XAImplSemHandle sem); |
|
46 void XAImpl_DeleteSemaphore(XAImplSemHandle sem); |
|
47 |
|
48 /* thread management */ |
|
49 |
|
50 XAresult XAImpl_CreateThreadHandle(XAImplThreadHandle *thd); |
|
51 XAresult XAImpl_StartThread(XAImplThreadHandle thd, void *thdattrib, |
|
52 XAImplThreadFunction thdfunc, void *thdfuncargs); |
|
53 void XAImpl_CancelThread(XAImplThreadHandle thd); |
|
54 void XAImpl_ExitThread(XAImplThreadHandle thd); |
|
55 void XAImpl_DeleteThreadHandle(XAImplThreadHandle thd); |
|
56 |
|
57 #endif /* XAPLATFORM_H */ |