Mistake on this page?
Report an issue in GitHub or email us
wsf_cs.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file wsf_cs.h
4  *
5  * \brief Critical section macros.
6  *
7  * Copyright (c) 2009-2018 Arm Ltd. All Rights Reserved.
8  *
9  * Copyright (c) 2019-2020 Packetcraft, Inc.
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 /*************************************************************************************************/
24 #ifndef WSF_CS_H
25 #define WSF_CS_H
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 /*! \addtogroup WSF_CS_API
32  * \{ */
33 
34 /**************************************************************************************************
35  Macros
36 **************************************************************************************************/
37 
38 #ifndef WSF_CS_STATS
39 /*! \brief Use CS statistics hooks. */
40 #define WSF_CS_STATS FALSE
41 #endif
42 
43 /*************************************************************************************************/
44 /*!
45  * \def WSF_CS_INIT
46  *
47  * \brief Initialize critical section. This macro may define a variable.
48  *
49  * \param cs Critical section variable to be defined.
50  */
51 /*************************************************************************************************/
52 #define WSF_CS_INIT(cs)
53 
54 /*************************************************************************************************/
55 /*!
56  * \def WSF_CS_ENTER
57  *
58  * \brief Enter a critical section.
59  *
60  * \param cs Critical section variable.
61  */
62 /*************************************************************************************************/
63 #define WSF_CS_ENTER(cs) WsfCsEnter()
64 
65 /*************************************************************************************************/
66 /*!
67  * \def WSF_CS_EXIT
68  *
69  * \brief Exit a critical section.
70  *
71  * \param cs Critical section variable.
72  */
73 /*************************************************************************************************/
74 #define WSF_CS_EXIT(cs) WsfCsExit()
75 
76 /**************************************************************************************************
77  Function Declarations
78 **************************************************************************************************/
79 
80 /*************************************************************************************************/
81 /*!
82  * \brief Get critical section duration watermark level.
83  *
84  * \return Critical section duration watermark level.
85  */
86 /*************************************************************************************************/
87 uint32_t WsfCsStatsGetCsWaterMark(void);
88 
89 /*************************************************************************************************/
90 /*!
91  * \brief Enter a critical section.
92  */
93 /*************************************************************************************************/
94 void WsfCsEnter(void);
95 
96 /*************************************************************************************************/
97 /*!
98  * \brief Enter a critical section.
99  */
100 /*************************************************************************************************/
101 void WsfCsExit(void);
102 
103 /*! \} */ /* WSF_CS_API */
104 
105 #ifdef __cplusplus
106 };
107 #endif
108 
109 #endif /* WSF_CS_H */
void WsfCsExit(void)
Enter a critical section.
void WsfCsEnter(void)
Enter a critical section.
uint32_t WsfCsStatsGetCsWaterMark(void)
Get critical section duration watermark level.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.