source: rtems/cpukit/score/inline/rtems/score/corebarrier.inl @ 1f0d013

4.115
Last change on this file since 1f0d013 was 1f0d013, checked in by Alex Ivanov <alexivanov97@…>, on 01/09/13 at 13:56:28

score: Doxygen Clean Up Task #17

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/**
2 * @file
3 *
4 * @brief Inlined Routines Associated with the SuperCore Barrier
5 *
6 * This include file contains all of the inlined routines associated
7 * with the SuperCore barrier.
8 */
9
10/*
11 *  COPYRIGHT (c) 1989-2006.
12 *  On-Line Applications Research Corporation (OAR).
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.rtems.com/license/LICENSE.
17 */
18
19#ifndef _RTEMS_SCORE_COREBARRIER_H
20# error "Never use <rtems/score/corebarrier.inl> directly; include <rtems/score/corebarrier.h> instead."
21#endif
22
23#ifndef _RTEMS_SCORE_COREBARRIER_INL
24#define _RTEMS_SCORE_COREBARRIER_INL
25
26/**
27 * @addtogroup ScoreBarrier
28 *
29 * @{
30 */
31
32#include <rtems/score/thread.h>
33#include <rtems/score/threadq.h>
34
35/**
36 * This function returns true if the automatic release attribute is
37 * enabled in the @a attribute_set and false otherwise.
38 *
39 * @param[in] the_attribute is the attribute set to test
40 *
41 * @return true if the priority attribute is enabled
42 */
43RTEMS_INLINE_ROUTINE bool _CORE_barrier_Is_automatic(
44  CORE_barrier_Attributes *the_attribute
45)
46{
47   return
48     (the_attribute->discipline == CORE_BARRIER_AUTOMATIC_RELEASE);
49}
50
51/**
52 * This routine returns the number of threads currently waiting at the barrier.
53 *
54 * @param[in] the_barrier is the barrier to obtain the number of blocked
55 *            threads for
56 * @return the current count of this barrier
57 */
58RTEMS_INLINE_ROUTINE uint32_t  _CORE_barrier_Get_number_of_waiting_threads(
59  CORE_barrier_Control  *the_barrier
60)
61{
62  return the_barrier->number_of_waiting_threads;
63}
64
65/** @} */
66
67#endif
68/* end of include file */
Note: See TracBrowser for help on using the repository browser.