RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
cpukit
include
rtems
posix
priorityimpl.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
11
12
/*
13
* COPYRIGHT (c) 1989-2011.
14
* On-Line Applications Research Corporation (OAR).
15
*
16
* Redistribution and use in source and binary forms, with or without
17
* modification, are permitted provided that the following conditions
18
* are met:
19
* 1. Redistributions of source code must retain the above copyright
20
* notice, this list of conditions and the following disclaimer.
21
* 2. Redistributions in binary form must reproduce the above copyright
22
* notice, this list of conditions and the following disclaimer in the
23
* documentation and/or other materials provided with the distribution.
24
*
25
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
29
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35
* POSSIBILITY OF SUCH DAMAGE.
36
*/
37
38
#ifndef _RTEMS_POSIX_PRIORITYIMPL_H
39
#define _RTEMS_POSIX_PRIORITYIMPL_H
40
41
#include <
rtems/score/scheduler.h
>
42
#include <
rtems/score/assert.h
>
43
44
#ifdef __cplusplus
45
extern
"C"
{
46
#endif
47
57
61
#define POSIX_SCHEDULER_MINIMUM_PRIORITY (1)
62
71
static
inline
int
_POSIX_Priority_Get_maximum(
72
const
Scheduler_Control *scheduler
73
)
74
{
75
_Assert
( (
int
) scheduler->
maximum_priority
> 1 );
76
return
(
int
) scheduler->
maximum_priority
- 1;
77
}
78
102
Priority_Control
_POSIX_Priority_To_core
(
103
const
Scheduler_Control *scheduler,
104
int
priority,
105
bool
*valid
106
);
107
117
int
_POSIX_Priority_From_core
(
118
const
Scheduler_Control *scheduler,
119
Priority_Control
priority
120
);
121
123
124
#ifdef __cplusplus
125
}
126
#endif
127
128
#endif
assert.h
This header file provides the interfaces of the Assert Handler.
_POSIX_Priority_To_core
Priority_Control _POSIX_Priority_To_core(const Scheduler_Control *scheduler, int priority, bool *valid)
Converts the POSIX API priority to the corresponding SuperCore priority and validates it.
Definition
psxpriorityisvalid.c:43
_POSIX_Priority_From_core
int _POSIX_Priority_From_core(const Scheduler_Control *scheduler, Priority_Control priority)
Converts the SuperCore priority to the corresponding POSIX API priority.
Definition
psxpriorityisvalid.c:61
_Assert
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG and static analysis runs.
Definition
assert.h:96
Priority_Control
uint64_t Priority_Control
The thread priority control.
Definition
priority.h:91
scheduler.h
This header file provides interfaces of the Scheduler Handler which are used by the implementation an...
_Scheduler_Control::maximum_priority
Priority_Control maximum_priority
The maximum priority value of this scheduler.
Definition
scheduler.h:354
Generated by
1.18.0