versadac  1
versadac - Scalable Recorder Firmware
stk_mtx.h
1 /*---------------------------------------------------------------------------*/
2 /* Copyright (C) 2006 Woodhead Software & Electonics. All rights reserved. */
3 /*---------------------------------------------------------------------------*/
4 /* This program is protected by international copyright. */
5 /* */
6 /* The use of this software including but not limited to its Source Code */
7 /* is subject to restrictions as agreed in the license agreement between */
8 /* you and Woodhead. */
9 /* Copying or distribution is not allowed unless expressly permitted */
10 /* according to your license agreement with Woodhead. */
11 /*---------------------------------------------------------------------------*/
12 /* */
13 /* Project : STACK PROFINET Controller */
14 /* Component : Mutex manager */
15 /* $Workfile:: stk_mtx.h $*/
16 /* $Revision:: 2 $*/
17 /* $Date:: 9/22/09 6:01p $*/
18 /* */
19 /*---------------------------------------------------------------------------*/
20 /* */
21 /* D e s c r i p t i o n : */
22 /* abstraction layer for Mutex */
23 /* */
24 /*---------------------------------------------------------------------------*/
25 
26 #ifndef __STK_MTX_H__
27 #define __STK_MTX_H__
28 
29 /*---------------------------- Synchronisation --------------------*/
30 #define OS_MUTEX_DEFAULT 0
31 #define OS_MUTEX_MSG 1
32 #define OS_MUTEX_SCHEDULE 2
33 #define OS_MUTEX_LINK 3
34 #define OS_MUTEX_ELT 4
35 #define OS_MUTEX_USER1 5
36 #define OS_MUTEX_USER2 6
37 #define OS_MUTEX_USER3 7
38 #define OS_MUTEX_USER4 8
39 #define OS_MUTEX_USER5 9
40 
41 #define MAXNUM_OF_MUTEXES 10 /* Number of synchronisation object*/
42 
43 
44 APP_BOOL StackCreateMutex(APP_DWORD dwIndex,APP_LPCHAR szName);
45 APP_DWORD StackWaitMutex(APP_DWORD dwIndex,APP_DWORD dwDelay);
46 APP_WORD StackReleaseMutex(APP_DWORD dwIndex);
47 APP_VOID StackCloseMutex(APP_DWORD dwIndex);
48 
49 #endif