source: rtems/cpukit/include/rtems/score/coremutex.h @ 5803f37

5
Last change on this file since 5803f37 was d369903, checked in by Andreas Dachsberger <andreas.dachsberger@…>, on 04/08/19 at 07:11:24

doxygen: score: adjust doc in coremutex.h to doxygen guidelines

Update #3706.

  • Property mode set to 100644
File size: 2.3 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup RTEMSScoreMutex
5 *
6 * @brief CORE Mutex API
7 *
8 * This include file contains all the constants and structures associated with
9 * the Mutex Handler.  A mutex is an enhanced version of the standard Dijkstra
10 * binary semaphore used to provide synchronization and mutual exclusion
11 * capabilities.
12 */
13
14/*
15 *  COPYRIGHT (c) 1989-2011.
16 *  On-Line Applications Research Corporation (OAR).
17 *
18 *  The license and distribution terms for this file may be
19 *  found in the file LICENSE in this distribution or at
20 *  http://www.rtems.org/license/LICENSE.
21 */
22
23#ifndef _RTEMS_SCORE_COREMUTEX_H
24#define _RTEMS_SCORE_COREMUTEX_H
25
26#include <rtems/score/thread.h>
27#include <rtems/score/threadq.h>
28#include <rtems/score/priority.h>
29#include <rtems/score/watchdog.h>
30#include <rtems/score/interr.h>
31
32struct _Scheduler_Control;
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38/**
39 * @defgroup RTEMSScoreMutex Mutex Handler
40 *
41 * @ingroup RTEMSScore
42 *
43 * @brief Mutex Handler
44 *
45 * This handler encapsulates functionality which provides the foundation
46 * Mutex services used in all of the APIs supported by RTEMS.
47 *
48 * @{
49 */
50
51/**
52 *  @brief Control block used to manage each mutex.
53 *
54 *  The following defines the control block used to manage each mutex.
55 */
56typedef struct {
57  /**
58   * @brief The thread queue of this mutex.
59   *
60   * The owner of the thread queue indicates the mutex owner.
61   */
62  Thread_queue_Control Wait_queue;
63} CORE_mutex_Control;
64
65/**
66 * @brief The recursive mutex control.
67 */
68typedef struct {
69  /**
70   * @brief The plain non-recursive mutex.
71   */
72  CORE_mutex_Control Mutex;
73
74  /**
75   * @brief The nest level in case of a recursive seize.
76   */
77  unsigned int nest_level;
78} CORE_recursive_mutex_Control;
79
80/**
81 * @brief The recursive mutex control with priority ceiling protocol support.
82 */
83typedef struct {
84  /**
85   * @brief The plain recursive mutex.
86   */
87  CORE_recursive_mutex_Control Recursive;
88
89  /**
90   * @brief The priority ceiling node for the mutex owner.
91   */
92  Priority_Node Priority_ceiling;
93
94#if defined(RTEMS_SMP)
95  /**
96   * @brief The scheduler instance for this priority ceiling mutex.
97   */
98  const struct _Scheduler_Control *scheduler;
99#endif
100} CORE_ceiling_mutex_Control;
101
102/** @} */
103
104#ifdef __cplusplus
105}
106#endif
107
108#endif
109/*  end of include file */
Note: See TracBrowser for help on using the repository browser.