source: soft/giet_vm/libs/barrier.h @ 158

Last change on this file since 158 was 158, checked in by alain, 12 years ago

Introducing the giet_vm and some example applications

File size: 1.0 KB
Line 
1//////////////////////////////////////////////////////////////////////////////////
2// File     : barrier.h         
3// Date     : 01/04/2012
4// Author   : alain greiner
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////////
7
8#ifndef _BARRIER_H_
9#define _BARRIER_H_
10
11///////////////////////////////////////////////////////////////////////////////////
12//  barrier structure
13///////////////////////////////////////////////////////////////////////////////////
14
15typedef struct giet_barrier_s {
16    char                name[32];       // barrier name
17    unsigned int        init;           // total number of participants
18    unsigned int        count;          // number of not yet arrived tasks
19} giet_barrier_t
20
21//////////////////////////////////////////////////////////////////////////////
22//  MWMR access functions
23//////////////////////////////////////////////////////////////////////////////
24
25void barrier_init( giet_barrier_t*      barrier,
26                   unsigned int         value );
27
28void barrier_wait( giet_barrier_t*      barrier );
29
30#endif
31
Note: See TracBrowser for help on using the repository browser.