khronosfws/openmax_al/src/common/xaplatform.h
author hgs
Fri, 25 Jun 2010 17:36:03 -0500
changeset 28 ebf79c79991a
parent 25 6f7ceef7b1d1
permissions -rw-r--r--
201025
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
25
hgs
parents: 12
diff changeset
     2
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents: 12
diff changeset
     3
 * All rights reserved.
hgs
parents: 12
diff changeset
     4
 * This component and the accompanying materials are made available
hgs
parents: 12
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0"
hgs
parents: 12
diff changeset
     6
 * which accompanies this distribution, and is available
hgs
parents: 12
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents: 12
diff changeset
     8
 *
hgs
parents: 12
diff changeset
     9
 * Initial Contributors:
hgs
parents: 12
diff changeset
    10
 * Nokia Corporation - initial contribution.
hgs
parents: 12
diff changeset
    11
 *
hgs
parents: 12
diff changeset
    12
 * Contributors:
hgs
parents: 12
diff changeset
    13
 *
hgs
parents: 12
diff changeset
    14
 * Description: Platform Specfic Header File
hgs
parents: 12
diff changeset
    15
 *
hgs
parents: 12
diff changeset
    16
 */
12
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
#ifndef XAPLATFORM_H
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
#define XAPLATFORM_H
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
#include "openmaxalwrapper.h"
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
#include "xaglobals.h"
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
/** MACROS **/
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
/** TYPES **/
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
typedef void* XAImplMutexHandle;
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
typedef void* XAImplSemHandle;
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
typedef void* XAImplThreadHandle;
25
hgs
parents: 12
diff changeset
    31
typedef void* (* XAImplThreadFunction)(void *xaThdFunAargs);
12
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
/** METHODS **/
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    34
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    35
/* mutex management */
25
hgs
parents: 12
diff changeset
    36
XAresult XAImpl_CreateMutex(XAImplMutexHandle *mtx);
hgs
parents: 12
diff changeset
    37
XAresult XAImpl_TryLockMutex(XAImplMutexHandle mtx);
hgs
parents: 12
diff changeset
    38
XAresult XAImpl_LockMutex(XAImplMutexHandle mtx);
hgs
parents: 12
diff changeset
    39
XAresult XAImpl_UnlockMutex(XAImplMutexHandle mtx);
hgs
parents: 12
diff changeset
    40
void XAImpl_DeleteMutex(XAImplMutexHandle mtx);
12
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    41
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    42
/* semaphores */
25
hgs
parents: 12
diff changeset
    43
XAresult XAImpl_CreateSemaphore(XAImplSemHandle *sem);
hgs
parents: 12
diff changeset
    44
XAresult XAImpl_WaitSemaphore(XAImplSemHandle sem);
hgs
parents: 12
diff changeset
    45
XAresult XAImpl_PostSemaphore(XAImplSemHandle sem);
hgs
parents: 12
diff changeset
    46
void XAImpl_DeleteSemaphore(XAImplSemHandle sem);
12
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
/* thread management */
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
25
hgs
parents: 12
diff changeset
    50
XAresult XAImpl_CreateThreadHandle(XAImplThreadHandle *thd);
hgs
parents: 12
diff changeset
    51
XAresult XAImpl_StartThread(XAImplThreadHandle thd, void *thdattrib,
hgs
parents: 12
diff changeset
    52
        XAImplThreadFunction thdfunc, void *thdfuncargs);
hgs
parents: 12
diff changeset
    53
void XAImpl_CancelThread(XAImplThreadHandle thd);
hgs
parents: 12
diff changeset
    54
void XAImpl_ExitThread(XAImplThreadHandle thd);
hgs
parents: 12
diff changeset
    55
void XAImpl_DeleteThreadHandle(XAImplThreadHandle thd);
12
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    56
5a06f39ad45b Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
#endif /* XAPLATFORM_H */