RTEMS 6.1-rc4
Loading...
Searching...
No Matches
scheduler.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/*
12 * Copyright (C) 2013, 2021 embedded brains GmbH & Co. KG
13 * Copyright (C) 1988, 2017 On-Line Applications Research Corporation (OAR)
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
17 * are met:
18 * 1. Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE.
35 */
36
37/*
38 * This file is part of the RTEMS quality process and was automatically
39 * generated. If you find something that needs to be fixed or
40 * worded better please post a report or patch to an RTEMS mailing list
41 * or raise a bug report:
42 *
43 * https://www.rtems.org/bugs.html
44 *
45 * For information on updating and regenerating please refer to the How-To
46 * section in the Software Requirements Engineering chapter of the
47 * RTEMS Software Engineering manual. The manual is provided as a part of
48 * a release. For development sources please refer to the online
49 * documentation at:
50 *
51 * https://docs.rtems.org
52 */
53
54/* Generated from spec:/rtems/scheduler/if/header */
55
56#ifndef _RTEMS_RTEMS_SCHEDULER_H
57#define _RTEMS_RTEMS_SCHEDULER_H
58
59#include <stddef.h>
60#include <stdint.h>
61#include <sys/cpuset.h>
62#include <rtems/rtems/status.h>
63#include <rtems/rtems/types.h>
64#include <rtems/score/smp.h>
65
66#ifdef __cplusplus
67extern "C" {
68#endif
69
70/* Generated from spec:/rtems/scheduler/if/group */
71
93/* Generated from spec:/rtems/scheduler/if/ident */
94
134
135/* Generated from spec:/rtems/scheduler/if/ident-by-processor */
136
167 uint32_t cpu_index,
168 rtems_id *id
169);
170
171/* Generated from spec:/rtems/scheduler/if/ident-by-processor-set */
172
216 size_t cpusetsize,
217 const cpu_set_t *cpuset,
218 rtems_id *id
219);
220
221/* Generated from spec:/rtems/scheduler/if/get-maximum-priority */
222
251 rtems_id scheduler_id,
252 rtems_task_priority *priority
253);
254
255/* Generated from spec:/rtems/scheduler/if/map-priority-to-posix */
256
291 rtems_id scheduler_id,
292 rtems_task_priority priority,
293 int *posix_priority
294);
295
296/* Generated from spec:/rtems/scheduler/if/map-priority-from-posix */
297
332 rtems_id scheduler_id,
333 int posix_priority,
334 rtems_task_priority *priority
335);
336
337/* Generated from spec:/rtems/scheduler/if/get-processor */
338
369uint32_t rtems_scheduler_get_processor( void );
370
371/* Generated from spec:/rtems/scheduler/if/get-processor-macro */
372#define rtems_scheduler_get_processor() _SMP_Get_current_processor()
373
374/* Generated from spec:/rtems/scheduler/if/get-processor-maximum */
375
404
405/* Generated from spec:/rtems/scheduler/if/get-processor-maximum-macro */
406#define rtems_scheduler_get_processor_maximum() _SMP_Get_processor_maximum()
407
408/* Generated from spec:/rtems/scheduler/if/get-processor-set */
409
445 rtems_id scheduler_id,
446 size_t cpusetsize,
447 cpu_set_t *cpuset
448);
449
450/* Generated from spec:/rtems/scheduler/if/add-processor */
451
492 rtems_id scheduler_id,
493 uint32_t cpu_index
494);
495
496/* Generated from spec:/rtems/scheduler/if/remove-processor */
497
543 rtems_id scheduler_id,
544 uint32_t cpu_index
545);
546
547#ifdef __cplusplus
548}
549#endif
550
551#endif /* _RTEMS_RTEMS_SCHEDULER_H */
This header file provides types used by the Classic API.
This header file provides interfaces of the SMP Support which are used by the implementation and the ...
rtems_status_code rtems_scheduler_remove_processor(rtems_id scheduler_id, uint32_t cpu_index)
Removes the processor from the set of processors owned by the scheduler.
Definition: schedulerremoveprocessor.c:125
#define rtems_scheduler_get_processor_maximum()
Returns the processor maximum supported by the system.
Definition: scheduler.h:406
rtems_status_code rtems_scheduler_add_processor(rtems_id scheduler_id, uint32_t cpu_index)
Adds the processor to the set of processors owned by the scheduler.
Definition: scheduleraddprocessor.c:46
rtems_status_code rtems_scheduler_map_priority_from_posix(rtems_id scheduler_id, int posix_priority, rtems_task_priority *priority)
Maps a POSIX thread priority to the corresponding Classic API task priority.
Definition: schedulermapfromposix.c:44
rtems_status_code rtems_scheduler_get_processor_set(rtems_id scheduler_id, size_t cpusetsize, cpu_set_t *cpuset)
Gets the set of processors owned by the scheduler.
Definition: schedulergetprocessorset.c:44
rtems_status_code rtems_scheduler_ident_by_processor_set(size_t cpusetsize, const cpu_set_t *cpuset, rtems_id *id)
Identifies a scheduler by the processor set.
Definition: scheduleridentbyprocessorset.c:45
rtems_status_code rtems_scheduler_ident(rtems_name name, rtems_id *id)
Identifies a scheduler by the object name.
Definition: schedulerident.c:44
rtems_status_code rtems_scheduler_map_priority_to_posix(rtems_id scheduler_id, rtems_task_priority priority, int *posix_priority)
Maps a Classic API task priority to the corresponding POSIX thread priority.
Definition: schedulermaptoposix.c:44
rtems_status_code rtems_scheduler_get_maximum_priority(rtems_id scheduler_id, rtems_task_priority *priority)
Gets the maximum task priority of the scheduler.
Definition: schedulergetmaxprio.c:44
rtems_status_code rtems_scheduler_ident_by_processor(uint32_t cpu_index, rtems_id *id)
Identifies a scheduler by the processor index.
Definition: scheduleridentbyprocessor.c:45
#define rtems_scheduler_get_processor()
Returns the index of the current processor.
Definition: scheduler.h:372
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
uint32_t rtems_name
This type represents Classic API object names.
Definition: types.h:226
uint32_t rtems_task_priority
This integer type represents task priorities of the Classic API.
Definition: types.h:257
Objects_Id rtems_id
This type represents RTEMS object identifiers.
Definition: types.h:94
This header file provides the status codes of Classic API directives and support functions.