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