source: rtems/cpukit/score/inline/rtems/score/corebarrier.inl @ 484a769

4.104.114.95
Last change on this file since 484a769 was 484a769, checked in by Ralf Corsepius <ralf.corsepius@…>, on 09/04/08 at 17:46:39

Convert to "bool".

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/**
2 *  @file  rtems/score/corebarrier.inl
3 *
4 *  This include file contains all of the inlined routines associated
5 *  with the SuperCore barrier.
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2006.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
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#include <rtems/score/thread.h>
32#include <rtems/score/threadq.h>
33
34/**
35 *  This function returns TRUE if the automatic release attribute is
36 *  enabled in the @a attribute_set and FALSE otherwise.
37 *
38 *  @param[in] the_attribute is the attribute set to test
39 *  @return TRUE if the priority attribute is enabled
40 */
41RTEMS_INLINE_ROUTINE bool _CORE_barrier_Is_automatic(
42  CORE_barrier_Attributes *the_attribute
43)
44{
45   return
46     (the_attribute->discipline == CORE_BARRIER_AUTOMATIC_RELEASE);
47}
48
49/**
50 *  This routine returns the number of threads currently waiting at the barrier.
51 *
52 *  @param[in] the_barrier is the barrier to obtain the number of blocked
53 *             threads for
54 *  @return the current count of this barrier
55 */
56RTEMS_INLINE_ROUTINE uint32_t  _CORE_barrier_Get_number_of_waiting_threads(
57  CORE_barrier_Control  *the_barrier
58)
59{
60  return the_barrier->number_of_waiting_threads;
61}
62
63/**@}*/
64
65#endif
66/* end of include file */
Note: See TracBrowser for help on using the repository browser.