versadac
1
versadac - Scalable Recorder Firmware
Main Page
Classes
Files
File List
File Members
core
profinet_io
src
addin
mrp
mrp_semaphore.h
1
/***************************************************************************************
2
*********** Copyright 2005 Zurich University of Applied Sciences / InES **************
3
***************************************************************************************
4
**
5
** File : mrp_semaphore.h
6
**
7
** Description : This file provides semaphores.
8
**
9
** Note : The definitions for the types SemHandle and SemIdentifier
10
** are in the file mrp_datatypes.h.
11
**
12
***************************************************************************************
13
** Department : Institute of Embedded Systems
14
** Project : MRP
15
** Modul : MRP Semaphore
16
** Author : Christian Schaer
17
** Contact : scc@zhwin.ch
18
** Date : 10.04.2006
19
****************************** Modifications ******************************************
20
**
21
** Date : Who : Comment :
22
** 10.05.06 scc initial release
23
**************************************************************************************/
24
/* $Workfile:: mrp_semaphore.h $*/
25
/* $Revision:: 2 $*/
26
/* $Date:: 16/12/10 14:44 $*/
27
28
#ifndef MRP_SEMAPHORE_H
29
#define MRP_SEMAPHORE_H
30
31
#include "mrp_pkg.h"
32
33
/*#include <pthread.h>*/
34
/*#include <semaphore.h>*/
35
36
typedef
void
* sem_t;
37
typedef
sem_t SemHandle;
38
typedef
unsigned
short
SemIdentifier;
39
40
/************************************************************/
41
/*** class MRP_Semaphore_T ***/
42
/************************************************************/
43
44
typedef
struct
MRP_Semaphore_T
MRP_Semaphore_T
;
45
struct
MRP_Semaphore_T
46
{
47
SemHandle handle_;
48
SemIdentifier identifier_;
49
};
50
51
52
/********************************************/
53
/*** public Methods ***/
54
/********************************************/
55
56
void
MRP_Semaphore_T_init(
MRP_Semaphore_T
*
const
me,
unsigned
int
start_value,
unsigned
short
id
);
57
58
void
MRP_Semaphore_T_cleanup(
MRP_Semaphore_T
*
const
me );
59
60
void
MRP_Semaphore_T_wait(
MRP_Semaphore_T
*
const
me );
61
62
void
MRP_Semaphore_T_signal(
MRP_Semaphore_T
*
const
me );
63
64
#endif
65
MRP_Semaphore_T
Definition:
mrp_semaphore.h:45
Generated on Wed Aug 19 2020 10:33:44 for versadac by
1.8.9.1