diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-06-04 16:54:15 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-09-22 10:06:05 +0200 |
commit | a5988a716cb16c56860f60a2d587aadd12351f51 (patch) | |
tree | a45451e8fc430ce3de991362d0967d42d5e1634d | |
parent | cc531f8595755998677f7bf744d10ec143cca775 (diff) |
Generate <rtems/rtems/modes.h>
-rw-r--r-- | cpukit/include/rtems/rtems/modes.h | 213 |
1 files changed, 145 insertions, 68 deletions
diff --git a/cpukit/include/rtems/rtems/modes.h b/cpukit/include/rtems/rtems/modes.h index ccaef240d7..a98fe6ce55 100644 --- a/cpukit/include/rtems/rtems/modes.h +++ b/cpukit/include/rtems/rtems/modes.h @@ -1,23 +1,52 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /** * @file * - * @ingroup ClassicModes + * @ingroup RTEMSAPIClassicModes * - * This include file contains all constants and structures associated - * with the RTEMS thread and RTEMS_ASR modes. + * @brief This header file defines the task modes of the Task Manager API. */ -/* COPYRIGHT (c) 1989-2013. - * On-Line Applications Research Corporation (OAR). +/* + * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) + * Copyright (C) 2008 On-Line Applications Research Corporation (OAR) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * This file was automatically generated. Do not edit it manually. + * Please have a look at + * + * https://docs.rtems.org/branches/master/eng/req/howto.html + * + * for information how to maintain and re-generate this file. */ #ifndef _RTEMS_RTEMS_MODES_H #define _RTEMS_RTEMS_MODES_H +#include <stdint.h> #include <rtems/score/cpu.h> #ifdef __cplusplus @@ -25,105 +54,153 @@ extern "C" { #endif /** - * @defgroup ClassicModes Modes + * @defgroup RTEMSAPIClassicModes Task Modes * - * @ingroup RTEMSAPIClassic + * @ingroup RTEMSAPIClassic * - * This encapsulates functionality related to the task modes supported - * by the Classic API Task Manager. + * @brief This group contains the Classic API task modes. */ -/**@{*/ /** - * The following type defines the control block used to manage - * each a mode set. + * @ingroup RTEMSAPIClassicModes + * + * @brief This mode constant corresponds to the interrupt enable/disable bits. */ -typedef uint32_t rtems_mode; +#define RTEMS_INTERRUPT_MASK CPU_MODES_INTERRUPT_MASK /** - * The following constants define the individual modes and masks - * which may be used to compose a mode set and to alter modes. + * @ingroup RTEMSAPIClassicModes + * + * @brief This type defines the control block used to manage each a mode set. */ -#define RTEMS_ALL_MODE_MASKS 0x0000ffff +typedef uint32_t rtems_mode; /** - * This mode constant is the default mode set. + * @ingroup RTEMSAPIClassicModes + * + * @brief This mode constant is a mask with all mode bits set. */ -#define RTEMS_DEFAULT_MODES 0x00000000 +#define RTEMS_ALL_MODE_MASKS 0x0000ffff /** - * This mode constant is used when the user wishes to obtain their - * current execution mode. + * @ingroup RTEMSAPIClassicModes + * + * @brief This mode constant is used to indicate signal processing is enabled. */ -#define RTEMS_CURRENT_MODE 0 - -/** This mode constant corresponds to the timeslice enable/disable bit. */ -#define RTEMS_TIMESLICE_MASK 0x00000200 +#define RTEMS_ASR 0x00000000 -/** This mode constant corresponds to the preemption enable/disable bit. */ -#define RTEMS_PREEMPT_MASK 0x00000100 +/** + * @ingroup RTEMSAPIClassicModes + * + * @brief This mode constant corresponds to the signal enable/disable bit. + */ +#define RTEMS_ASR_MASK 0x00000400 -/** This mode constant corresponds to the signal enable/disable bit. */ -#define RTEMS_ASR_MASK 0x00000400 +/** + * @ingroup RTEMSAPIClassicModes + * + * @brief This mode constant is used when the user wishes to obtain their + * current execution mode. + */ +#define RTEMS_CURRENT_MODE 0 -/** This mode constant corresponds to the interrupt enable/disable bits. */ -#define RTEMS_INTERRUPT_MASK CPU_MODES_INTERRUPT_MASK +/** + * @ingroup RTEMSAPIClassicModes + * + * @brief This mode constant is the default mode set. + */ +#define RTEMS_DEFAULT_MODES 0x00000000 -/** This mode constant is used to indicate preemption is enabled. */ -#define RTEMS_PREEMPT 0x00000000 -/** This mode constant is used to indicate preemption is disabled. */ -#define RTEMS_NO_PREEMPT 0x00000100 +/** + * @ingroup RTEMSAPIClassicModes + * + * @brief Returns the processor dependent interrupt level which corresponds to + * the requested interrupt level. + * + * RTEMS supports 256 interrupt levels using the least significant eight bits + * of the mode set. On any particular CPU, fewer than 256 levels may be + * supported. + * + * @param _mode_set is the mode set. + */ +#define RTEMS_INTERRUPT_LEVEL( _mode_set ) \ + ( ( _mode_set ) & RTEMS_INTERRUPT_MASK ) -/** This mode constant is used to indicate timeslicing is disabled. */ -#define RTEMS_NO_TIMESLICE 0x00000000 -/** This mode constant is used to indicate timeslicing is enabled. */ -#define RTEMS_TIMESLICE 0x00000200 +/** + * @ingroup RTEMSAPIClassicModes + * + * @brief Returns a mode with the desired interrupt level in the proper + * bit-field location. + * + * This function is used by bindings from languages other than C and C++. + * + * @param level is the desired interrupt level. + * + * @return A mode with the desired interrupt level in the proper bit-field + * location is returned. + */ +rtems_mode rtems_interrupt_level_body( uint32_t level ); -/** This mode constant is used to indicate signal processing is enabled. */ -#define RTEMS_ASR 0x00000000 -/** This mode constant is used to indicate signal processing is disabled. */ -#define RTEMS_NO_ASR 0x00000400 +/** + * @ingroup RTEMSAPIClassicModes + * + * @brief % + * + * % + */ +extern const uint32_t rtems_interrupt_mask; /** - * @brief RTEMS_INTERRUPT_LEVEL + * @ingroup RTEMSAPIClassicModes * - * This function returns the processor dependent interrupt - * level which corresponds to the requested interrupt level. + * @brief This mode constant is used to indicate signal processing is disabled. + */ +#define RTEMS_NO_ASR 0x00000400 + +/** + * @ingroup RTEMSAPIClassicModes * - * @note RTEMS supports 256 interrupt levels using the least - * significant eight bits of MODES.CONTROL. On any - * particular CPU, fewer than 256 levels may be supported. + * @brief This mode constant is used to indicate preemption is disabled. */ -#define RTEMS_INTERRUPT_LEVEL( _mode_set ) \ - ( (_mode_set) & RTEMS_INTERRUPT_MASK ) +#define RTEMS_NO_PREEMPT 0x00000100 /** - * @brief Interrupt Mask Variable + * @ingroup RTEMSAPIClassicModes * - * This variable is used by bindings from languages other than C and C++. + * @brief This mode constant is used to indicate timeslicing is disabled. */ -extern const uint32_t rtems_interrupt_mask; +#define RTEMS_NO_TIMESLICE 0x00000000 /** - * @brief Body for RTEMS_INTERRUPT_LEVEL Macro + * @ingroup RTEMSAPIClassicModes * - * @param[in] level is the desired interrupt level + * @brief This mode constant is used to indicate preemption is enabled. + */ +#define RTEMS_PREEMPT 0x00000000 + +/** + * @ingroup RTEMSAPIClassicModes * - * @retval This methods returns a mode with the desired interrupt - * @a level in the proper bitfield location. + * @brief This mode constant corresponds to the preemption enable/disable bit. + */ +#define RTEMS_PREEMPT_MASK 0x00000100 + +/** + * @ingroup RTEMSAPIClassicModes * - * @note This variable is used by bindings from languages other than - * C and C++. + * @brief This mode constant is used to indicate timeslicing is enabled. */ -rtems_mode rtems_interrupt_level_body( - uint32_t level -); +#define RTEMS_TIMESLICE 0x00000200 -/**@}*/ +/** + * @ingroup RTEMSAPIClassicModes + * + * @brief This mode constant corresponds to the timeslice enable/disable bit. + */ +#define RTEMS_TIMESLICE_MASK 0x00000200 #ifdef __cplusplus } #endif -#endif -/* end of include file */ +#endif /* _RTEMS_RTEMS_MODES_H */ |