|
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: |
|
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)( |
|
32 void *xaThdFunAargs |
|
33 ); |
|
34 |
|
35 /** METHODS **/ |
|
36 |
|
37 /* mutex management */ |
|
38 XAresult XAImpl_CreateMutex( XAImplMutexHandle *mtx ); |
|
39 XAresult XAImpl_TryLockMutex( XAImplMutexHandle mtx ); |
|
40 XAresult XAImpl_LockMutex( XAImplMutexHandle mtx ); |
|
41 XAresult XAImpl_UnlockMutex( XAImplMutexHandle mtx ); |
|
42 void XAImpl_DeleteMutex( XAImplMutexHandle mtx ); |
|
43 |
|
44 /* semaphores */ |
|
45 XAresult XAImpl_CreateSemaphore( XAImplSemHandle *sem ); |
|
46 XAresult XAImpl_WaitSemaphore( XAImplSemHandle sem ); |
|
47 XAresult XAImpl_PostSemaphore( XAImplSemHandle sem ); |
|
48 void XAImpl_DeleteSemaphore( XAImplSemHandle sem ); |
|
49 |
|
50 /* thread management */ |
|
51 |
|
52 XAresult XAImpl_CreateThreadHandle( XAImplThreadHandle *thd ); |
|
53 XAresult XAImpl_StartThread( XAImplThreadHandle thd, |
|
54 void *thdattrib, |
|
55 XAImplThreadFunction thdfunc, void *thdfuncargs ); |
|
56 void XAImpl_CancelThread( XAImplThreadHandle thd ); |
|
57 void XAImpl_ExitThread( XAImplThreadHandle thd ); |
|
58 void XAImpl_DeleteThreadHandle( XAImplThreadHandle thd ); |
|
59 |
|
60 #endif /* XAPLATFORM_H */ |