From 9b4458e78e5a6190f5f9857e6220aa915cfef07b Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 4 Jun 2020 20:41:12 +0200 Subject: rtems: Generate Change license to BSD-2-Clause according to file histories and documentation re-licensing agreement. Update #3899. Update #3993. --- cpukit/include/rtems/rtems/types.h | 327 ++++++++++++++++++++++++------------- 1 file changed, 212 insertions(+), 115 deletions(-) diff --git a/cpukit/include/rtems/rtems/types.h b/cpukit/include/rtems/rtems/types.h index 5ce3eb6604..ecb28ed60d 100644 --- a/cpukit/include/rtems/rtems/types.h +++ b/cpukit/include/rtems/rtems/types.h @@ -1,196 +1,293 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /** * @file * - * @defgroup ClassicTypes Types + * @brief This header file provides types used by the Classic API. + */ + +/* + * Copyright (C) 2009, 2020 embedded brains GmbH (http://www.embedded-brains.de) + * Copyright (C) 2006, 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. * - * @ingroup RTEMSAPIClassic - * - * @brief Types used by Classic API. + * 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. */ -/* COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). +/* + * This file is part of the RTEMS quality process and was automatically + * generated. If you find something that needs to be fixed or + * worded better please post a report or patch to an RTEMS mailing list + * or raise a bug report: + * + * https://docs.rtems.org/branches/master/user/support/bugs.html * - * 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. + * For information on updating and regenerating please refer to: + * + * https://docs.rtems.org/branches/master/eng/req/howto.html */ +/* Generated from spec:/rtems/type/if/header */ + #ifndef _RTEMS_RTEMS_TYPES_H #define _RTEMS_RTEMS_TYPES_H -/* - * RTEMS basic type definitions - */ - -#include +#include #include #include -#include -#include +#include +#include +#include #include #include -#include + #if defined(RTEMS_MULTIPROCESSING) -#include + #include #endif #ifdef __cplusplus extern "C" { #endif -/** - * @addtogroup ClassicTasks - */ -/**@{**/ +/* Generated from spec:/rtems/type/if/group */ /** - * @brief Classic API @ref ClassicRTEMSSubSecObjectNames "object name" type. + * @defgroup RTEMSAPIClassicTypes Basic Types * - * Contains the name of a Classic API object. It is an unsigned 32-bit integer - * which can be treated as a numeric value or initialized using - * rtems_build_name() to contain four ASCII characters. + * @ingroup RTEMSAPIClassic + * + * @brief This group contains basic Classic API types. */ -typedef uint32_t rtems_name; -/** - * @brief Used to manage and manipulate - * @ref ClassicRTEMSSubSecObjectIdentifiers "RTEMS object identifiers". - */ -typedef Objects_Id rtems_id; +/* Generated from spec:/rtems/type/if/id */ /** - * @brief Invalid object identifier value. + * @ingroup RTEMSAPIClassicTypes * - * No object can have this identifier value. + * @brief This type represents RTEMS object identifiers. */ -#define RTEMS_ID_NONE OBJECTS_ID_NONE +typedef Objects_Id rtems_id; + +/* Generated from spec:/rtems/type/if/id-none */ -#if (CPU_ISR_PASSES_FRAME_POINTER == TRUE) /** - * @brief Defines the format of the interrupt stack frame as it appears to a - * user ISR. + * @ingroup RTEMSAPIClassicTypes * - * This data structure is only provided if the interrupt stack frame is passed - * to the ISR handler. + * @brief This constant represents an invalid RTEMS object identifier. * - * @see rtems_interrupt_catch(). + * No RTEMS object can have this identifier. */ -typedef CPU_Interrupt_frame rtems_interrupt_frame; -#endif +#define RTEMS_ID_NONE OBJECTS_ID_NONE -/** - * @brief Used to manage and manipulate intervals specified by - * @ref ClassicRTEMSSecTime "clock ticks". - */ -typedef Watchdog_Interval rtems_interval; +/* Generated from spec:/rtems/type/if/interval */ /** - * @brief Constant for indefinite wait. + * @ingroup RTEMSAPIClassicTypes * - * This is actually an illegal interval value. + * @brief This type represents clock tick intervals. */ -#define RTEMS_NO_TIMEOUT ((rtems_interval) WATCHDOG_NO_TIMEOUT) +typedef Watchdog_Interval rtems_interval; + +#if defined(RTEMS_MULTIPROCESSING) + /* Generated from spec:/rtems/type/if/mp-packet-classes */ -/** - * @brief Data structure to manage and manipulate calendar - * @ref ClassicRTEMSSecTime "time". - */ -typedef struct { /** - * @brief Year, A.D. + * @ingroup RTEMSAPIClassicTypes + * + * @brief This enumeration defines the MPCI packet classes. */ - uint32_t year; + typedef MP_packet_Classes rtems_mp_packet_classes; +#endif + +#if defined(RTEMS_MULTIPROCESSING) + /* Generated from spec:/rtems/type/if/mpci-entry */ + /** - * @brief Month, 1 .. 12. + * @ingroup RTEMSAPIClassicTypes + * + * @brief MPCI handler routines shall have this return type. */ - uint32_t month; + typedef MPCI_Entry rtems_mpci_entry; +#endif + +#if defined(RTEMS_MULTIPROCESSING) + /* Generated from spec:/rtems/type/if/mpci-get-packet-entry */ + + /** + * @ingroup RTEMSAPIClassicTypes + * + * @brief MPCI get packet routines shall have this type. + */ + typedef MPCI_get_packet_entry rtems_mpci_get_packet_entry; +#endif + +#if defined(RTEMS_MULTIPROCESSING) + /* Generated from spec:/rtems/type/if/mpci-initialization-entry */ + /** - * @brief Day, 1 .. 31. + * @ingroup RTEMSAPIClassicTypes + * + * @brief MPCI initialization routines shall have this type. */ - uint32_t day; + typedef MPCI_initialization_entry rtems_mpci_initialization_entry; +#endif + +#if defined(RTEMS_MULTIPROCESSING) + /* Generated from spec:/rtems/type/if/mpci-receive-packet-entry */ + /** - * @brief Hour, 0 .. 23. + * @ingroup RTEMSAPIClassicTypes + * + * @brief MPCI receive packet routines shall have this type. */ - uint32_t hour; + typedef MPCI_receive_entry rtems_mpci_receive_packet_entry; +#endif + +#if defined(RTEMS_MULTIPROCESSING) + /* Generated from spec:/rtems/type/if/mpci-return-packet-entry */ + /** - * @brief Minute, 0 .. 59. + * @ingroup RTEMSAPIClassicTypes + * + * @brief MPCI return packet routines shall have this type. */ - uint32_t minute; + typedef MPCI_return_packet_entry rtems_mpci_return_packet_entry; +#endif + +#if defined(RTEMS_MULTIPROCESSING) + /* Generated from spec:/rtems/type/if/mpci-send-packet-entry */ + /** - * @brief Second, 0 .. 59. + * @ingroup RTEMSAPIClassicTypes + * + * @brief MPCI send packet routines shall have this type. */ - uint32_t second; + typedef MPCI_send_entry rtems_mpci_send_packet_entry; +#endif + +#if defined(RTEMS_MULTIPROCESSING) + /* Generated from spec:/rtems/type/if/mpci-table */ + /** - * @brief Elapsed ticks between seconds. + * @ingroup RTEMSAPIClassicTypes + * + * @brief This type represents the user-provided MPCI control. */ - uint32_t ticks; -} rtems_time_of_day; + typedef MPCI_Control rtems_mpci_table; +#endif -/* - * MPCI related entries - */ #if defined(RTEMS_MULTIPROCESSING) -/** - * @brief Set of MPCI packet classes which are internally dispatched to the - * managers. - */ -typedef MP_packet_Classes rtems_mp_packet_classes; + /* Generated from spec:/rtems/type/if/multiprocessing-table */ -/** - * @brief Prefix found at the beginning of each MPCI packet sent between nodes. - */ -typedef MP_packet_Prefix rtems_packet_prefix; + /** + * @ingroup RTEMSAPIClassicTypes + * + * @brief This type represents the user-provided MPCI configuration. + */ + typedef MPCI_Configuration rtems_multiprocessing_table; +#endif -/** - * @brief Indirect pointer to the initialization entry point for an MPCI - * handler. - */ -typedef MPCI_initialization_entry rtems_mpci_initialization_entry; +/* Generated from spec:/rtems/type/if/name */ /** - * @brief Indirect pointer to the get_packet entry point for an MPCI handler. + * @ingroup RTEMSAPIClassicTypes + * + * @brief This type represents Classic API object names. + * + * It is an unsigned 32-bit integer which can be treated as a numeric value or + * initialized using rtems_build_name() to encode four ASCII characters. A + * value of zero may have a special meaning in some directives. */ -typedef MPCI_get_packet_entry rtems_mpci_get_packet_entry; +typedef uint32_t rtems_name; -/** - * @brief Indirect pointer to the return_packet entry point for an MPCI - * handler. - */ -typedef MPCI_return_packet_entry rtems_mpci_return_packet_entry; +/* Generated from spec:/rtems/type/if/no-timeout */ /** - * @brief Indirect pointer to the send_packet entry point for an MPCI handler. + * @ingroup RTEMSAPIClassicTypes + * + * @brief This clock tick interval constant indicates that the calling task is + * willing to wait potentially forever on a resource. */ -typedef MPCI_send_entry rtems_mpci_send_packet_entry; +#define RTEMS_NO_TIMEOUT ( (rtems_interval) WATCHDOG_NO_TIMEOUT ) -/** - * @brief Indirect pointer to the receive entry point for an MPCI handler. - */ -typedef MPCI_receive_entry rtems_mpci_receive_packet_entry; +#if defined(RTEMS_MULTIPROCESSING) + /* Generated from spec:/rtems/type/if/packet-prefix */ -/** - * @brief Return type from every MPCI handler routine. - */ -typedef MPCI_Entry rtems_mpci_entry; + /** + * @ingroup RTEMSAPIClassicTypes + * + * @brief This type represents the prefix found at the beginning of each MPCI + * packet sent between nodes. + */ + typedef MP_packet_Prefix rtems_packet_prefix; +#endif -/** - * @brief Structure which is used to configure an MPCI handler. - */ -typedef MPCI_Control rtems_mpci_table; +/* Generated from spec:/rtems/type/if/time-of-day */ /** - * @brief Structure which is used to configure an MPCI handler. + * @ingroup RTEMSAPIClassicTypes + * + * @brief This type represents Classic API calendar times. */ -typedef MPCI_Configuration rtems_multiprocessing_table; +typedef struct { + /** + * @brief This member contains the year A.D. + */ + uint32_t year; -#endif + /** + * @brief This member contains the month of the year with values from 1 to 12. + */ + uint32_t month; -/** @} */ + /** + * @brief This member contains the day of the month with values from 1 to 31. + */ + uint32_t day; + + /** + * @brief This member contains the hour of the day with values from 0 to 23. + */ + uint32_t hour; + + /** + * @brief This member contains the minute of the hour with values from 0 to 59. + */ + uint32_t minute; + + /** + * @brief This member contains the second of the minute with values from 0 to + * 59. + */ + uint32_t second; + + /** + * @brief This member contains the clock tick of the second with values from 0 + * to rtems_clock_get_ticks_per_second() minus one. + */ + uint32_t ticks; +} rtems_time_of_day; #ifdef __cplusplus } #endif -#endif -/* end of include file */ +#endif /* _RTEMS_RTEMS_TYPES_H */ -- cgit v1.2.3