SystemC
2.3.1
Accellera SystemC proof-of-concept library
Main Page
Namespaces
Classes
Files
File List
File Members
sysc
communication
sc_semaphore_if.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
The following code is derived, directly or indirectly, from the SystemC
4
source code Copyright (c) 1996-2014 by all Contributors.
5
All Rights reserved.
6
7
The contents of this file are subject to the restrictions and limitations
8
set forth in the SystemC Open Source License (the "License");
9
You may not use this file except in compliance with such restrictions and
10
limitations. You may obtain instructions on how to receive a copy of the
11
License at http://www.accellera.org/. Software distributed by Contributors
12
under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
13
ANY KIND, either express or implied. See the License for the specific
14
language governing rights and limitations under the License.
15
16
*****************************************************************************/
17
18
/*****************************************************************************
19
20
sc_semaphore_if.h -- The sc_semaphore_if interface class.
21
22
Original Author: Martin Janssen, Synopsys, Inc., 2001-05-21
23
24
CHANGE LOG IS AT THE END OF THE FILE
25
*****************************************************************************/
26
27
#ifndef SC_SEMAPHORE_IF_H
28
#define SC_SEMAPHORE_IF_H
29
30
#include "
sysc/communication/sc_interface.h
"
31
32
namespace
sc_core {
33
34
// ----------------------------------------------------------------------------
35
// CLASS : sc_semaphore_if
36
//
37
// The sc_semaphore_if interface class.
38
// ----------------------------------------------------------------------------
39
40
class
sc_semaphore_if
41
:
virtual
public
sc_interface
42
{
43
public
:
44
45
// the classical operations: wait(), trywait(), and post()
46
47
// lock (take) the semaphore, block if not available
48
virtual
int
wait
() = 0;
49
50
// lock (take) the semaphore, return -1 if not available
51
virtual
int
trywait
() = 0;
52
53
// unlock (give) the semaphore
54
virtual
int
post
() = 0;
55
56
// get the value of the semphore
57
virtual
int
get_value
()
const
= 0;
58
59
protected
:
60
61
// constructor
62
63
sc_semaphore_if
()
64
{}
65
66
private
:
67
68
// disabled
69
sc_semaphore_if
(
const
sc_semaphore_if
& );
70
sc_semaphore_if
& operator = (
const
sc_semaphore_if
& );
71
};
72
73
}
// namespace sc_core
74
75
//$Log: sc_semaphore_if.h,v $
76
//Revision 1.3 2011/08/26 20:45:42 acg
77
// Andy Goodrich: moved the modification log to the end of the file to
78
// eliminate source line number skew when check-ins are done.
79
//
80
//Revision 1.2 2011/02/18 20:23:45 acg
81
// Andy Goodrich: Copyright update.
82
//
83
//Revision 1.1.1.1 2006/12/15 20:20:04 acg
84
//SystemC 2.3
85
//
86
//Revision 1.2 2006/01/03 23:18:26 acg
87
//Changed copyright to include 2006.
88
//
89
//Revision 1.1.1.1 2005/12/19 23:16:43 acg
90
//First check in of SystemC 2.1 into its own archive.
91
//
92
//Revision 1.8 2005/06/10 22:43:55 acg
93
//Added CVS change log annotation.
94
//
95
96
#endif
97
98
// Taf!
sc_core::sc_semaphore_if::post
virtual int post()=0
sc_core::sc_semaphore_if::wait
virtual int wait()=0
sc_core::sc_semaphore_if::trywait
virtual int trywait()=0
sc_interface.h
sc_core::sc_semaphore_if
Definition:
sc_semaphore_if.h:40
sc_core::sc_interface
Definition:
sc_interface.h:43
sc_core::sc_semaphore_if::get_value
virtual int get_value() const =0
sc_core::sc_semaphore_if::sc_semaphore_if
sc_semaphore_if()
Definition:
sc_semaphore_if.h:63
Generated on Thu Jun 19 2014 07:41:21 for SystemC by
1.8.6