RTEMS CPU Kit with SuperCore  4.11.2
resource.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
3  *
4  * embedded brains GmbH
5  * Dornierstr. 4
6  * 82178 Puchheim
7  * Germany
8  * <rtems@embedded-brains.de>
9  *
10  * The license and distribution terms for this file may be
11  * found in the file LICENSE in this distribution or at
12  * http://www.rtems.org/license/LICENSE.
13  */
14 
15 #ifndef _RTEMS_SCORE_RESOURCE_H
16 #define _RTEMS_SCORE_RESOURCE_H
17 
18 #include <rtems/score/basedefs.h>
19 #include <rtems/score/chain.h>
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif /* __cplusplus */
24 
141 typedef struct Resource_Node Resource_Node;
142 
143 typedef struct Resource_Control Resource_Control;
144 
149 struct Resource_Node {
178 };
179 
184 struct Resource_Control {
197  Chain_Control Rivals;
202  Resource_Node *owner;
203 };
204 
207 #ifdef __cplusplus
208 }
209 #endif /* __cplusplus */
210 
211 #endif /* _RTEMS_SCORE_RESOURCE_H */
This is used to manage each element (node) which is placed on a chain.
Definition: chain.h:65
Resource_Control * dependency
Reference to a resource in case this node has to wait for ownership of this resource.
Definition: resource.h:171
This is used to manage a chain.
Definition: chain.h:83
Resource node to reflect ownership of resources and a dependency on a resource.
Definition: resource.h:150
Chain_Node Node
Node to build a chain of rivals depending on a resource.
Definition: resource.h:156
Chain_Control Resources
A chain of resources owned by this node.
Definition: resource.h:163
Resource_Node * root
Reference to the root of the resource tree.
Definition: resource.h:178
Chain Handler API.
Basic Definitions.
Resource control to manage ownership and rival nodes depending on a resource.
Definition: resource.h:185