Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:13

0001 /* SPDX-License-Identifier: BSD-2-Clause */
0002 
0003 /**
0004  * @file
0005  *
0006  * @ingroup RTEMSScoreProcessorMask
0007  *
0008  * @brief This header file provides the interfaces of the
0009  *   @ref RTEMSScoreProcessorMask.
0010  */
0011 
0012 /*
0013  * Copyright (C) 2016, 2017 embedded brains GmbH & Co. KG
0014  *
0015  * Redistribution and use in source and binary forms, with or without
0016  * modification, are permitted provided that the following conditions
0017  * are met:
0018  * 1. Redistributions of source code must retain the above copyright
0019  *    notice, this list of conditions and the following disclaimer.
0020  * 2. Redistributions in binary form must reproduce the above copyright
0021  *    notice, this list of conditions and the following disclaimer in the
0022  *    documentation and/or other materials provided with the distribution.
0023  *
0024  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0025  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0026  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0027  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
0028  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0029  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0030  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0031  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0032  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0033  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0034  * POSSIBILITY OF SUCH DAMAGE.
0035  */
0036 
0037 #ifndef _RTEMS_SCORE_PROCESSORMASK_H
0038 #define _RTEMS_SCORE_PROCESSORMASK_H
0039 
0040 #include <rtems/score/cpu.h>
0041 
0042 #include <sys/_bitset.h>
0043 
0044 #ifdef __cplusplus
0045 extern "C" {
0046 #endif /* __cplusplus */
0047 
0048 /*
0049  * Recent Newlib versions provide the bitset defines in the system reserved
0050  * namespace.
0051  */
0052 #ifndef __BIT_AND2
0053 #define __BIT_AND2 BIT_AND2
0054 #endif
0055 #ifndef __BIT_CLR
0056 #define __BIT_CLR BIT_CLR
0057 #endif
0058 #ifndef __BIT_CMP
0059 #define __BIT_CMP BIT_CMP
0060 #endif
0061 #ifndef __BIT_COPY
0062 #define __BIT_COPY BIT_COPY
0063 #endif
0064 #ifndef __BIT_COUNT
0065 #define __BIT_COUNT BIT_COUNT
0066 #endif
0067 #ifndef __BITSET_DEFINE
0068 #define __BITSET_DEFINE BITSET_DEFINE
0069 #endif
0070 #ifndef __BIT_EMPTY
0071 #define __BIT_EMPTY BIT_EMPTY
0072 #endif
0073 #ifndef __BIT_FILL
0074 #define __BIT_FILL BIT_FILL
0075 #endif
0076 #ifndef __BIT_FLS
0077 #define __BIT_FLS BIT_FLS
0078 #endif
0079 #ifndef __BIT_ISSET
0080 #define __BIT_ISSET BIT_ISSET
0081 #endif
0082 #ifndef __BIT_OR2
0083 #define __BIT_OR2 BIT_OR2
0084 #endif
0085 #ifndef __BIT_OVERLAP
0086 #define __BIT_OVERLAP BIT_OVERLAP
0087 #endif
0088 #ifndef __BIT_SET
0089 #define __BIT_SET BIT_SET
0090 #endif
0091 #ifndef __BIT_SETOF
0092 #define __BIT_SETOF BIT_SETOF
0093 #endif
0094 #ifndef __BIT_SUBSET
0095 #define __BIT_SUBSET BIT_SUBSET
0096 #endif
0097 #ifndef __BIT_XOR2
0098 #define __BIT_XOR2 BIT_XOR2
0099 #endif
0100 #ifndef __BIT_ZERO
0101 #define __BIT_ZERO BIT_ZERO
0102 #endif
0103 
0104 /**
0105  * @defgroup RTEMSScoreProcessorMask Processor Mask
0106  *
0107  * @ingroup RTEMSScore
0108  *
0109  * @brief This group contains the implementation to support processor masks.
0110  *
0111  * The processor mask provides a bit map large enough to provide one bit for
0112  * each processor in the system.  It is a fixed size internal data type
0113  * provided for efficiency in addition to the API level cpu_set_t.
0114  *
0115  * @{
0116  */
0117 
0118 /**
0119  * @brief A bit map which is large enough to provide one bit for each processor
0120  * in the system.
0121  */
0122 typedef __BITSET_DEFINE( Processor_mask, CPU_MAXIMUM_PROCESSORS ) Processor_mask;
0123 
0124 /** @} */
0125 
0126 #ifdef __cplusplus
0127 }
0128 #endif /* __cplusplus */
0129 
0130 #endif /* _RTEMS_SCORE_PROCESSORMASK_H */