# 1 "../main_freertos.c" # 1 "" 1 # 1 "" 3 # 366 "" 3 # 1 "" 1 # 1 "" 2 # 1 "../main_freertos.c" 2 /* * Copyright (c) 2016-2020, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * 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. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * 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. */ /* * ======== main_freertos.c ======== */ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\lib\\clang\\15.0.7\\include\\stdint.h" 1 3 /*===---- stdint.h - Standard header for sized integer types --------------===*\ * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * \*===----------------------------------------------------------------------===*/ // AIX system headers need stdint.h to be re-enterable while _STD_TYPES_T // is defined until an inclusion of it without _STD_TYPES_T occurs, in which // case the header guard macro is defined. /* If we're hosted, fall back to the system's stdint.h, which might have * additional definitions. */ // C99 7.18.3 Limits of other integer types // // Footnote 219, 220: C++ implementations should define these macros only when // __STDC_LIMIT_MACROS is defined before is included. // // Footnote 222: C++ implementations should define these macros only when // __STDC_CONSTANT_MACROS is defined before is included. // // C++11 [cstdint.syn]p2: // // The macros defined by are provided unconditionally. In particular, // the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in // footnotes 219, 220, and 222 in the C standard) play no role in C++. // // C11 removed the problematic footnotes. // // Work around this inconsistency by always defining those macros in C++ mode, // so that a C library implementation which follows the C99 standard can be // used in C++. # 52 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\lib\\clang\\15.0.7\\include\\stdint.h" 3 # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\stdint.h" 1 3 /*****************************************************************************/ /* STDINT.H */ /* */ /* Copyright (c) 2002 Texas Instruments Incorporated */ /* http://www.ti.com/ */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* */ /* Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* */ /* 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. */ /* */ /* Neither the name of Texas Instruments Incorporated nor the names */ /* of its contributors may be used to endorse or promote products */ /* derived from this software without specific prior written */ /* permission. */ /* */ /* 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. */ /* */ /*****************************************************************************/ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\_ti_config.h" 1 3 /*****************************************************************************/ /* _ti_config.h */ /* */ /* Copyright (c) 2017 Texas Instruments Incorporated */ /* http://www.ti.com/ */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* */ /* Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* */ /* 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. */ /* */ /* Neither the name of Texas Instruments Incorporated nor the names */ /* of its contributors may be used to endorse or promote products */ /* derived from this software without specific prior written */ /* permission. */ /* */ /* 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. */ /* */ /*****************************************************************************/ /*Unsupported pragmas are omitted */ # 59 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\_ti_config.h" 3 /* Hide uses of the TI proprietary macros behind other macros. Implementations that don't implement these features should leave these macros undefined. */ # 86 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\_ti_config.h" 3 /* Common definitions */ # 100 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\_ti_config.h" 3 /* C */ /* C11 */ # 129 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\_ti_config.h" 3 /* _TI_NOEXCEPT_CPP14 is defined to noexcept only when compiling for C++14. It is intended to be used for functions like abort and atexit that are supposed to be declared noexcept only in C++14 mode. */ /* Target-specific definitions */ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\linkage.h" 1 3 /*****************************************************************************/ /* linkage.h v##### */ /* Copyright (c) 1998@%%%% Texas Instruments Incorporated */ /*****************************************************************************/ /* No modifiers are needed to access code or data */ /*--------------------------------------------------------------------------*/ /* Define _IDECL ==> how inline functions are declared */ /*--------------------------------------------------------------------------*/ # 140 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\_ti_config.h" 2 3 # 41 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\stdint.h" 2 3 /* no code before #include */ /* prefer functions to macros */ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\_stdint40.h" 1 3 /*****************************************************************************/ /* _STDINT40.H */ /* */ /* Copyright (c) 2018 Texas Instruments Incorporated */ /* http://www.ti.com/ */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* */ /* Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* */ /* 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. */ /* */ /* Neither the name of Texas Instruments Incorporated nor the names */ /* of its contributors may be used to endorse or promote products */ /* derived from this software without specific prior written */ /* permission. */ /* */ /* 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. */ /* */ /*****************************************************************************/ /* prefer functions to macros */ # 54 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\_stdint40.h" 3 /* According to footnotes in the 1999 C standard, "C++ implementations should define these macros only when __STDC_LIMIT_MACROS is defined before is included." */ # 47 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\stdint.h" 2 3 # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/stdint.h" 1 3 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2001 Mike Barcroft * All rights reserved. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. * * $FreeBSD$ */ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 1 3 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Berkeley Software Design, Inc. * * 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. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. * * @(#)cdefs.h 8.8 (Berkeley) 1/9/95 * $FreeBSD$ */ # 48 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * Testing against Clang-specific extensions. */ # 75 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * This code has been put in place to help reduce the addition of * compiler specific defines in FreeBSD code. It helps to aid in * having a compiler-agnostic source tree. */ # 113 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * Compiler memory barriers, specific to gcc and clang. */ # 127 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced */ # 158 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * Macro to test if we're using a specific version of gcc or later. */ /* * The __CONCAT macro is used to concatenate parts of symbol names, e.g. * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI * mode -- there must be no spaces between its arguments, and for nested * __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also * concatenate double-quoted strings produced by the __STRING macro, but * this only works with ANSI C. * * __XSTRING is like __STRING, but it expands any macros in its argument * first. It is only available with ANSI C. */ # 225 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * Compiler-dependent macros to help declare dead (non-returning) and * pure (no side effects) functions, and unused variables. They are * null except for versions of gcc that are known to support the features * properly (old versions of gcc-2 supported the dead and pure features * in a different (wrong) way). If we do not provide an implementation * for a given compiler, let the compile fail if it is told to use * a feature that we cannot live without. */ /* * TI ADD - check that __GNUC__ is defined before referencing it to avoid * generating an error when __GNUC__ treated as zero warning is * promoted to an error via -pdse195 option. */ # 279 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * Keywords added in C11. */ # 349 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * Emulation of C11 _Generic(). Unlike the previously defined C11 * keywords, it is not possible to implement this using exactly the same * syntax. Therefore implement something similar under the name * __generic(). Unlike _Generic(), this macro can only distinguish * between a single type, so it requires nested invocations to * distinguish multiple cases. */ # 368 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * C99 Static array indices in function parameter declarations. Syntax such as: * void bar(int myArray[static 10]); * is allowed in C99 but not in C++. Define __min_size appropriately so * headers using it can be compiled in either language. Use like this: * void bar(int myArray[__min_size(10)]); */ # 423 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* XXX: should use `#if __STDC_VERSION__ < 199901'. */ # 433 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* C++11 exposes a load of C99 stuff */ # 444 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * GCC 2.95 provides `__restrict' as an extension to C90 to support the * C99-specific `restrict' type qualifier. We happen to use `__restrict' as * a way to define the `restrict' type qualifier without disturbing older * software that is unaware of C99 keywords. * The TI compiler supports __restrict in all compilation modes. */ # 461 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * GNU C version 2.96 adds explicit branch prediction so that * the CPU back-end can hint the processor and also so that * code blocks can be reordered such that the predicted path * sees a more linear flow, thus improving cache behavior, etc. * * The following two macros provide us with a way to utilize this * compiler feature. Use __predict_true() if you expect the expression * to evaluate to true, and __predict_false() if you expect the * expression to evaluate to false. * * A few notes about usage: * * * Generally, __predict_false() error condition checks (unless * you have some _strong_ reason to do otherwise, in which case * document it), and/or __predict_true() `no-error' condition * checks, assuming you want to optimize for the no-error case. * * * Other than that, if you don't know the likelihood of a test * succeeding from empirical or other `hard' evidence, don't * make predictions. * * * These are meant to be used in places that are run `a lot'. * It is wasteful to make predictions in code that is run * seldomly (e.g. at subsystem initialization time) as the * basic block reordering that this affects can often generate * larger code. */ # 507 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * We define this here since , , and * require it. */ # 527 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * Given the pointer x to the member m of the struct s, return * a pointer to the containing structure. When using GCC, we first * assign pointer x to a local variable, to check that its type is * compatible with member m. */ # 543 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * Compiler-dependent macros to declare that functions take printf-like * or scanf-like arguments. They are null except for versions of gcc * that are known to support the features properly (old versions of gcc-2 * didn't permit keeping the keywords out of the application namespace). */ # 567 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ # 628 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * Embed the rcs id of a source file in the resulting library. Note that in * more recent ELF binutils, we use .ident allowing the ID to be stripped. * Usage: * __FBSDID("$FreeBSD$"); */ # 686 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /*- * The following definitions are an extension of the behavior originally * implemented in , but with a different level of granularity. * POSIX.1 requires that the macros we test be defined before any standard * header file is included. * * Here's a quick run-down of the versions: * defined(_POSIX_SOURCE) 1003.1-1988 * _POSIX_C_SOURCE == 1 1003.1-1990 * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option * _POSIX_C_SOURCE == 199309 1003.1b-1993 * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, * and the omnibus ISO/IEC 9945-1: 1996 * _POSIX_C_SOURCE == 200112 1003.1-2001 * _POSIX_C_SOURCE == 200809 1003.1-2008 * * In addition, the X/Open Portability Guide, which is now the Single UNIX * Specification, defines a feature-test macro which indicates the version of * that specification, and which subsumes _POSIX_C_SOURCE. * * Our macros begin with two underscores to avoid namespace screwage. */ /* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */ /* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */ /* Deal with various X/Open Portability Guides and Single UNIX Spec. */ # 738 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * Deal with all versions of POSIX. The ordering relative to the tests above is * important. */ # 769 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /*- * Deal with _ANSI_SOURCE: * If it is defined, and no other compilation environment is explicitly * requested, then define our internal feature-test macros to zero. This * makes no difference to the preprocessor (undefined symbols in preprocessing * expressions are defined to have value zero), but makes it more convenient for * a test program to print out the values. * * If a program mistakenly defines _ANSI_SOURCE and some other macro such as * _POSIX_C_SOURCE, we will assume that it wants the broader compilation * environment (and in fact we will never get here). */ # 808 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* User override __EXT1_VISIBLE */ # 822 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * Old versions of GCC use non-standard ARM arch symbols; acle-compat.h * translates them to __ARM_ARCH and the modern feature symbols defined by ARM. */ /* * Nullability qualifiers: currently only supported by Clang. */ # 845 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * Type Safety Checking * * Clang provides additional attributes to enable checking type safety * properties that cannot be enforced by the C type system. */ # 863 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/cdefs.h" 3 /* * Lock annotations. * * Clang provides support for doing basic thread-safety tests at * compile-time, by marking which locks will/should be held when * entering/leaving a functions. * * Furthermore, it is also possible to annotate variables and structure * members to enforce that they are only accessed when certain locks are * held. */ /* Structure implements a lock. */ /* Function acquires an exclusive or shared lock. */ /* Function attempts to acquire an exclusive or shared lock. */ /* Function releases a lock. */ /* Function asserts that an exclusive or shared lock is held. */ /* Function requires that an exclusive or shared lock is or is not held. */ /* Function should not be analyzed. */ /* Guard variables and structure members by lock. */ # 37 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/stdint.h" 2 3 # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/_types.h" 1 3 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2002 Mike Barcroft * All rights reserved. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. * * $FreeBSD$ */ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\machine/_types.h" 1 3 /*- * SPDX-License-Identifier: BSD-4-Clause * * Copyright (c) 2002 Mike Barcroft * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * 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. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. * * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 * From: @(#)types.h 8.3 (Berkeley) 1/5/94 * $FreeBSD$ */ # 58 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\machine/_types.h" 3 /* Always use POSIX epoch for time_t */ /* Unless AEABI portability mode or user indicates __TI_TIME_USES_64 = 0, */ /* use 64bit time_t and redirect all time routines to 64bit variants. */ # 71 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\machine/_types.h" 3 /* * Basic types upon which most other types are built. */ typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short __int16_t; typedef unsigned short __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; __extension__ /* LONGLONG */ typedef long long __int64_t; __extension__ /* LONGLONG */ typedef unsigned long long __uint64_t; /* * Standard type definitions. */ typedef __uint32_t __clock_t; /* clock()... */ typedef __int32_t __critical_t; typedef double __double_t; typedef float __float_t; typedef __int32_t __intfptr_t; typedef __int64_t __intmax_t; typedef __int32_t __intptr_t; typedef __int32_t __int_fast8_t; typedef __int32_t __int_fast16_t; typedef __int32_t __int_fast32_t; typedef __int64_t __int_fast64_t; typedef __int8_t __int_least8_t; typedef __int16_t __int_least16_t; typedef __int32_t __int_least32_t; typedef __int64_t __int_least64_t; typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */ typedef __int32_t __register_t; typedef __int32_t __segsz_t; /* segment size (in pages) */ typedef __uint32_t __size_t; /* sizeof() */ typedef __int32_t __ssize_t; /* byte count or error */ typedef __int64_t __time_t; /* time()... */ typedef __uint32_t __uintfptr_t; typedef __uint64_t __uintmax_t; typedef __uint32_t __uintptr_t; typedef __uint32_t __uint_fast8_t; typedef __uint32_t __uint_fast16_t; typedef __uint32_t __uint_fast32_t; typedef __uint64_t __uint_fast64_t; typedef __uint8_t __uint_least8_t; typedef __uint16_t __uint_least16_t; typedef __uint32_t __uint_least32_t; typedef __uint64_t __uint_least64_t; typedef __uint32_t __u_register_t; typedef __uint32_t __vm_offset_t; typedef __uint32_t __vm_paddr_t; typedef __uint32_t __vm_size_t; typedef int __WCHAR_T_TYPE__; typedef __WCHAR_T_TYPE__ ___wchar_t; # 150 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\machine/_types.h" 3 # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\machine/_limits.h" 1 3 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * 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. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. * * @(#)limits.h 8.3 (Berkeley) 1/4/94 * $FreeBSD$ */ # 43 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\machine/_limits.h" 3 /* * According to ANSI (section 2.2.4.2), the values below must be usable by * #if preprocessing directives. Additionally, the expression must have the * same type as would an expression that is an object of the corresponding * type converted according to the integral promotions. The subtraction for * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). */ # 71 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\machine/_limits.h" 3 /* max value for an unsigned long long */ # 83 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\machine/_limits.h" 3 /* Quads and long longs are the same size. Ensure they stay in sync. */ /* Minimum signal stack size. */ # 151 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\machine/_types.h" 2 3 /* * POSIX target specific _off_t type definition */ typedef long _off_t; /* * Unusual type definitions. */ typedef __builtin_va_list __va_list; /* internally known to gcc */ typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ # 36 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/_types.h" 2 3 /* * Standard type definitions. */ typedef __int32_t __blksize_t; /* file block size */ typedef __int64_t __blkcnt_t; /* file block count */ typedef __int32_t __clockid_t; /* clock_gettime()... */ typedef __uint32_t __fflags_t; /* file flags */ typedef __uint64_t __fsblkcnt_t; typedef __uint64_t __fsfilcnt_t; typedef __uint32_t __gid_t; typedef __int64_t __id_t; /* can hold a gid_t, pid_t, or uid_t */ typedef __uint64_t __ino_t; /* inode number */ typedef long __key_t; /* IPC key (for Sys V IPC) */ typedef __int32_t __lwpid_t; /* Thread ID (a.k.a. LWP) */ typedef __uint16_t __mode_t; /* permissions */ typedef int __accmode_t; /* access permissions */ typedef int __nl_item; typedef __uint64_t __nlink_t; /* link count */ typedef _off_t __off_t; /* file offset (target-specific) */ typedef __int64_t __off64_t; /* file offset (always 64-bit) */ typedef __int32_t __pid_t; /* process [group] */ typedef __int64_t __rlim_t; /* resource limit - intentionally */ /* signed, because of legacy code */ /* that uses -1 for RLIM_INFINITY */ typedef __uint8_t __sa_family_t; typedef __uint32_t __socklen_t; typedef long __suseconds_t; /* microseconds (signed) */ typedef struct __timer *__timer_t; /* timer_gettime()... */ typedef struct __mq *__mqd_t; /* mq_open()... */ typedef __uint32_t __uid_t; typedef unsigned int __useconds_t; /* microseconds (unsigned) */ typedef int __cpuwhich_t; /* which parameter for cpuset. */ typedef int __cpulevel_t; /* level parameter for cpuset. */ typedef int __cpusetid_t; /* cpuset identifier. */ /* * Unusual type definitions. */ /* * rune_t is declared to be an ``int'' instead of the more natural * ``unsigned long'' or ``long''. Two things are happening here. It is not * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, * it looks like 10646 will be a 31 bit standard. This means that if your * ints cannot hold 32 bits, you will be in trouble. The reason an int was * chosen over a long is that the is*() and to*() routines take ints (says * ANSI C), but they use __ct_rune_t instead of int. * * NOTE: rune_t is not covered by ANSI nor other standards, and should not * be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and * rune_t must be the same type. Also, wint_t should be able to hold all * members of the largest character set plus one extra value (WEOF), and * must be at least 16 bits. */ typedef int __ct_rune_t; /* arg type for ctype funcs */ typedef __ct_rune_t __rune_t; /* rune_t (see above) */ typedef __ct_rune_t __wint_t; /* wint_t (see above) */ /* Clang already provides these types as built-ins, but only in C++ mode. */ typedef __uint_least16_t __char16_t; typedef __uint_least32_t __char32_t; /* In C++11, char16_t and char32_t are built-in types. */ typedef struct { long long __max_align1 __attribute__((aligned(_Alignof(long long)))); long double __max_align2 __attribute__((aligned(_Alignof(long double)))); } __max_align_t; typedef __uint64_t __dev_t; /* device number */ typedef __uint32_t __fixpt_t; /* fixed point number */ /* * mbstate_t is an opaque object to keep conversion state during multibyte * stream conversions. */ # 150 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/_types.h" 3 typedef union { char __mbstate8[128]; __int64_t _mbstateL; /* for alignment */ } __mbstate_t; typedef __uintmax_t __rman_res_t; /* * When the following macro is defined, the system uses 64-bit inode numbers. * Programs can use this to avoid including , with its associated * namespace pollution. */ # 38 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/stdint.h" 2 3 # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\machine/_stdint.h" 1 3 /*- * SPDX-License-Identifier: BSD-2-Clause-NetBSD * * Copyright (c) 2001, 2002 Mike Barcroft * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. * * $FreeBSD$ */ /* 19.4 is issued for macros that are defined in terms of other macros. */ # 65 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\machine/_stdint.h" 3 /* * ISO/IEC 9899:1999 * 7.18.2.1 Limits of exact-width integer types */ /* Minimum values of exact-width signed integer types. */ /* Maximum values of exact-width signed integer types. */ /* Maximum values of exact-width unsigned integer types. */ /* * ISO/IEC 9899:1999 * 7.18.2.2 Limits of minimum-width integer types */ /* Minimum values of minimum-width signed integer types. */ /* Maximum values of minimum-width signed integer types. */ /* Maximum values of minimum-width unsigned integer types. */ /* * ISO/IEC 9899:1999 * 7.18.2.3 Limits of fastest minimum-width integer types */ /* Minimum values of fastest minimum-width signed integer types. */ /* Maximum values of fastest minimum-width signed integer types. */ /* Maximum values of fastest minimum-width unsigned integer types. */ /* * ISO/IEC 9899:1999 * 7.18.2.4 Limits of integer types capable of holding object pointers */ /* * ISO/IEC 9899:1999 * 7.18.2.5 Limits of greatest-width integer types */ /* * ISO/IEC 9899:1999 * 7.18.3 Limits of other integer types */ /* Limits of ptrdiff_t. */ /* Limits of sig_atomic_t. */ /* Limit of size_t. */ /* Limits of wint_t. */ # 40 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/stdint.h" 2 3 # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/_stdint.h" 1 3 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2011 David E. O'Brien * Copyright (c) 2001 Mike Barcroft * All rights reserved. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. * * $FreeBSD$ */ typedef __int8_t int8_t; typedef __int16_t int16_t; typedef __int32_t int32_t; typedef __int64_t int64_t; typedef __uint8_t uint8_t; typedef __uint16_t uint16_t; typedef __uint32_t uint32_t; typedef __uint64_t uint64_t; typedef __intptr_t intptr_t; typedef __uintptr_t uintptr_t; typedef __intmax_t intmax_t; typedef __uintmax_t uintmax_t; # 41 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/stdint.h" 2 3 typedef __int_least8_t int_least8_t; typedef __int_least16_t int_least16_t; typedef __int_least32_t int_least32_t; typedef __int_least64_t int_least64_t; typedef __uint_least8_t uint_least8_t; typedef __uint_least16_t uint_least16_t; typedef __uint_least32_t uint_least32_t; typedef __uint_least64_t uint_least64_t; typedef __int_fast8_t int_fast8_t; typedef __int_fast16_t int_fast16_t; typedef __int_fast32_t int_fast32_t; typedef __int_fast64_t int_fast64_t; typedef __uint_fast8_t uint_fast8_t; typedef __uint_fast16_t uint_fast16_t; typedef __uint_fast32_t uint_fast32_t; typedef __uint_fast64_t uint_fast64_t; /* GNU and Darwin define this and people seem to think it's portable */ # 74 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/stdint.h" 3 /* Limits of wchar_t. */ /* ISO/IEC 9899:2011 K.3.4.4 */ # 49 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\stdint.h" 2 3 # 53 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\lib\\clang\\15.0.7\\include\\stdint.h" 2 3 # 37 "../main_freertos.c" 2 /* POSIX Header files */ # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang\\pthread.h" 1 /* * Copyright (c) 2015-2022 Texas Instruments Incorporated - http://www.ti.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * 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. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * 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. */ /* * ======== pthread.h ======== */ /* compiler vendor check */ # 49 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang\\pthread.h" # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/sys/types.h" 1 /* * Copyright (c) 2017-2022 Texas Instruments Incorporated - http://www.ti.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * 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. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * 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. */ /* * ======== sys/types.h ======== */ /* compiler vendor check */ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\lib\\clang\\15.0.7\\include\\stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ # 17 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\lib\\clang\\15.0.7\\include\\stddef.h" 3 /* Always define miscellaneous pieces when modules are available. */ # 26 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\lib\\clang\\15.0.7\\include\\stddef.h" 3 /* __need_wint_t is intentionally not defined here. */ /* Always define ptrdiff_t when modules are available. */ typedef int ptrdiff_t; /* Always define size_t when modules are available. */ typedef unsigned int size_t; /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ # 66 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\lib\\clang\\15.0.7\\include\\stddef.h" 3 /* Always define wchar_t when modules are available. */ typedef int wchar_t; # 102 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\lib\\clang\\15.0.7\\include\\stddef.h" 3 # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\lib\\clang\\15.0.7\\include/__stddef_max_align_t.h" 1 3 /*===---- __stddef_max_align_t.h - Definition of max_align_t for modules ---=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ # 18 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\lib\\clang\\15.0.7\\include/__stddef_max_align_t.h" 3 // Define 'max_align_t' to match the GCC definition. typedef struct { long long __clang_max_align_nonce1 __attribute__((__aligned__(__alignof__(long long)))); long double __clang_max_align_nonce2 __attribute__((__aligned__(__alignof__(long double)))); } max_align_t; # 103 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\lib\\clang\\15.0.7\\include\\stddef.h" 2 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ # 48 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/sys/types.h" 2 /* toolchain header file */ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/sys/types.h" 1 3 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1982, 1986, 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * 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. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. * * @(#)types.h 8.6 (Berkeley) 2/19/95 * $FreeBSD$ */ /* Machine type dependent parameters. */ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\machine/endian.h" 1 3 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2001 David E. O'Brien * * 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. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. * * @(#)endian.h 8.1 (Berkeley) 6/10/93 * $NetBSD: endian.h,v 1.7 1999/08/21 05:53:51 simonb Exp $ * $FreeBSD$ */ /* * Definitions for byte order, according to byte significance from low * address to high. */ # 47 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/sys/types.h" 2 3 typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; typedef unsigned short ushort; /* Sys V compatibility */ typedef unsigned int uint; /* Sys V compatibility */ /* * XXX POSIX sized integrals that should appear only in . */ typedef __uint8_t u_int8_t; /* unsigned integrals (deprecated) */ typedef __uint16_t u_int16_t; typedef __uint32_t u_int32_t; typedef __uint64_t u_int64_t; typedef __uint64_t u_quad_t; /* quads (deprecated) */ typedef __int64_t quad_t; typedef quad_t * qaddr_t; typedef char * caddr_t; /* core address */ typedef const char * c_caddr_t; /* core address, pointer to const */ typedef __blksize_t blksize_t; typedef __cpuwhich_t cpuwhich_t; typedef __cpulevel_t cpulevel_t; typedef __cpusetid_t cpusetid_t; typedef __blkcnt_t blkcnt_t; typedef __clock_t clock_t; typedef __clockid_t clockid_t; typedef __critical_t critical_t; /* Critical section value */ typedef __int64_t daddr_t; /* disk address */ typedef __dev_t dev_t; /* device number or struct cdev */ typedef __fflags_t fflags_t; /* file flags */ typedef __fixpt_t fixpt_t; /* fixed point number */ typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; typedef __gid_t gid_t; /* group id */ typedef __uint32_t in_addr_t; /* base type for internet address */ typedef __uint16_t in_port_t; typedef __id_t id_t; /* can hold a uid_t or pid_t */ typedef __ino_t ino_t; /* inode number */ typedef __key_t key_t; /* IPC key (for Sys V IPC) */ typedef __lwpid_t lwpid_t; /* Thread ID (a.k.a. LWP) */ typedef __mode_t mode_t; /* permissions */ typedef __accmode_t accmode_t; /* access permissions */ typedef __nlink_t nlink_t; /* link count */ typedef __off_t off_t; /* file offset */ typedef __off64_t off64_t; /* file offset (alias) */ typedef __pid_t pid_t; /* process id */ typedef __register_t register_t; typedef __rlim_t rlim_t; /* resource limit */ typedef __int64_t sbintime_t; typedef __segsz_t segsz_t; /* segment size (in pages) */ # 211 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/sys/types.h" 3 typedef __ssize_t ssize_t; typedef __suseconds_t suseconds_t; /* microseconds (signed) */ typedef __time_t time_t; typedef __timer_t timer_t; typedef __mqd_t mqd_t; typedef __u_register_t u_register_t; typedef __uid_t uid_t; /* user id */ typedef __useconds_t useconds_t; /* microseconds (unsigned) */ typedef unsigned long cap_ioctl_t; struct cap_rights; typedef struct cap_rights cap_rights_t; typedef __vm_offset_t vm_offset_t; typedef __int64_t vm_ooffset_t; typedef __vm_paddr_t vm_paddr_t; typedef __uint64_t vm_pindex_t; typedef __vm_size_t vm_size_t; typedef __rman_res_t rman_res_t; # 303 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/sys/types.h" 3 /* * The following are all things that really shouldn't exist in this header, * since its purpose is to provide typedefs, not miscellaneous doodads. */ # 315 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/sys/types.h" 3 /* * Population count algorithm using SWAR approach * - "SIMD Within A Register". */ static __inline __uint16_t __bitcount16(__uint16_t _x) { _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); _x = (_x + (_x >> 4)) & 0x0f0f; _x = (_x + (_x >> 8)) & 0x00ff; return (_x); } static __inline __uint32_t __bitcount32(__uint32_t _x) { _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1); _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2); _x = (_x + (_x >> 4)) & 0x0f0f0f0f; _x = (_x + (_x >> 8)); _x = (_x + (_x >> 16)) & 0x000000ff; return (_x); } # 358 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/sys/types.h" 3 static __inline __uint64_t __bitcount64(__uint64_t _x) { return (__bitcount32(_x >> 32) + __bitcount32(_x)); } # 372 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/sys/types.h" 3 # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/select.h" 1 3 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * 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. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. * * $FreeBSD$ */ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/_sigset.h" 1 3 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1982, 1986, 1989, 1991, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * 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. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. * * @(#)signal.h 8.4 (Berkeley) 5/4/95 * $FreeBSD$ */ /* * sigset_t macros. */ typedef struct __sigset { __uint32_t __bits[4]; } __sigset_t; # 41 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/select.h" 2 3 # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/_timeval.h" 1 3 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2002 Mike Barcroft * All rights reserved. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. * * $FreeBSD$ */ # 46 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/_timeval.h" 3 /* * Structure returned by gettimeofday(2) system call, and used in other calls. */ struct timeval { time_t tv_sec; /* seconds */ suseconds_t tv_usec; /* and microseconds */ }; # 42 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/select.h" 2 3 # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/timespec.h" 1 3 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * 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. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. * * @(#)time.h 8.5 (Berkeley) 5/4/95 * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp * $FreeBSD$ */ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/_timespec.h" 1 3 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * 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. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. * * @(#)time.h 8.5 (Berkeley) 5/4/95 * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp * $FreeBSD$ */ # 46 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/_timespec.h" 3 struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* and nanoseconds */ }; # 41 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/timespec.h" 2 3 # 56 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/timespec.h" 3 /* * Structure defined by POSIX.1b to be like a itimerval, but with * timespecs. Used in the timer_*() system calls. */ struct itimerspec { struct timespec it_interval; struct timespec it_value; }; # 43 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/select.h" 2 3 typedef unsigned long __fd_mask; typedef __fd_mask fd_mask; typedef __sigset_t sigset_t; /* * Select uses bit masks of file descriptors in longs. These macros * manipulate such bit fields (the filesystem macros use chars). * FD_SETSIZE may be defined by the user, but the default here should * be enough for most uses. */ # 73 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/select.h" 3 typedef struct fd_set { __fd_mask __fds_bits[(((1024) + (((sizeof(__fd_mask) * 8)) - 1)) / ((sizeof(__fd_mask) * 8)))]; } fd_set; # 100 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\sys/select.h" 3 int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, const struct timespec *restrict, const sigset_t *restrict); /* XXX missing restrict type-qualifier */ int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); # 373 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/sys/types.h" 2 3 /* * These declarations belong elsewhere, but are repeated here and in * to give broken programs a better chance of working with * 64-bit off_t's. */ int ftruncate(int, off_t); off_t lseek(int, off_t, int); void * mmap(void *, size_t, int, int, int, off_t); int truncate(const char *, off_t); # 52 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/sys/types.h" 2 # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang\\sys/_internal.h" 1 /* * Copyright (c) 2017-2022 Texas Instruments Incorporated - http://www.ti.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * 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. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * 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. */ /* * ======== sys/_internal.h ======== * Vendor specific internal details */ /* compiler vendor check */ # 54 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang\\sys/_internal.h" /* These opaque object types replicate the kernel internal object * structures. They are used in a union when defining an opaque * object in order to guarantee the opaque object is correctly sized * and aligned with respect to the kernel objects. */ enum Opaque_Mode { Opaque_Mode_1, Opaque_Mode_2, Opaque_Mode_3, Opaque_Mode_4 }; struct Opaque_Struct__; struct Opaque_QueueElem { struct Opaque_QueueElem *volatile next; struct Opaque_QueueElem *volatile prev; }; struct Opaque_QueueStruct { struct Opaque_QueueElem __f0; struct Opaque_Struct__ *__f1; }; struct sysbios_Semaphore { struct Opaque_Struct__ *__f0; unsigned int __f1; enum Opaque_Mode __f2; volatile uint_least16_t __f3; struct Opaque_QueueStruct __f4; struct Opaque_Struct__ *__f5; }; struct freertos_Semaphore { void *__f0; }; struct sysbios_Barrier { struct sysbios_Semaphore sem; int count; int pendCount; }; struct freertos_Barrier { int count; int pendCount; struct Opaque_Struct__ *waitList; struct Opaque_Struct__ *last; }; struct sysbios_Mutex { struct Opaque_Struct__ *owner; int lockCnt; int type; struct sysbios_Semaphore sem; struct Opaque_Struct__ *mpo; }; struct freertos_Mutex { int protocol; void *owner; int type; void *sem; /* struct freertos_Semaphore */ }; struct sysbios_RWLock { struct sysbios_Semaphore sem; struct sysbios_Semaphore readSem; int activeReaderCnt; int blockedReaderCnt; void *owner; }; struct freertos_RWLock { struct freertos_Semaphore sem; struct freertos_Semaphore readSem; int activeReaderCnt; int blockedReaderCnt; void *owner; }; struct sysbios_Cond { struct Opaque_QueueStruct waitList; uint32_t clockId; }; struct freertos_Cond { struct Opaque_QueueElem waitList; uint32_t clockId; }; # 54 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/sys/types.h" 2 /* ************************************************************************* * posix types ************************************************************************* */ /* * ======== pthread_attr_t ======== */ typedef struct pthread_attr_t { int priority; void *stack; size_t stacksize; size_t guardsize; int detachstate; } pthread_attr_t; typedef uint32_t pthread_barrierattr_t; typedef uint32_t pthread_condattr_t; typedef void *pthread_key_t; typedef struct pthread_mutexattr_t { int type; int protocol; int prioceiling; } pthread_mutexattr_t; typedef uint32_t pthread_rwlockattr_t; typedef void *pthread_t; typedef union { struct sysbios_Barrier sysbios; struct freertos_Barrier freertos; } pthread_barrier_t; typedef union { struct sysbios_Cond sysbios; struct freertos_Cond freertos; } pthread_cond_t; typedef union { struct sysbios_Mutex sysbios; struct freertos_Mutex freertos; } pthread_mutex_t; typedef uint32_t pthread_once_t; typedef union { struct sysbios_RWLock sysbios; struct freertos_RWLock freertos; } pthread_rwlock_t; struct _pthread_cleanup_context { pthread_t thread; void (*fxn)(void *); void *arg; int cancelType; struct _pthread_cleanup_context *next; }; # 50 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang\\pthread.h" 2 # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/time.h" 1 /* * Copyright (c) 2017-2022 Texas Instruments Incorporated - http://www.ti.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * 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. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * 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. */ /* * ======== time.h ======== */ /* compiler vendor check */ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\lib\\clang\\15.0.7\\include\\stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ # 48 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/time.h" 2 /* local header files */ # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/signal.h" 1 /* * Copyright (c) 2017-2022 Texas Instruments Incorporated - http://www.ti.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * 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. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * 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. */ /* * ======== signal.h ======== */ /* compiler vendor check */ # 49 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/signal.h" /* include toolchain's header file */ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/signal.h" 1 3 /*- * Copyright (c) 1982, 1986, 1989, 1991, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * * Copyright (c) 2014-2014 Texas Instruments Incorporated * * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * 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. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. * * @(#)signal.h 8.4 (Berkeley) 5/4/95 * $FreeBSD: release/10.0.0/sys/sys/signal.h 233519 2012-03-26 19:12:09Z rmh $ */ # 56 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/signal.h" 3 int raise(int); typedef void __sighandler_t(int); # 80 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/signal.h" 3 __sighandler_t *signal(int s, __sighandler_t * t); typedef int sig_atomic_t; # 51 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/signal.h" 2 # 68 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/signal.h" /* ************************************************************************* * signal types ************************************************************************* */ /* * ======== sigval ======== */ union sigval { int sival_int; /* integer signal value */ void *sival_ptr; /* pointer signal value */ }; /* Deprecated. This typedef is for compatibility with old SDKs. It is * not part of the POSIX standard. It will be removed in a future * release. TIRTOS-1317 */ typedef union sigval sigval; /* * ======== sigevent ======== */ struct sigevent { int sigev_notify; /* notification type */ int sigev_signo; /* signal number */ union sigval sigev_value; /* signal value */ void (*sigev_notify_function)(union sigval val); /* notify function */ pthread_attr_t *sigev_notify_attributes; /* notify attributes */ }; /* Deprecated. This typedef is for compatibility with old SDKs. It is * not part of the POSIX standard. It will be removed in a future * release. TIRTOS-1317 */ typedef struct sigevent sigevent; # 52 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/time.h" 2 /* toolchain header files */ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/time.h" 1 3 /*****************************************************************************/ /* time.h */ /* */ /* Copyright (c) 1990 Texas Instruments Incorporated */ /* http://www.ti.com/ */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* */ /* Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* */ /* 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. */ /* */ /* Neither the name of Texas Instruments Incorporated nor the names */ /* of its contributors may be used to endorse or promote products */ /* derived from this software without specific prior written */ /* permission. */ /* */ /* 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. */ /* */ /*****************************************************************************/ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\abi_prefix.h" 1 3 /*****************************************************************************/ /* ABI_PREFIX.H */ /* */ /* Copyright (c) 2016 Texas Instruments Incorporated */ /* http://www.ti.com/ */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* */ /* Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* */ /* 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. */ /* */ /* Neither the name of Texas Instruments Incorporated nor the names */ /* of its contributors may be used to endorse or promote products */ /* derived from this software without specific prior written */ /* permission. */ /* */ /* 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. */ /* */ /*****************************************************************************/ # 43 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/time.h" 2 3 # 64 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/time.h" 3 /* Use sys/_types.h for clock_t and time_t if it exists */ # 76 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/time.h" 3 typedef __int64_t __time64_t; typedef __uint32_t __time32_t; typedef unsigned int size_t; # 122 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/time.h" 3 /*---------------------------------------------------------------------------*/ /* The ARM ABI says __aeabi_CLOCKS_PER_SEC is a const int. C99 says that */ /* CLOCKS_PER_SEC is a constant of type clock_t. Therefore on ARM we define */ /* type of __clocks_per_sec_t as int and for all other targets it is clock_t */ /*---------------------------------------------------------------------------*/ typedef int __clocks_per_sec_t; extern const __clocks_per_sec_t __aeabi_CLOCKS_PER_SEC; struct tm { int tm_sec; /* seconds after the minute - [0,59] */ int tm_min; /* minutes after the hour - [0,59] */ int tm_hour; /* hours after the midnight - [0,23] */ int tm_mday; /* day of the month - [1,31] */ int tm_mon; /* months since January - [0,11] */ int tm_year; /* years since 1900 */ int tm_wday; /* days since Sunday - [0,6] */ int tm_yday; /* days since Jan 1st - [0,365] */ int tm_isdst; /* Daylight Savings Time flag */ }; /*************************************************************************/ /* TIME ZONE STRUCTURE DEFINITION */ /*************************************************************************/ typedef struct { short daylight; long timezone; /* seconds WEST of UTC. Strange but traditional */ char tzname[4]; char dstname[4]; } TZ; extern TZ _tz; /****************************************************************************/ /* FUNCTION DECLARATIONS. (NOTE : clock AND time ARE SYSTEM SPECIFIC) */ /****************************************************************************/ clock_t clock(void); __time32_t __time32(__time32_t *_timer); __time32_t __mktime32(struct tm *_tptr); double __difftime32(__time32_t _time1, __time32_t _time0); static __inline char *__ctime32(const __time32_t *_timer); struct tm *__gmtime32(const __time32_t *_timer); struct tm *__localtime32(const __time32_t *_timer); __time64_t __time64(__time64_t *_timer); __time64_t __mktime64(struct tm *_tptr); double __difftime64(__time64_t _time1, __time64_t _time0); static __inline char *__ctime64(const __time64_t *_timer); struct tm *__gmtime64(const __time64_t *_timer); struct tm *__localtime64(const __time64_t *_timer); char *asctime(const struct tm *_timeptr); size_t strftime(char * restrict _out, size_t _maxsize, const char * restrict _format, const struct tm * restrict _timeptr); static __inline char *__ctime32(const __time32_t *timer) { return asctime(__localtime32(timer)); } static __inline char *__ctime64(const __time64_t *timer) { return asctime(__localtime64(timer)); } /*-----------------------------------------------------------------------*/ /* The user may define __TI_TIME_USES_64=1 to redirect all time */ /* functions to time64 functions. */ /*-----------------------------------------------------------------------*/ static __inline time_t time(time_t *timer) { return __time64(timer); } static __inline time_t mktime(struct tm *tptr) { return __mktime64(tptr); } static __inline double difftime(time_t time1, time_t time0) { return __difftime64(time1, time0); } static __inline char *ctime(const time_t *timer) { return __ctime64(timer); } static __inline struct tm *gmtime(const time_t *timer) { return __gmtime64(timer); } static __inline struct tm *localtime(const time_t *timer) { return __localtime64(timer); } # 236 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/time.h" 3 /*---------------------------------------------------------------------------*/ /* A header file conforming to ARM CLIB ABI (GENC-003539) should */ /* define _AEABI_PORTABLE when _AEABI_PORTABILITY_LEVEL is defined. */ /*---------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/ /* If sys/cdefs.h is available, go ahead and include it. xlocale.h assumes */ /* this file will have already included sys/cdefs.h. */ /*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/ /* Include xlocale/_time.h if POSIX is enabled. This will expose the */ /* xlocale time interface. */ /*----------------------------------------------------------------------------*/ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\xlocale/_time.h" 1 3 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2011, 2012 The FreeBSD Foundation * All rights reserved. * * This software was developed by David Chisnall under sponsorship from * the FreeBSD Foundation. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. * * $FreeBSD$ */ typedef struct _xlocale *locale_t; /* * This file is included from both locale.h and xlocale.h. We need to expose * the declarations unconditionally if we are included from xlocale.h, but only * if we are in POSIX2008 mode if included from locale.h. */ size_t strftime_l(char * restrict, size_t, const char * restrict, const struct tm * restrict, locale_t) __attribute__((__format__ (__strftime__, 3, 0))); # 260 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\include\\c\\../../include/c/time.h" 2 3 # 56 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/time.h" 2 /* * Timer support. */ /* * CLOCK_REALTIME represents the realtime clock for the system. For this * clock, clock_gettime() returns the time since the beginning of the * Epoch. SYS/BIOS implements clock_gettime() and clock_settime() with * the ti.sysbios.hal.Seconds module for CLOCK_REALTIME. */ /* * CLOCK_MONOTONIC represents a system clock that cannot be set via * clock_settime(). For SYS/BIOS, CLOCK_MONOTONIC represents the * ti.sysbios.knl.Clock system clock. */ # 88 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/time.h" /* * For clockId = CLOCK_REALTIME, clock_gettime() and clock_settime() use * the BIOS Seconds module to get/set the time. Before using clock_gettime() * with clockId = CLOCK_REALTIME, the Seconds module must be initialized. * This can be done by either calling clock_settime(CLOCK_REALTIME,...), * or Seconds_set(). * For clockId = CLOCK_MONOTONIC, clock_gettime() returns a time based on * ti.sysbios.knl.Clock ticks. */ extern int clock_gettime(clockid_t clockId, struct timespec *ts); extern int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); /* * Only clockId = CLOCK_REALTIME is supported for clock_settime(). Only * the value of ts->tv_sec is used is used in clock_settime(). * Returns EINVAL if clockId = CLOCK_MONOTONIC. */ extern int clock_settime(clockid_t clockId, const struct timespec *ts); /* * Create a timer based on the BIOS Clock module. To reduce code size, * the clockId parameter is ignored. */ extern int timer_create(clockid_t clockId, struct sigevent *evp, timer_t *timerid); extern int timer_delete(timer_t timerid); extern int timer_gettime(timer_t timerid, struct itimerspec *its); extern int timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); extern int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); # 51 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang\\pthread.h" 2 # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/sched.h" 1 /* * Copyright (c) 2016-2022 Texas Instruments Incorporated - http://www.ti.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * 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. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * 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. */ /* * ======== sched.h ======== */ /* compiler vendor check */ # 53 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/sched.h" /* * These defines would be in a sched.h, which TI and IAR * toolchains don't have. */ # 69 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang/sched.h" /* * ======== sched_param ======== * This was taken from sys/sched.h */ struct sched_param { int sched_priority; /* Thread execution priority */ }; /* * GNU sched.h declares sched_get_priority_min(), * sched_get_priority_max(), and sched_yield() inside an * #if defined(_POSIX_PRIORITY_SCHEDULING) * block. */ extern int sched_get_priority_min(int policy); extern int sched_get_priority_max(int policy); extern int sched_yield(void); # 52 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang\\pthread.h" 2 # 62 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang\\pthread.h" /* PThread cancellation */ /* * Mutex attributes - type * * PTHREAD_MUTEX_NORMAL: Owner of mutex cannot relock it. Attempting * to relock will cause deadlock. * PTHREAD_MUTEX_RECURSIVE: Owner can relock the mutex. * PTHREAD_MUTEX_ERRORCHECK: If owner attempts to relock the mutex, an * error is returned. * */ /* Passed to pthread_once() */ /* * Mutex attributes - protocol * * PTHREAD_PRIO_NONE: Ownership of mutex does not affect priority. * PTHREAD_PRIO_INHERIT: Owner's priority is boosted to the priority of * highest priority thread blocked on the mutex. * PTHREAD_PRIO_PROTECT: Mutex has a priority ceiling. The owner's * priority is boosted to the highest priority ceiling of all mutexes * owned (regardless of whether or not other threads are blocked on * any of these mutexes). */ /* ************************************************************************* * pthread_attr ************************************************************************* */ extern int pthread_attr_destroy(pthread_attr_t *attr); extern int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate); extern int pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize); extern int pthread_attr_getschedparam(const pthread_attr_t *attr, struct sched_param *schedparam); extern int pthread_attr_getstack(const pthread_attr_t *attr, void **stackaddr, size_t *stacksize); extern int pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize); extern int pthread_attr_init(pthread_attr_t *attr); extern int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachedstate); extern int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize); extern int pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *schedparam); extern int pthread_attr_setstack(pthread_attr_t *attr, void *stackaddr, size_t stacksize); extern int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize); /* ************************************************************************* * pthread ************************************************************************* */ extern int pthread_cancel(pthread_t pthread); extern void _pthread_cleanup_pop(struct _pthread_cleanup_context *context, int execute); extern void _pthread_cleanup_push(struct _pthread_cleanup_context *context, void (*fxn)(void *), void *arg); # 147 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/ti/posix/ticlang\\pthread.h" extern int pthread_create(pthread_t *newthread, const pthread_attr_t *attr, void *(*startroutine)(void *), void *arg); extern int pthread_detach(pthread_t pthread); extern int pthread_equal(pthread_t pt1, pthread_t pt2); extern void pthread_exit(void *ptr); extern int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param); extern int pthread_join(pthread_t th, void **thread_return); extern int pthread_once(pthread_once_t *once, void (*initFxn)(void)); extern pthread_t pthread_self(void); extern int pthread_setcancelstate(int state, int *oldstate); extern int pthread_setschedparam(pthread_t pthread, int policy, const struct sched_param *param); /* ************************************************************************* * pthread_barrierattr ************************************************************************* */ extern int pthread_barrierattr_destroy(pthread_barrierattr_t *attr); extern int pthread_barrierattr_init(pthread_barrierattr_t *attr); /* ************************************************************************* * pthread_barrier ************************************************************************* */ extern int pthread_barrier_destroy(pthread_barrier_t *barrier); extern int pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned count); extern int pthread_barrier_wait(pthread_barrier_t *barrier); /* ************************************************************************* * pthread_condattr ************************************************************************* */ extern int pthread_condattr_destroy(pthread_condattr_t *attr); extern int pthread_condattr_getclock(const pthread_condattr_t *attr, clockid_t *clock_id); extern int pthread_condattr_init(pthread_condattr_t *attr); extern int pthread_condattr_setclock(pthread_condattr_t *attr, clockid_t clock_id); /* ************************************************************************* * pthread_cond ************************************************************************* */ extern int pthread_cond_broadcast(pthread_cond_t *cond); extern int pthread_cond_destroy(pthread_cond_t *cond); extern int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr); extern int pthread_cond_signal(pthread_cond_t *cond); extern int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime); extern int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); /* ************************************************************************* * pthread_key ************************************************************************* */ extern int pthread_key_create(pthread_key_t *key, void (*destructor)(void *)); extern int pthread_key_delete(pthread_key_t key); extern void *pthread_getspecific(pthread_key_t key); extern int pthread_setspecific(pthread_key_t key, const void *value); /* ************************************************************************* * pthread_mutexattr ************************************************************************* */ extern int pthread_mutexattr_destroy(pthread_mutexattr_t *attr); extern int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type); extern int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *attr, int *prioceiling); extern int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr, int *protocol); extern int pthread_mutexattr_init(pthread_mutexattr_t *attr); extern int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr, int prioceiling); extern int pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, int protocol); extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type); /* ************************************************************************* * pthread_mutex ************************************************************************* */ extern int pthread_mutex_destroy(pthread_mutex_t *mutex); extern int pthread_mutex_getprioceiling(const pthread_mutex_t *mutex, int *prioceiling); extern int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr); extern int pthread_mutex_lock(pthread_mutex_t *mutex); extern int pthread_mutex_setprioceiling(pthread_mutex_t *mutex, int prioceiling, int *oldceiling); extern int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *abstime); extern int pthread_mutex_trylock(pthread_mutex_t *mutex); extern int pthread_mutex_unlock(pthread_mutex_t *mutex); /* ************************************************************************* * pthread_rwlockattr ************************************************************************* */ extern int pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr); extern int pthread_rwlockattr_init(pthread_rwlockattr_t *attr); /* ************************************************************************* * pthread_rwlock ************************************************************************* */ extern int pthread_rwlock_destroy(pthread_rwlock_t *rwlock); extern int pthread_rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr); extern int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock); extern int pthread_rwlock_timedrdlock(pthread_rwlock_t *rwlock, const struct timespec *abstime); extern int pthread_rwlock_timedwrlock(pthread_rwlock_t *rwlock, const struct timespec *abstime); extern int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock); extern int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock); extern int pthread_rwlock_unlock(pthread_rwlock_t *rwlock); extern int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock); # 44 "../main_freertos.c" 2 /* RTOS header files */ # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" 1 /* * FreeRTOS Kernel V10.5.1 * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * SPDX-License-Identifier: MIT * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * https://www.FreeRTOS.org * https://github.com/FreeRTOS * */ /* * Include the generic headers required for the FreeRTOS port being used. */ # 1 "C:\\ti\\ccs1271\\ccs\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\lib\\clang\\15.0.7\\include\\stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ # 36 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" 2 /* * If stdint.h cannot be located then: * + If using GCC ensure the -nostdint options is *not* being used. * + Ensure the project's include path includes the directory in which your * compiler stores stdint.h. * + Set any compiler options necessary for it to support C99, as technically * stdint.h is only mandatory with C99 (FreeRTOS does not require C99 in any * other way). * + The FreeRTOS download includes a simple stdint.h definition that can be * used in cases where none is provided by the compiler. The files only * contains the typedefs required to build FreeRTOS. Read the instructions * in FreeRTOS/source/stdint.readme for more information. */ /* *INDENT-OFF* */ /* *INDENT-ON* */ /* Application specific configuration options. */ # 1 "C:/Users/a0496557/workspace_v12/empty_LP_EM_CC2340R53_freertos_ticlang/Debug/syscfg\\FreeRTOSConfig.h" 1 /* * FreeRTOS Kernel V10.0.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. If you wish to use our * Amazon FreeRTOS name, please do so in a fair use way that does not cause * confusion. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. * * http://www.FreeRTOS.org * http://aws.amazon.com/freertos * * 1 tab == 4 spaces! */ /****************************************************************************** See http://www.freertos.org/a00110.html for an explanation of the definitions contained in this file. ******************************************************************************/ /*----------------------------------------------------------- * Application specific definitions. * * These definitions should be adjusted for your particular hardware and * application requirements. * * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. * http://www.freertos.org/a00110.html *----------------------------------------------------------*/ /* These values are generated by SysConfig */ /* General options */ /* Stack sizes, all in words */ /* Software timer definitions. */ /* * The ISR stack will be initialized in the startup__.c file * to 0xa5a5a5a5. The stack peak can then be displayed in Runtime Object View. */ /* * Kernel Object Tracking disabled. Enable Kernel Object Tracking in SysConfig * (FreeRTOS.rovQueueEnabled = true) to use the queue registry and/or ROV * features. */ /* Floating point unit enabled or disabled */ /* Idle hook function enabled or disabled */ /* Modifying the options below is not permitted or currently unsupported */ /* MPU is disabled */ /* Constants related to the behaviour or the scheduler. */ /* Constants that describe the hardware and memory usage. */ /* Required by TI driver implementations */ /* Constants that build features in or out. */ # 123 "C:/Users/a0496557/workspace_v12/empty_LP_EM_CC2340R53_freertos_ticlang/Debug/syscfg\\FreeRTOSConfig.h" /* Constants that define which hook (callback) functions should be used. */ /* Constants provided for debugging and optimisation assistance. */ # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source\\ti/posix/freertos/PTLS.h" 1 /* * Copyright (c) 2017 Texas Instruments Incorporated - http://www.ti.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * 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. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * 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. */ /* * ======== PTLS.h ======== * POSIX Thread Local Storage */ # 45 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source\\ti/posix/freertos/PTLS.h" /* * ======== PTLS_getBuf ======== */ void *PTLS_getBuf(void); /* * ======== PTLS_setBuf ======== */ void PTLS_setBuf(void *buf); /* * ======== PTLS_taskDeleteHook ======== */ void PTLS_taskDeleteHook(void *task); # 132 "C:/Users/a0496557/workspace_v12/empty_LP_EM_CC2340R53_freertos_ticlang/Debug/syscfg\\FreeRTOSConfig.h" 2 /* * Enable thread local storage * * Assign TLS array index ownership here to avoid collisions. * TLS storage is needed to implement thread-safe errno with * TI and IAR compilers. With GNU compiler, we enable newlib. */ # 165 "C:/Users/a0496557/workspace_v12/empty_LP_EM_CC2340R53_freertos_ticlang/Debug/syscfg\\FreeRTOSConfig.h" /* * Set the following definitions to 1 to include the API function, or zero * to exclude the API function. NOTE: Setting an INCLUDE_ parameter to 0 is * only necessary if the linker does not automatically remove functions that * are not referenced anyway. */ # 187 "C:/Users/a0496557/workspace_v12/empty_LP_EM_CC2340R53_freertos_ticlang/Debug/syscfg\\FreeRTOSConfig.h" /* Cortex-M3/4 interrupt priority configuration follows...................... */ /* Use the system definition. * The number of priority bits is reduced by one for TFM-enabled configurations. */ /* * The lowest interrupt priority that can be used in a call to a "set priority" * function. */ /* * The highest interrupt priority that can be used by any interrupt service * routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT * CALL INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A * HIGHER PRIORITY THAN THIS! (higher priorities are lower numeric values. */ /* * Interrupt priorities used by the kernel port layer itself. These are generic * to all Cortex-M ports, and do not rely on any particular library functions. */ /* * !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! * See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. * * The priority is shifted since NVIC priority bits are placed MSB. * Priority 0 is the highest priority. * Priority 1 is the second highest priority, etc. */ /* * The trace facility is turned on to make some functions available for use in * CLI commands. */ # 60 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" 2 /* Basic FreeRTOS definitions. */ # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/projdefs.h" 1 /* * FreeRTOS Kernel V10.5.1 * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * SPDX-License-Identifier: MIT * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * https://www.FreeRTOS.org * https://github.com/FreeRTOS * */ /* * Defines the prototype to which task functions must conform. Defined in this * file to ensure the type is known before portable.h is included. */ typedef void (* TaskFunction_t)( void * ); /* Converts a time in milliseconds to a time in ticks. This macro can be * overridden by a macro of the same name defined in FreeRTOSConfig.h in case the * definition here is not suitable for your application. */ # 53 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/projdefs.h" /* FreeRTOS error definitions. */ /* Macros used for basic data corruption checks. */ # 69 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/projdefs.h" /* The following errno values are used by FreeRTOS+ components, not FreeRTOS * itself. */ # 112 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/projdefs.h" /* The following endian values are used by FreeRTOS+ components, not FreeRTOS * itself. */ /* Re-defining endian values for generic naming. */ # 63 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" 2 /* Definitions specific to the port being used. */ # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/portable.h" 1 /* * FreeRTOS Kernel V10.5.1 * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * SPDX-License-Identifier: MIT * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * https://www.FreeRTOS.org * https://github.com/FreeRTOS * */ /*----------------------------------------------------------- * Portable layer API. Each function must be defined for each port. *----------------------------------------------------------*/ /* Each FreeRTOS port has a unique portmacro.h header file. Originally a * pre-processor definition was used to ensure the pre-processor found the correct * portmacro.h file for the port being used. That scheme was deprecated in favour * of setting the compiler's include path such that it found the correct * portmacro.h file - removing the need for the constant and allowing the * portmacro.h file to be located anywhere in relation to the port being used. * Purely for reasons of backward compatibility the old method is still valid, but * to make it clear that new projects should not use it, support for the port * specific constants has been moved into the deprecated_definitions.h header * file. */ # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/deprecated_definitions.h" 1 /* * FreeRTOS Kernel V10.5.1 * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * SPDX-License-Identifier: MIT * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * https://www.FreeRTOS.org * https://github.com/FreeRTOS * */ /* Each FreeRTOS port has a unique portmacro.h header file. Originally a * pre-processor definition was used to ensure the pre-processor found the correct * portmacro.h file for the port being used. That scheme was deprecated in favour * of setting the compiler's include path such that it found the correct * portmacro.h file - removing the need for the constant and allowing the * portmacro.h file to be located anywhere in relation to the port being used. The * definitions below remain in the code for backward compatibility only. New * projects should not use them. */ # 47 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/portable.h" 2 /* If portENTER_CRITICAL is not defined then including deprecated_definitions.h * did not result in a portmacro.h header file being included - and it should be * included here. In this case the path to the correct portmacro.h header file * must be set in the compiler's include path. */ # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/portable/GCC/ARM_CM0\\portmacro.h" 1 /* * FreeRTOS Kernel V10.5.1 * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * SPDX-License-Identifier: MIT * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * https://www.FreeRTOS.org * https://github.com/FreeRTOS * */ # 37 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/portable/GCC/ARM_CM0\\portmacro.h" /*----------------------------------------------------------- * Port specific definitions. * * The settings in this file configure FreeRTOS correctly for the * given hardware and compiler. * * These settings should not be altered. *----------------------------------------------------------- */ /* Type definitions. */ # 56 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/portable/GCC/ARM_CM0\\portmacro.h" typedef uint32_t StackType_t; typedef long BaseType_t; typedef unsigned long UBaseType_t; typedef uint32_t TickType_t; /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do * not need to be guarded with a critical section. */ /*-----------------------------------------------------------*/ /* Architecture specifics. */ /*-----------------------------------------------------------*/ /* Scheduler utilities. */ extern void vPortYield( void ); /*-----------------------------------------------------------*/ /* Critical section management. */ extern void vPortEnterCritical( void ); extern void vPortExitCritical( void ); extern uint32_t ulSetInterruptMaskFromISR( void ) __attribute__( ( naked ) ); extern void vClearInterruptMaskFromISR( uint32_t ulMask ) __attribute__( ( naked ) ); # 104 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/portable/GCC/ARM_CM0\\portmacro.h" /*-----------------------------------------------------------*/ /* Tickless idle/low power functionality. */ extern void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime ); /*-----------------------------------------------------------*/ /* Task function macros as described on the FreeRTOS.org WEB site. */ # 54 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/portable.h" 2 # 89 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/portable.h" /* Defaults to 0 for backward compatibility. */ /* *INDENT-OFF* */ /* *INDENT-ON* */ # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/mpu_wrappers.h" 1 /* * FreeRTOS Kernel V10.5.1 * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * SPDX-License-Identifier: MIT * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * https://www.FreeRTOS.org * https://github.com/FreeRTOS * */ /* This file redefines API functions to be called through a wrapper macro, but * only for ports that are using the MPU. */ # 100 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/portable.h" 2 /* * Setup the stack of a new task so it is ready to be placed under the * scheduler control. The registers have to be placed on the stack in * the order that the port expects to find them. * */ # 127 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/portable.h" StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack, TaskFunction_t pxCode, void * pvParameters ) ; /* Used by heap_5.c to define the start address and size of each memory region * that together comprise the total FreeRTOS heap space. */ typedef struct HeapRegion { uint8_t * pucStartAddress; size_t xSizeInBytes; } HeapRegion_t; /* Used to pass information about the heap out of vPortGetHeapStats(). */ typedef struct xHeapStats { size_t xAvailableHeapSpaceInBytes; /* The total heap size currently available - this is the sum of all the free blocks, not the largest block that can be allocated. */ size_t xSizeOfLargestFreeBlockInBytes; /* The maximum size, in bytes, of all the free blocks within the heap at the time vPortGetHeapStats() is called. */ size_t xSizeOfSmallestFreeBlockInBytes; /* The minimum size, in bytes, of all the free blocks within the heap at the time vPortGetHeapStats() is called. */ size_t xNumberOfFreeBlocks; /* The number of free memory blocks within the heap at the time vPortGetHeapStats() is called. */ size_t xMinimumEverFreeBytesRemaining; /* The minimum amount of total free memory (sum of all free blocks) there has been in the heap since the system booted. */ size_t xNumberOfSuccessfulAllocations; /* The number of calls to pvPortMalloc() that have returned a valid memory block. */ size_t xNumberOfSuccessfulFrees; /* The number of calls to vPortFree() that has successfully freed a block of memory. */ } HeapStats_t; /* * Used to define multiple heap regions for use by heap_5.c. This function * must be called before any calls to pvPortMalloc() - not creating a task, * queue, semaphore, mutex, software timer, event group, etc. will result in * pvPortMalloc being called. * * pxHeapRegions passes in an array of HeapRegion_t structures - each of which * defines a region of memory that can be used as the heap. The array is * terminated by a HeapRegions_t structure that has a size of 0. The region * with the lowest start address must appear first in the array. */ void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ) ; /* * Returns a HeapStats_t structure filled with information about the current * heap state. */ void vPortGetHeapStats( HeapStats_t * pxHeapStats ); /* * Map to the memory management routines required for the port. */ void * pvPortMalloc( size_t xSize ) ; void * pvPortCalloc( size_t xNum, size_t xSize ) ; void vPortFree( void * pv ) ; void vPortInitialiseBlocks( void ) ; size_t xPortGetFreeHeapSize( void ) ; size_t xPortGetMinimumEverFreeHeapSize( void ) ; # 204 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/portable.h" /* * Setup the hardware ready for the scheduler to take control. This generally * sets up a tick interrupt and sets timers for the correct tick frequency. */ BaseType_t xPortStartScheduler( void ) ; /* * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so * the hardware is left in its original condition after the scheduler stops * executing. */ void vPortEndScheduler( void ) ; /* * The structures and methods of manipulating the MPU are contained within the * port layer. * * Fills the xMPUSettings structure with the memory region information * contained in xRegions. */ # 232 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/portable.h" /* *INDENT-OFF* */ /* *INDENT-ON* */ # 66 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" 2 /* Must be defaulted before configUSE_NEWLIB_REENTRANT is used below. */ /* Required if struct _reent is used. */ # 128 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" /* * Check all the required application specific macros have been defined. * These macros are application specific and (as downloaded) are defined * within FreeRTOSConfig.h. */ # 195 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" /* If INCLUDE_vTaskDelayUntil is set but INCLUDE_xTaskDelayUntil is not then * the project's FreeRTOSConfig.h probably pre-dates the introduction of * xTaskDelayUntil and setting INCLUDE_xTaskDelayUntil to whatever * INCLUDE_vTaskDelayUntil is set to will ensure backward compatibility. */ # 321 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" /* configPRECONDITION should be defined as configASSERT. * The CBMC proofs need a way to track assumptions and assertions. * A configPRECONDITION statement should express an implicit invariant or * assumption made. A configASSERT statement should express an invariant that must * hold explicit before calling the code. */ # 341 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" /* The timers module relies on xTaskGetSchedulerState(). */ # 396 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" /* Remove any unused trace macros. */ /* Used to perform any necessary initialisation - for example, open a file * into which trace is to be written. */ /* Use to close a trace, for example close a file into which trace has been * written. */ /* Called after a task has been selected to run. pxCurrentTCB holds a pointer * to the task control block of the selected task. */ /* Called before stepping the tick count after waking from tickless idle * sleep. */ /* Called immediately before entering tickless idle. */ /* Called when returning to the Idle task after a tickless idle. */ /* Called before a task has been selected to run. pxCurrentTCB holds a pointer * to the task control block of the task being switched out. */ /* Called when a task attempts to take a mutex that is already held by a * lower priority task. pxTCBOfMutexHolder is a pointer to the TCB of the task * that holds the mutex. uxInheritedPriority is the priority the mutex holder * will inherit (the priority of the task that is attempting to obtain the * muted. */ /* Called when a task releases a mutex, the holding of which had resulted in * the task inheriting the priority of a higher priority task. * pxTCBOfMutexHolder is a pointer to the TCB of the task that is releasing the * mutex. uxOriginalPriority is the task's configured (base) priority. */ /* Task is about to block because it cannot read from a * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore * upon which the read was attempted. pxCurrentTCB points to the TCB of the * task that attempted the read. */ /* Task is about to block because it cannot read from a * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore * upon which the read was attempted. pxCurrentTCB points to the TCB of the * task that attempted the read. */ /* Task is about to block because it cannot write to a * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore * upon which the write was attempted. pxCurrentTCB points to the TCB of the * task that attempted the write. */ # 500 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" /* The following event macros are embedded in the kernel API calls. */ # 946 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" /* By default per-instance callbacks are not enabled for stream buffer or message buffer. */ # 960 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" /* Defaults to 1 for backward compatibility. */ # 976 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" /* Defaults to uint16_t for backward compatibility, but can be overridden * in FreeRTOSConfig.h if uint16_t is too restrictive. */ /* Defaults to uint32_t for backward compatibility, but can be overridden in * FreeRTOSConfig.h if uint32_t is too restrictive. */ /* Defaults to size_t for backward compatibility, but can be overridden * in FreeRTOSConfig.h if lengths will always be less than the number of bytes * in a size_t. */ /* Sanity check the configuration. */ # 1021 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" /* The tick type can be read atomically, so critical sections used when the * tick count is returned can be defined away. */ /* Definitions to allow backward compatibility with FreeRTOS versions prior to * V8 if desired. */ /* configPRINTF() was not defined, so define it away to nothing. To use * configPRINTF() then define it as follows (where MyPrintFunction() is * provided by the application writer): * * void MyPrintFunction(const char *pcFormat, ... ); #define configPRINTF( X ) MyPrintFunction X * * Then call like a standard printf() function, but placing brackets around * all parameters so they are passed as a single parameter. For example: * configPRINTF( ("Value = %d", MyVariable) ); */ /* The application writer has not provided their own MAX macro, so define * the following generic implementation. */ /* The application writer has not provided their own MIN macro, so define * the following generic implementation. */ # 1102 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" /* Set configUSE_TASK_FPU_SUPPORT to 0 to omit floating point support even * if floating point hardware is otherwise supported by the FreeRTOS port in use. * This constant is not supported by all FreeRTOS ports that include floating * point support. */ /* Set configENABLE_MPU to 1 to enable MPU support and 0 to disable it. This is * currently used in ARMv8M ports. */ /* Set configENABLE_FPU to 1 to enable FPU support and 0 to disable it. This is * currently used in ARMv8M ports. */ /* Set configENABLE_MVE to 1 to enable MVE support and 0 to disable it. This is * currently used in ARMv8M ports. */ /* Set configENABLE_TRUSTZONE to 1 enable TrustZone support and 0 to disable it. * This is currently used in ARMv8M ports. */ /* Set configRUN_FREERTOS_SECURE_ONLY to 1 to run the FreeRTOS ARMv8M port on * the Secure Side only. */ # 1145 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" /* Sometimes the FreeRTOSConfig.h settings only allow a task to be created using * dynamically allocated RAM, in which case when any task is deleted it is known * that both the task's stack and TCB need to be freed. Sometimes the * FreeRTOSConfig.h settings only allow a task to be created using statically * allocated RAM, in which case when any task is deleted it is known that neither * the task's stack or TCB should be freed. Sometimes the FreeRTOSConfig.h * settings allow a task to be created using either statically or dynamically * allocated RAM, in which case a member of the TCB is used to record whether the * stack and/or TCB were allocated statically or dynamically, so when a task is * deleted the RAM that was allocated dynamically is freed again and no attempt is * made to free the RAM that was allocated statically. * tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE is only true if it is possible for a * task to be created using either statically or dynamically allocated RAM. Note * that if portUSING_MPU_WRAPPERS is 1 then a protected task can be created with * a statically allocated stack and a dynamically allocated TCB. * * The following table lists various combinations of portUSING_MPU_WRAPPERS, * configSUPPORT_DYNAMIC_ALLOCATION and configSUPPORT_STATIC_ALLOCATION and * when it is possible to have both static and dynamic allocation: * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+ * | MPU | Dynamic | Static | Available Functions | Possible Allocations | Both Dynamic and | Need Free | * | | | | | | Static Possible | | * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+ * | 0 | 0 | 1 | xTaskCreateStatic | TCB - Static, Stack - Static | No | No | * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------| * | 0 | 1 | 0 | xTaskCreate | TCB - Dynamic, Stack - Dynamic | No | Yes | * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------| * | 0 | 1 | 1 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes | * | | | | xTaskCreateStatic | 2. TCB - Static, Stack - Static | | | * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------| * | 1 | 0 | 1 | xTaskCreateStatic, | TCB - Static, Stack - Static | No | No | * | | | | xTaskCreateRestrictedStatic | | | | * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------| * | 1 | 1 | 0 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes | * | | | | xTaskCreateRestricted | 2. TCB - Dynamic, Stack - Static | | | * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------| * | 1 | 1 | 1 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes | * | | | | xTaskCreateStatic, | 2. TCB - Dynamic, Stack - Static | | | * | | | | xTaskCreateRestricted, | 3. TCB - Static, Stack - Static | | | * | | | | xTaskCreateRestrictedStatic | | | | * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+ */ /* * In line with software engineering best practice, FreeRTOS implements a strict * data hiding policy, so the real structures used by FreeRTOS to maintain the * state of tasks, queues, semaphores, etc. are not accessible to the application * code. However, if the application writer wants to statically allocate such * an object then the size of the object needs to be known. Dummy structures * that are guaranteed to have the same size and alignment requirements of the * real objects are used for this purpose. The dummy list and list item * structures below are used for inclusion in such a dummy structure. */ struct xSTATIC_LIST_ITEM { TickType_t xDummy2; void * pvDummy3[ 4 ]; }; typedef struct xSTATIC_LIST_ITEM StaticListItem_t; /* See the comments above the struct xSTATIC_LIST_ITEM definition. */ struct xSTATIC_MINI_LIST_ITEM { TickType_t xDummy2; void * pvDummy3[ 2 ]; }; typedef struct xSTATIC_MINI_LIST_ITEM StaticMiniListItem_t; /* See the comments above the struct xSTATIC_LIST_ITEM definition. */ typedef struct xSTATIC_LIST { UBaseType_t uxDummy2; void * pvDummy3; StaticMiniListItem_t xDummy4; } StaticList_t; /* * In line with software engineering best practice, especially when supplying a * library that is likely to change in future versions, FreeRTOS implements a * strict data hiding policy. This means the Task structure used internally by * FreeRTOS is not accessible to application code. However, if the application * writer wants to statically allocate the memory required to create a task then * the size of the task object needs to be known. The StaticTask_t structure * below is provided for this purpose. Its sizes and alignment requirements are * guaranteed to match those of the genuine structure, no matter which * architecture is being used, and no matter how the values in FreeRTOSConfig.h * are set. Its contents are somewhat obfuscated in the hope users will * recognise that it would be unwise to make direct use of the structure members. */ typedef struct xSTATIC_TCB { void * pxDummy1; StaticListItem_t xDummy3[ 2 ]; UBaseType_t uxDummy5; void * pxDummy6; uint8_t ucDummy7[ (12) ]; void * pxDummy8; UBaseType_t uxDummy10[ 2 ]; UBaseType_t uxDummy12[ 2 ]; void * pxDummy14; void * pvDummy15[ 1 ]; # 1291 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" uint32_t ulDummy18[ 1 ]; uint8_t ucDummy19[ 1 ]; uint8_t uxDummy20; # 1304 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\FreeRTOS.h" } StaticTask_t; /* * In line with software engineering best practice, especially when supplying a * library that is likely to change in future versions, FreeRTOS implements a * strict data hiding policy. This means the Queue structure used internally by * FreeRTOS is not accessible to application code. However, if the application * writer wants to statically allocate the memory required to create a queue * then the size of the queue object needs to be known. The StaticQueue_t * structure below is provided for this purpose. Its sizes and alignment * requirements are guaranteed to match those of the genuine structure, no * matter which architecture is being used, and no matter how the values in * FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in the hope * users will recognise that it would be unwise to make direct use of the * structure members. */ typedef struct xSTATIC_QUEUE { void * pvDummy1[ 3 ]; union { void * pvDummy2; UBaseType_t uxDummy2; } u; StaticList_t xDummy3[ 2 ]; UBaseType_t uxDummy4[ 3 ]; uint8_t ucDummy5[ 2 ]; uint8_t ucDummy6; UBaseType_t uxDummy8; uint8_t ucDummy9; } StaticQueue_t; typedef StaticQueue_t StaticSemaphore_t; /* * In line with software engineering best practice, especially when supplying a * library that is likely to change in future versions, FreeRTOS implements a * strict data hiding policy. This means the event group structure used * internally by FreeRTOS is not accessible to application code. However, if * the application writer wants to statically allocate the memory required to * create an event group then the size of the event group object needs to be * know. The StaticEventGroup_t structure below is provided for this purpose. * Its sizes and alignment requirements are guaranteed to match those of the * genuine structure, no matter which architecture is being used, and no matter * how the values in FreeRTOSConfig.h are set. Its contents are somewhat * obfuscated in the hope users will recognise that it would be unwise to make * direct use of the structure members. */ typedef struct xSTATIC_EVENT_GROUP { TickType_t xDummy1; StaticList_t xDummy2; UBaseType_t uxDummy3; uint8_t ucDummy4; } StaticEventGroup_t; /* * In line with software engineering best practice, especially when supplying a * library that is likely to change in future versions, FreeRTOS implements a * strict data hiding policy. This means the software timer structure used * internally by FreeRTOS is not accessible to application code. However, if * the application writer wants to statically allocate the memory required to * create a software timer then the size of the queue object needs to be known. * The StaticTimer_t structure below is provided for this purpose. Its sizes * and alignment requirements are guaranteed to match those of the genuine * structure, no matter which architecture is being used, and no matter how the * values in FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in * the hope users will recognise that it would be unwise to make direct use of * the structure members. */ typedef struct xSTATIC_TIMER { void * pvDummy1; StaticListItem_t xDummy2; TickType_t xDummy3; void * pvDummy5; TaskFunction_t pvDummy6; UBaseType_t uxDummy7; uint8_t ucDummy8; } StaticTimer_t; /* * In line with software engineering best practice, especially when supplying a * library that is likely to change in future versions, FreeRTOS implements a * strict data hiding policy. This means the stream buffer structure used * internally by FreeRTOS is not accessible to application code. However, if * the application writer wants to statically allocate the memory required to * create a stream buffer then the size of the stream buffer object needs to be * known. The StaticStreamBuffer_t structure below is provided for this * purpose. Its size and alignment requirements are guaranteed to match those * of the genuine structure, no matter which architecture is being used, and * no matter how the values in FreeRTOSConfig.h are set. Its contents are * somewhat obfuscated in the hope users will recognise that it would be unwise * to make direct use of the structure members. */ typedef struct xSTATIC_STREAM_BUFFER { size_t uxDummy1[ 4 ]; void * pvDummy2[ 3 ]; uint8_t ucDummy3; UBaseType_t uxDummy4; } StaticStreamBuffer_t; /* Message buffers are built on stream buffers. */ typedef StaticStreamBuffer_t StaticMessageBuffer_t; /* *INDENT-OFF* */ /* *INDENT-ON* */ # 47 "../main_freertos.c" 2 # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\task.h" 1 /* * FreeRTOS Kernel V10.5.1 * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * SPDX-License-Identifier: MIT * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * https://www.FreeRTOS.org * https://github.com/FreeRTOS * */ # 37 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\task.h" # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/list.h" 1 /* * FreeRTOS Kernel V10.5.1 * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * SPDX-License-Identifier: MIT * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * https://www.FreeRTOS.org * https://github.com/FreeRTOS * */ /* * This is the list implementation used by the scheduler. While it is tailored * heavily for the schedulers needs, it is also available for use by * application code. * * list_ts can only store pointers to list_item_ts. Each ListItem_t contains a * numeric value (xItemValue). Most of the time the lists are sorted in * ascending item value order. * * Lists are created already containing one list item. The value of this * item is the maximum possible that can be stored, it is therefore always at * the end of the list and acts as a marker. The list member pxHead always * points to this marker - even though it is at the tail of the list. This * is because the tail contains a wrap back pointer to the true head of * the list. * * In addition to it's value, each list item contains a pointer to the next * item in the list (pxNext), a pointer to the list it is in (pxContainer) * and a pointer to back to the object that contains it. These later two * pointers are included for efficiency of list manipulation. There is * effectively a two way link between the object containing the list item and * the list item itself. * * * \page ListIntroduction List Implementation * \ingroup FreeRTOSIntro */ # 65 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/list.h" /* * The list structure members are modified from within interrupts, and therefore * by rights should be declared volatile. However, they are only modified in a * functionally atomic way (within critical sections of with the scheduler * suspended) and are either passed by reference into a function or indexed via * a volatile variable. Therefore, in all use cases tested so far, the volatile * qualifier can be omitted in order to provide a moderate performance * improvement without adversely affecting functional behaviour. The assembly * instructions generated by the IAR, ARM and GCC compilers when the respective * compiler's options were set for maximum optimisation has been inspected and * deemed to be as intended. That said, as compiler technology advances, and * especially if aggressive cross module optimisation is used (a use case that * has not been exercised to any great extend) then it is feasible that the * volatile qualifier will be needed for correct optimisation. It is expected * that a compiler removing essential code because, without the volatile * qualifier on the list structure members and with aggressive cross module * optimisation, the compiler deemed the code unnecessary will result in * complete and obvious failure of the scheduler. If this is ever experienced * then the volatile qualifier can be inserted in the relevant places within the * list structures by simply defining configLIST_VOLATILE to volatile in * FreeRTOSConfig.h (as per the example at the bottom of this comment block). * If configLIST_VOLATILE is not defined then the preprocessor directives below * will simply #define configLIST_VOLATILE away completely. * * To use volatile list structure members then add the following line to * FreeRTOSConfig.h (without the quotes): * "#define configLIST_VOLATILE volatile" */ /* *INDENT-OFF* */ /* *INDENT-ON* */ /* Macros that can be used to place known values within the list structures, * then check that the known values do not get corrupted during the execution of * the application. These may catch the list data structures being overwritten in * memory. They will not catch data errors caused by incorrect configuration or * use of FreeRTOS.*/ /* Define the macros to do nothing. */ # 140 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/list.h" /* * Definition of the only type of object that a list can contain. */ struct xLIST; struct xLIST_ITEM { /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */ TickType_t xItemValue; /*< The value being listed. In most cases this is used to sort the list in ascending order. */ struct xLIST_ITEM * pxNext; /*< Pointer to the next ListItem_t in the list. */ struct xLIST_ITEM * pxPrevious; /*< Pointer to the previous ListItem_t in the list. */ void * pvOwner; /*< Pointer to the object (normally a TCB) that contains the list item. There is therefore a two way link between the object containing the list item and the list item itself. */ struct xLIST * pxContainer; /*< Pointer to the list in which this list item is placed (if any). */ /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */ }; typedef struct xLIST_ITEM ListItem_t; /* For some reason lint wants this as two separate definitions. */ struct xMINI_LIST_ITEM { /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */ TickType_t xItemValue; struct xLIST_ITEM * pxNext; struct xLIST_ITEM * pxPrevious; }; typedef struct xMINI_LIST_ITEM MiniListItem_t; /* * Definition of the type of queue used by the scheduler. */ typedef struct xLIST { /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */ volatile UBaseType_t uxNumberOfItems; ListItem_t * pxIndex; /*< Used to walk through the list. Points to the last item returned by a call to listGET_OWNER_OF_NEXT_ENTRY (). */ MiniListItem_t xListEnd; /*< List item that contains the maximum possible item value meaning it is always at the end of the list and is therefore used as a marker. */ /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */ } List_t; /* * Access macro to set the owner of a list item. The owner of a list item * is the object (usually a TCB) that contains the list item. * * \page listSET_LIST_ITEM_OWNER listSET_LIST_ITEM_OWNER * \ingroup LinkedList */ /* * Access macro to get the owner of a list item. The owner of a list item * is the object (usually a TCB) that contains the list item. * * \page listGET_LIST_ITEM_OWNER listSET_LIST_ITEM_OWNER * \ingroup LinkedList */ /* * Access macro to set the value of the list item. In most cases the value is * used to sort the list in ascending order. * * \page listSET_LIST_ITEM_VALUE listSET_LIST_ITEM_VALUE * \ingroup LinkedList */ /* * Access macro to retrieve the value of the list item. The value can * represent anything - for example the priority of a task, or the time at * which a task should be unblocked. * * \page listGET_LIST_ITEM_VALUE listGET_LIST_ITEM_VALUE * \ingroup LinkedList */ /* * Access macro to retrieve the value of the list item at the head of a given * list. * * \page listGET_LIST_ITEM_VALUE listGET_LIST_ITEM_VALUE * \ingroup LinkedList */ /* * Return the list item at the head of the list. * * \page listGET_HEAD_ENTRY listGET_HEAD_ENTRY * \ingroup LinkedList */ /* * Return the next list item. * * \page listGET_NEXT listGET_NEXT * \ingroup LinkedList */ /* * Return the list item that marks the end of the list * * \page listGET_END_MARKER listGET_END_MARKER * \ingroup LinkedList */ /* * Access macro to determine if a list contains any items. The macro will * only have the value true if the list is empty. * * \page listLIST_IS_EMPTY listLIST_IS_EMPTY * \ingroup LinkedList */ /* * Access macro to return the number of items in the list. */ /* * Access function to obtain the owner of the next entry in a list. * * The list member pxIndex is used to walk through a list. Calling * listGET_OWNER_OF_NEXT_ENTRY increments pxIndex to the next item in the list * and returns that entry's pxOwner parameter. Using multiple calls to this * function it is therefore possible to move through every item contained in * a list. * * The pxOwner parameter of a list item is a pointer to the object that owns * the list item. In the scheduler this is normally a task control block. * The pxOwner parameter effectively creates a two way link between the list * item and its owner. * * @param pxTCB pxTCB is set to the address of the owner of the next list item. * @param pxList The list from which the next item owner is to be returned. * * \page listGET_OWNER_OF_NEXT_ENTRY listGET_OWNER_OF_NEXT_ENTRY * \ingroup LinkedList */ # 298 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/list.h" /* * Version of uxListRemove() that does not return a value. Provided as a slight * optimisation for xTaskIncrementTick() by being inline. * * Remove an item from a list. The list item has a pointer to the list that * it is in, so only the list item need be passed into the function. * * @param uxListRemove The item to be removed. The item will remove itself from * the list pointed to by it's pxContainer parameter. * * @return The number of items that remain in the list after the list item has * been removed. * * \page listREMOVE_ITEM listREMOVE_ITEM * \ingroup LinkedList */ # 332 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/list.h" /* * Inline version of vListInsertEnd() to provide slight optimisation for * xTaskIncrementTick(). * * Insert a list item into a list. The item will be inserted in a position * such that it will be the last item within the list returned by multiple * calls to listGET_OWNER_OF_NEXT_ENTRY. * * The list member pxIndex is used to walk through a list. Calling * listGET_OWNER_OF_NEXT_ENTRY increments pxIndex to the next item in the list. * Placing an item in a list using vListInsertEnd effectively places the item * in the list position pointed to by pxIndex. This means that every other * item within the list will be returned by listGET_OWNER_OF_NEXT_ENTRY before * the pxIndex parameter again points to the item being inserted. * * @param pxList The list into which the item is to be inserted. * * @param pxNewListItem The list item to be inserted into the list. * * \page listINSERT_END listINSERT_END * \ingroup LinkedList */ # 379 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include/list.h" /* * Access function to obtain the owner of the first entry in a list. Lists * are normally sorted in ascending item value order. * * This function returns the pxOwner member of the first item in the list. * The pxOwner parameter of a list item is a pointer to the object that owns * the list item. In the scheduler this is normally a task control block. * The pxOwner parameter effectively creates a two way link between the list * item and its owner. * * @param pxList The list from which the owner of the head item is to be * returned. * * \page listGET_OWNER_OF_HEAD_ENTRY listGET_OWNER_OF_HEAD_ENTRY * \ingroup LinkedList */ /* * Check to see if a list item is within a list. The list item maintains a * "container" pointer that points to the list it is in. All this macro does * is check to see if the container and the list match. * * @param pxList The list we want to know if the list item is within. * @param pxListItem The list item we want to know if is in the list. * @return pdTRUE if the list item is in the list, otherwise pdFALSE. */ /* * Return the list a list item is contained within (referenced from). * * @param pxListItem The list item being queried. * @return A pointer to the List_t object that references the pxListItem */ /* * This provides a crude means of knowing if a list has been initialised, as * pxList->xListEnd.xItemValue is set to portMAX_DELAY by the vListInitialise() * function. */ /* * Must be called before a list is used! This initialises all the members * of the list structure and inserts the xListEnd item into the list as a * marker to the back of the list. * * @param pxList Pointer to the list being initialised. * * \page vListInitialise vListInitialise * \ingroup LinkedList */ void vListInitialise( List_t * const pxList ) ; /* * Must be called before a list item is used. This sets the list container to * null so the item does not think that it is already contained in a list. * * @param pxItem Pointer to the list item being initialised. * * \page vListInitialiseItem vListInitialiseItem * \ingroup LinkedList */ void vListInitialiseItem( ListItem_t * const pxItem ) ; /* * Insert a list item into a list. The item will be inserted into the list in * a position determined by its item value (ascending item value order). * * @param pxList The list into which the item is to be inserted. * * @param pxNewListItem The item that is to be placed in the list. * * \page vListInsert vListInsert * \ingroup LinkedList */ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) ; /* * Insert a list item into a list. The item will be inserted in a position * such that it will be the last item within the list returned by multiple * calls to listGET_OWNER_OF_NEXT_ENTRY. * * The list member pxIndex is used to walk through a list. Calling * listGET_OWNER_OF_NEXT_ENTRY increments pxIndex to the next item in the list. * Placing an item in a list using vListInsertEnd effectively places the item * in the list position pointed to by pxIndex. This means that every other * item within the list will be returned by listGET_OWNER_OF_NEXT_ENTRY before * the pxIndex parameter again points to the item being inserted. * * @param pxList The list into which the item is to be inserted. * * @param pxNewListItem The list item to be inserted into the list. * * \page vListInsertEnd vListInsertEnd * \ingroup LinkedList */ void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) ; /* * Remove an item from a list. The list item has a pointer to the list that * it is in, so only the list item need be passed into the function. * * @param uxListRemove The item to be removed. The item will remove itself from * the list pointed to by it's pxContainer parameter. * * @return The number of items that remain in the list after the list item has * been removed. * * \page uxListRemove uxListRemove * \ingroup LinkedList */ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) ; /* *INDENT-OFF* */ /* *INDENT-ON* */ # 38 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\task.h" 2 /* *INDENT-OFF* */ /* *INDENT-ON* */ /*----------------------------------------------------------- * MACROS AND DEFINITIONS *----------------------------------------------------------*/ /* * If tskKERNEL_VERSION_NUMBER ends with + it represents the version in development * after the numbered release. * * The tskKERNEL_VERSION_MAJOR, tskKERNEL_VERSION_MINOR, tskKERNEL_VERSION_BUILD * values will reflect the last released version number. */ /* MPU region parameters passed in ulParameters * of MemoryRegion_t struct. */ /* The direct to task notification feature used to have only a single notification * per task. Now there is an array of notifications per task that is dimensioned by * configTASK_NOTIFICATION_ARRAY_ENTRIES. For backward compatibility, any use of the * original direct to task notification defaults to using the first index in the * array. */ /** * task. h * * Type by which tasks are referenced. For example, a call to xTaskCreate * returns (via a pointer parameter) an TaskHandle_t variable that can then * be used as a parameter to vTaskDelete to delete the task. * * \defgroup TaskHandle_t TaskHandle_t * \ingroup Tasks */ struct tskTaskControlBlock; /* The old naming convention is used to prevent breaking kernel aware debuggers. */ typedef struct tskTaskControlBlock * TaskHandle_t; /* * Defines the prototype to which the application task hook function must * conform. */ typedef BaseType_t (* TaskHookFunction_t)( void * ); /* Task states returned by eTaskGetState. */ typedef enum { eRunning = 0, /* A task is querying the state of itself, so must be running. */ eReady, /* The task being queried is in a ready or pending ready list. */ eBlocked, /* The task being queried is in the Blocked state. */ eSuspended, /* The task being queried is in the Suspended state, or is in the Blocked state with an infinite time out. */ eDeleted, /* The task being queried has been deleted, but its TCB has not yet been freed. */ eInvalid /* Used as an 'invalid state' value. */ } eTaskState; /* Actions that can be performed when vTaskNotify() is called. */ typedef enum { eNoAction = 0, /* Notify the task without updating its notify value. */ eSetBits, /* Set bits in the task's notification value. */ eIncrement, /* Increment the task's notification value. */ eSetValueWithOverwrite, /* Set the task's notification value to a specific value even if the previous value has not yet been read by the task. */ eSetValueWithoutOverwrite /* Set the task's notification value if the previous value has been read by the task. */ } eNotifyAction; /* * Used internally only. */ typedef struct xTIME_OUT { BaseType_t xOverflowCount; TickType_t xTimeOnEntering; } TimeOut_t; /* * Defines the memory ranges allocated to the task when an MPU is used. */ typedef struct xMEMORY_REGION { void * pvBaseAddress; uint32_t ulLengthInBytes; uint32_t ulParameters; } MemoryRegion_t; /* * Parameters required to create an MPU protected task. */ typedef struct xTASK_PARAMETERS { TaskFunction_t pvTaskCode; const char * pcName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ uint16_t usStackDepth; void * pvParameters; UBaseType_t uxPriority; StackType_t * puxStackBuffer; MemoryRegion_t xRegions[ 1 ]; } TaskParameters_t; /* Used with the uxTaskGetSystemState() function to return the state of each task * in the system. */ typedef struct xTASK_STATUS { TaskHandle_t xHandle; /* The handle of the task to which the rest of the information in the structure relates. */ const char * pcTaskName; /* A pointer to the task's name. This value will be invalid if the task was deleted since the structure was populated! */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ UBaseType_t xTaskNumber; /* A number unique to the task. */ eTaskState eCurrentState; /* The state in which the task existed when the structure was populated. */ UBaseType_t uxCurrentPriority; /* The priority at which the task was running (may be inherited) when the structure was populated. */ UBaseType_t uxBasePriority; /* The priority to which the task will return if the task's current priority has been inherited to avoid unbounded priority inversion when obtaining a mutex. Only valid if configUSE_MUTEXES is defined as 1 in FreeRTOSConfig.h. */ uint32_t ulRunTimeCounter; /* The total run time allocated to the task so far, as defined by the run time stats clock. See https://www.FreeRTOS.org/rtos-run-time-stats.html. Only valid when configGENERATE_RUN_TIME_STATS is defined as 1 in FreeRTOSConfig.h. */ StackType_t * pxStackBase; /* Points to the lowest address of the task's stack area. */ uint16_t usStackHighWaterMark; /* The minimum amount of stack space that has remained for the task since the task was created. The closer this value is to zero the closer the task has come to overflowing its stack. */ } TaskStatus_t; /* Possible return values for eTaskConfirmSleepModeStatus(). */ typedef enum { eAbortSleep = 0, /* A task has been made ready or a context switch pended since portSUPPRESS_TICKS_AND_SLEEP() was called - abort entering a sleep mode. */ eStandardSleep, /* Enter a sleep mode that will not last any longer than the expected idle time. */ eNoTasksWaitingTimeout /* No tasks are waiting for a timeout so it is safe to enter a sleep mode that can only be exited by an external interrupt. */ } eSleepModeStatus; /** * Defines the priority used by the idle task. This must not be modified. * * \ingroup TaskUtils */ /** * task. h * * Macro for forcing a context switch. * * \defgroup taskYIELD taskYIELD * \ingroup SchedulerControl */ /** * task. h * * Macro to mark the start of a critical code region. Preemptive context * switches cannot occur when in a critical region. * * NOTE: This may alter the stack (depending on the portable implementation) * so must be used with care! * * \defgroup taskENTER_CRITICAL taskENTER_CRITICAL * \ingroup SchedulerControl */ /** * task. h * * Macro to mark the end of a critical code region. Preemptive context * switches cannot occur when in a critical region. * * NOTE: This may alter the stack (depending on the portable implementation) * so must be used with care! * * \defgroup taskEXIT_CRITICAL taskEXIT_CRITICAL * \ingroup SchedulerControl */ /** * task. h * * Macro to disable all maskable interrupts. * * \defgroup taskDISABLE_INTERRUPTS taskDISABLE_INTERRUPTS * \ingroup SchedulerControl */ /** * task. h * * Macro to enable microcontroller interrupts. * * \defgroup taskENABLE_INTERRUPTS taskENABLE_INTERRUPTS * \ingroup SchedulerControl */ /* Definitions returned by xTaskGetSchedulerState(). taskSCHEDULER_SUSPENDED is * 0 to generate more optimal code when configASSERT() is defined as the constant * is used in assert() statements. */ /*----------------------------------------------------------- * TASK CREATION API *----------------------------------------------------------*/ /** * task. h * @code{c} * BaseType_t xTaskCreate( * TaskFunction_t pxTaskCode, * const char *pcName, * configSTACK_DEPTH_TYPE usStackDepth, * void *pvParameters, * UBaseType_t uxPriority, * TaskHandle_t *pxCreatedTask * ); * @endcode * * Create a new task and add it to the list of tasks that are ready to run. * * Internally, within the FreeRTOS implementation, tasks use two blocks of * memory. The first block is used to hold the task's data structures. The * second block is used by the task as its stack. If a task is created using * xTaskCreate() then both blocks of memory are automatically dynamically * allocated inside the xTaskCreate() function. (see * https://www.FreeRTOS.org/a00111.html). If a task is created using * xTaskCreateStatic() then the application writer must provide the required * memory. xTaskCreateStatic() therefore allows a task to be created without * using any dynamic memory allocation. * * See xTaskCreateStatic() for a version that does not use any dynamic memory * allocation. * * xTaskCreate() can only be used to create a task that has unrestricted * access to the entire microcontroller memory map. Systems that include MPU * support can alternatively create an MPU constrained task using * xTaskCreateRestricted(). * * @param pxTaskCode Pointer to the task entry function. Tasks * must be implemented to never return (i.e. continuous loop). * * @param pcName A descriptive name for the task. This is mainly used to * facilitate debugging. Max length defined by configMAX_TASK_NAME_LEN - default * is 16. * * @param usStackDepth The size of the task stack specified as the number of * variables the stack can hold - not the number of bytes. For example, if * the stack is 16 bits wide and usStackDepth is defined as 100, 200 bytes * will be allocated for stack storage. * * @param pvParameters Pointer that will be used as the parameter for the task * being created. * * @param uxPriority The priority at which the task should run. Systems that * include MPU support can optionally create tasks in a privileged (system) * mode by setting bit portPRIVILEGE_BIT of the priority parameter. For * example, to create a privileged task at priority 2 the uxPriority parameter * should be set to ( 2 | portPRIVILEGE_BIT ). * * @param pxCreatedTask Used to pass back a handle by which the created task * can be referenced. * * @return pdPASS if the task was successfully created and added to a ready * list, otherwise an error code defined in the file projdefs.h * * Example usage: * @code{c} * // Task to be created. * void vTaskCode( void * pvParameters ) * { * for( ;; ) * { * // Task code goes here. * } * } * * // Function that creates a task. * void vOtherFunction( void ) * { * static uint8_t ucParameterToPass; * TaskHandle_t xHandle = NULL; * * // Create the task, storing the handle. Note that the passed parameter ucParameterToPass * // must exist for the lifetime of the task, so in this case is declared static. If it was just an * // an automatic stack variable it might no longer exist, or at least have been corrupted, by the time * // the new task attempts to access it. * xTaskCreate( vTaskCode, "NAME", STACK_SIZE, &ucParameterToPass, tskIDLE_PRIORITY, &xHandle ); * configASSERT( xHandle ); * * // Use the handle to delete the task. * if( xHandle != NULL ) * { * vTaskDelete( xHandle ); * } * } * @endcode * \defgroup xTaskCreate xTaskCreate * \ingroup Tasks */ BaseType_t xTaskCreate( TaskFunction_t pxTaskCode, const char * const pcName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask ) ; /** * task. h * @code{c} * TaskHandle_t xTaskCreateStatic( TaskFunction_t pxTaskCode, * const char *pcName, * uint32_t ulStackDepth, * void *pvParameters, * UBaseType_t uxPriority, * StackType_t *puxStackBuffer, * StaticTask_t *pxTaskBuffer ); * @endcode * * Create a new task and add it to the list of tasks that are ready to run. * * Internally, within the FreeRTOS implementation, tasks use two blocks of * memory. The first block is used to hold the task's data structures. The * second block is used by the task as its stack. If a task is created using * xTaskCreate() then both blocks of memory are automatically dynamically * allocated inside the xTaskCreate() function. (see * https://www.FreeRTOS.org/a00111.html). If a task is created using * xTaskCreateStatic() then the application writer must provide the required * memory. xTaskCreateStatic() therefore allows a task to be created without * using any dynamic memory allocation. * * @param pxTaskCode Pointer to the task entry function. Tasks * must be implemented to never return (i.e. continuous loop). * * @param pcName A descriptive name for the task. This is mainly used to * facilitate debugging. The maximum length of the string is defined by * configMAX_TASK_NAME_LEN in FreeRTOSConfig.h. * * @param ulStackDepth The size of the task stack specified as the number of * variables the stack can hold - not the number of bytes. For example, if * the stack is 32-bits wide and ulStackDepth is defined as 100 then 400 bytes * will be allocated for stack storage. * * @param pvParameters Pointer that will be used as the parameter for the task * being created. * * @param uxPriority The priority at which the task will run. * * @param puxStackBuffer Must point to a StackType_t array that has at least * ulStackDepth indexes - the array will then be used as the task's stack, * removing the need for the stack to be allocated dynamically. * * @param pxTaskBuffer Must point to a variable of type StaticTask_t, which will * then be used to hold the task's data structures, removing the need for the * memory to be allocated dynamically. * * @return If neither puxStackBuffer nor pxTaskBuffer are NULL, then the task * will be created and a handle to the created task is returned. If either * puxStackBuffer or pxTaskBuffer are NULL then the task will not be created and * NULL is returned. * * Example usage: * @code{c} * * // Dimensions of the buffer that the task being created will use as its stack. * // NOTE: This is the number of words the stack will hold, not the number of * // bytes. For example, if each stack item is 32-bits, and this is set to 100, * // then 400 bytes (100 * 32-bits) will be allocated. #define STACK_SIZE 200 * * // Structure that will hold the TCB of the task being created. * StaticTask_t xTaskBuffer; * * // Buffer that the task being created will use as its stack. Note this is * // an array of StackType_t variables. The size of StackType_t is dependent on * // the RTOS port. * StackType_t xStack[ STACK_SIZE ]; * * // Function that implements the task being created. * void vTaskCode( void * pvParameters ) * { * // The parameter value is expected to be 1 as 1 is passed in the * // pvParameters value in the call to xTaskCreateStatic(). * configASSERT( ( uint32_t ) pvParameters == 1UL ); * * for( ;; ) * { * // Task code goes here. * } * } * * // Function that creates a task. * void vOtherFunction( void ) * { * TaskHandle_t xHandle = NULL; * * // Create the task without using any dynamic memory allocation. * xHandle = xTaskCreateStatic( * vTaskCode, // Function that implements the task. * "NAME", // Text name for the task. * STACK_SIZE, // Stack size in words, not bytes. * ( void * ) 1, // Parameter passed into the task. * tskIDLE_PRIORITY,// Priority at which the task is created. * xStack, // Array to use as the task's stack. * &xTaskBuffer ); // Variable to hold the task's data structure. * * // puxStackBuffer and pxTaskBuffer were not NULL, so the task will have * // been created, and xHandle will be the task's handle. Use the handle * // to suspend the task. * vTaskSuspend( xHandle ); * } * @endcode * \defgroup xTaskCreateStatic xTaskCreateStatic * \ingroup Tasks */ TaskHandle_t xTaskCreateStatic( TaskFunction_t pxTaskCode, const char * const pcName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ const uint32_t ulStackDepth, void * const pvParameters, UBaseType_t uxPriority, StackType_t * const puxStackBuffer, StaticTask_t * const pxTaskBuffer ) ; /** * task. h * @code{c} * BaseType_t xTaskCreateRestricted( TaskParameters_t *pxTaskDefinition, TaskHandle_t *pxCreatedTask ); * @endcode * * Only available when configSUPPORT_DYNAMIC_ALLOCATION is set to 1. * * xTaskCreateRestricted() should only be used in systems that include an MPU * implementation. * * Create a new task and add it to the list of tasks that are ready to run. * The function parameters define the memory regions and associated access * permissions allocated to the task. * * See xTaskCreateRestrictedStatic() for a version that does not use any * dynamic memory allocation. * * @param pxTaskDefinition Pointer to a structure that contains a member * for each of the normal xTaskCreate() parameters (see the xTaskCreate() API * documentation) plus an optional stack buffer and the memory region * definitions. * * @param pxCreatedTask Used to pass back a handle by which the created task * can be referenced. * * @return pdPASS if the task was successfully created and added to a ready * list, otherwise an error code defined in the file projdefs.h * * Example usage: * @code{c} * // Create an TaskParameters_t structure that defines the task to be created. * static const TaskParameters_t xCheckTaskParameters = * { * vATask, // pvTaskCode - the function that implements the task. * "ATask", // pcName - just a text name for the task to assist debugging. * 100, // usStackDepth - the stack size DEFINED IN WORDS. * NULL, // pvParameters - passed into the task function as the function parameters. * ( 1UL | portPRIVILEGE_BIT ),// uxPriority - task priority, set the portPRIVILEGE_BIT if the task should run in a privileged state. * cStackBuffer,// puxStackBuffer - the buffer to be used as the task stack. * * // xRegions - Allocate up to three separate memory regions for access by * // the task, with appropriate access permissions. Different processors have * // different memory alignment requirements - refer to the FreeRTOS documentation * // for full information. * { * // Base address Length Parameters * { cReadWriteArray, 32, portMPU_REGION_READ_WRITE }, * { cReadOnlyArray, 32, portMPU_REGION_READ_ONLY }, * { cPrivilegedOnlyAccessArray, 128, portMPU_REGION_PRIVILEGED_READ_WRITE } * } * }; * * int main( void ) * { * TaskHandle_t xHandle; * * // Create a task from the const structure defined above. The task handle * // is requested (the second parameter is not NULL) but in this case just for * // demonstration purposes as its not actually used. * xTaskCreateRestricted( &xRegTest1Parameters, &xHandle ); * * // Start the scheduler. * vTaskStartScheduler(); * * // Will only get here if there was insufficient memory to create the idle * // and/or timer task. * for( ;; ); * } * @endcode * \defgroup xTaskCreateRestricted xTaskCreateRestricted * \ingroup Tasks */ /** * task. h * @code{c} * BaseType_t xTaskCreateRestrictedStatic( TaskParameters_t *pxTaskDefinition, TaskHandle_t *pxCreatedTask ); * @endcode * * Only available when configSUPPORT_STATIC_ALLOCATION is set to 1. * * xTaskCreateRestrictedStatic() should only be used in systems that include an * MPU implementation. * * Internally, within the FreeRTOS implementation, tasks use two blocks of * memory. The first block is used to hold the task's data structures. The * second block is used by the task as its stack. If a task is created using * xTaskCreateRestricted() then the stack is provided by the application writer, * and the memory used to hold the task's data structure is automatically * dynamically allocated inside the xTaskCreateRestricted() function. If a task * is created using xTaskCreateRestrictedStatic() then the application writer * must provide the memory used to hold the task's data structures too. * xTaskCreateRestrictedStatic() therefore allows a memory protected task to be * created without using any dynamic memory allocation. * * @param pxTaskDefinition Pointer to a structure that contains a member * for each of the normal xTaskCreate() parameters (see the xTaskCreate() API * documentation) plus an optional stack buffer and the memory region * definitions. If configSUPPORT_STATIC_ALLOCATION is set to 1 the structure * contains an additional member, which is used to point to a variable of type * StaticTask_t - which is then used to hold the task's data structure. * * @param pxCreatedTask Used to pass back a handle by which the created task * can be referenced. * * @return pdPASS if the task was successfully created and added to a ready * list, otherwise an error code defined in the file projdefs.h * * Example usage: * @code{c} * // Create an TaskParameters_t structure that defines the task to be created. * // The StaticTask_t variable is only included in the structure when * // configSUPPORT_STATIC_ALLOCATION is set to 1. The PRIVILEGED_DATA macro can * // be used to force the variable into the RTOS kernel's privileged data area. * static PRIVILEGED_DATA StaticTask_t xTaskBuffer; * static const TaskParameters_t xCheckTaskParameters = * { * vATask, // pvTaskCode - the function that implements the task. * "ATask", // pcName - just a text name for the task to assist debugging. * 100, // usStackDepth - the stack size DEFINED IN WORDS. * NULL, // pvParameters - passed into the task function as the function parameters. * ( 1UL | portPRIVILEGE_BIT ),// uxPriority - task priority, set the portPRIVILEGE_BIT if the task should run in a privileged state. * cStackBuffer,// puxStackBuffer - the buffer to be used as the task stack. * * // xRegions - Allocate up to three separate memory regions for access by * // the task, with appropriate access permissions. Different processors have * // different memory alignment requirements - refer to the FreeRTOS documentation * // for full information. * { * // Base address Length Parameters * { cReadWriteArray, 32, portMPU_REGION_READ_WRITE }, * { cReadOnlyArray, 32, portMPU_REGION_READ_ONLY }, * { cPrivilegedOnlyAccessArray, 128, portMPU_REGION_PRIVILEGED_READ_WRITE } * } * * &xTaskBuffer; // Holds the task's data structure. * }; * * int main( void ) * { * TaskHandle_t xHandle; * * // Create a task from the const structure defined above. The task handle * // is requested (the second parameter is not NULL) but in this case just for * // demonstration purposes as its not actually used. * xTaskCreateRestrictedStatic( &xRegTest1Parameters, &xHandle ); * * // Start the scheduler. * vTaskStartScheduler(); * * // Will only get here if there was insufficient memory to create the idle * // and/or timer task. * for( ;; ); * } * @endcode * \defgroup xTaskCreateRestrictedStatic xTaskCreateRestrictedStatic * \ingroup Tasks */ /** * task. h * @code{c} * void vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const pxRegions ); * @endcode * * Memory regions are assigned to a restricted task when the task is created by * a call to xTaskCreateRestricted(). These regions can be redefined using * vTaskAllocateMPURegions(). * * @param xTask The handle of the task being updated. * * @param xRegions A pointer to a MemoryRegion_t structure that contains the * new memory region definitions. * * Example usage: * @code{c} * // Define an array of MemoryRegion_t structures that configures an MPU region * // allowing read/write access for 1024 bytes starting at the beginning of the * // ucOneKByte array. The other two of the maximum 3 definable regions are * // unused so set to zero. * static const MemoryRegion_t xAltRegions[ portNUM_CONFIGURABLE_REGIONS ] = * { * // Base address Length Parameters * { ucOneKByte, 1024, portMPU_REGION_READ_WRITE }, * { 0, 0, 0 }, * { 0, 0, 0 } * }; * * void vATask( void *pvParameters ) * { * // This task was created such that it has access to certain regions of * // memory as defined by the MPU configuration. At some point it is * // desired that these MPU regions are replaced with that defined in the * // xAltRegions const struct above. Use a call to vTaskAllocateMPURegions() * // for this purpose. NULL is used as the task handle to indicate that this * // function should modify the MPU regions of the calling task. * vTaskAllocateMPURegions( NULL, xAltRegions ); * * // Now the task can continue its function, but from this point on can only * // access its stack and the ucOneKByte array (unless any other statically * // defined or shared regions have been declared elsewhere). * } * @endcode * \defgroup vTaskAllocateMPURegions vTaskAllocateMPURegions * \ingroup Tasks */ void vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const pxRegions ) ; /** * task. h * @code{c} * void vTaskDelete( TaskHandle_t xTaskToDelete ); * @endcode * * INCLUDE_vTaskDelete must be defined as 1 for this function to be available. * See the configuration section for more information. * * Remove a task from the RTOS real time kernel's management. The task being * deleted will be removed from all ready, blocked, suspended and event lists. * * NOTE: The idle task is responsible for freeing the kernel allocated * memory from tasks that have been deleted. It is therefore important that * the idle task is not starved of microcontroller processing time if your * application makes any calls to vTaskDelete (). Memory allocated by the * task code is not automatically freed, and should be freed before the task * is deleted. * * See the demo application file death.c for sample code that utilises * vTaskDelete (). * * @param xTaskToDelete The handle of the task to be deleted. Passing NULL will * cause the calling task to be deleted. * * Example usage: * @code{c} * void vOtherFunction( void ) * { * TaskHandle_t xHandle; * * // Create the task, storing the handle. * xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); * * // Use the handle to delete the task. * vTaskDelete( xHandle ); * } * @endcode * \defgroup vTaskDelete vTaskDelete * \ingroup Tasks */ void vTaskDelete( TaskHandle_t xTaskToDelete ) ; /*----------------------------------------------------------- * TASK CONTROL API *----------------------------------------------------------*/ /** * task. h * @code{c} * void vTaskDelay( const TickType_t xTicksToDelay ); * @endcode * * Delay a task for a given number of ticks. The actual time that the * task remains blocked depends on the tick rate. The constant * portTICK_PERIOD_MS can be used to calculate real time from the tick * rate - with the resolution of one tick period. * * INCLUDE_vTaskDelay must be defined as 1 for this function to be available. * See the configuration section for more information. * * * vTaskDelay() specifies a time at which the task wishes to unblock relative to * the time at which vTaskDelay() is called. For example, specifying a block * period of 100 ticks will cause the task to unblock 100 ticks after * vTaskDelay() is called. vTaskDelay() does not therefore provide a good method * of controlling the frequency of a periodic task as the path taken through the * code, as well as other task and interrupt activity, will affect the frequency * at which vTaskDelay() gets called and therefore the time at which the task * next executes. See xTaskDelayUntil() for an alternative API function designed * to facilitate fixed frequency execution. It does this by specifying an * absolute time (rather than a relative time) at which the calling task should * unblock. * * @param xTicksToDelay The amount of time, in tick periods, that * the calling task should block. * * Example usage: * * void vTaskFunction( void * pvParameters ) * { * // Block for 500ms. * const TickType_t xDelay = 500 / portTICK_PERIOD_MS; * * for( ;; ) * { * // Simply toggle the LED every 500ms, blocking between each toggle. * vToggleLED(); * vTaskDelay( xDelay ); * } * } * * \defgroup vTaskDelay vTaskDelay * \ingroup TaskCtrl */ void vTaskDelay( const TickType_t xTicksToDelay ) ; /** * task. h * @code{c} * BaseType_t xTaskDelayUntil( TickType_t *pxPreviousWakeTime, const TickType_t xTimeIncrement ); * @endcode * * INCLUDE_xTaskDelayUntil must be defined as 1 for this function to be available. * See the configuration section for more information. * * Delay a task until a specified time. This function can be used by periodic * tasks to ensure a constant execution frequency. * * This function differs from vTaskDelay () in one important aspect: vTaskDelay () will * cause a task to block for the specified number of ticks from the time vTaskDelay () is * called. It is therefore difficult to use vTaskDelay () by itself to generate a fixed * execution frequency as the time between a task starting to execute and that task * calling vTaskDelay () may not be fixed [the task may take a different path though the * code between calls, or may get interrupted or preempted a different number of times * each time it executes]. * * Whereas vTaskDelay () specifies a wake time relative to the time at which the function * is called, xTaskDelayUntil () specifies the absolute (exact) time at which it wishes to * unblock. * * The macro pdMS_TO_TICKS() can be used to calculate the number of ticks from a * time specified in milliseconds with a resolution of one tick period. * * @param pxPreviousWakeTime Pointer to a variable that holds the time at which the * task was last unblocked. The variable must be initialised with the current time * prior to its first use (see the example below). Following this the variable is * automatically updated within xTaskDelayUntil (). * * @param xTimeIncrement The cycle time period. The task will be unblocked at * time *pxPreviousWakeTime + xTimeIncrement. Calling xTaskDelayUntil with the * same xTimeIncrement parameter value will cause the task to execute with * a fixed interface period. * * @return Value which can be used to check whether the task was actually delayed. * Will be pdTRUE if the task way delayed and pdFALSE otherwise. A task will not * be delayed if the next expected wake time is in the past. * * Example usage: * @code{c} * // Perform an action every 10 ticks. * void vTaskFunction( void * pvParameters ) * { * TickType_t xLastWakeTime; * const TickType_t xFrequency = 10; * BaseType_t xWasDelayed; * * // Initialise the xLastWakeTime variable with the current time. * xLastWakeTime = xTaskGetTickCount (); * for( ;; ) * { * // Wait for the next cycle. * xWasDelayed = xTaskDelayUntil( &xLastWakeTime, xFrequency ); * * // Perform action here. xWasDelayed value can be used to determine * // whether a deadline was missed if the code here took too long. * } * } * @endcode * \defgroup xTaskDelayUntil xTaskDelayUntil * \ingroup TaskCtrl */ BaseType_t xTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) ; /* * vTaskDelayUntil() is the older version of xTaskDelayUntil() and does not * return a value. */ /** * task. h * @code{c} * BaseType_t xTaskAbortDelay( TaskHandle_t xTask ); * @endcode * * INCLUDE_xTaskAbortDelay must be defined as 1 in FreeRTOSConfig.h for this * function to be available. * * A task will enter the Blocked state when it is waiting for an event. The * event it is waiting for can be a temporal event (waiting for a time), such * as when vTaskDelay() is called, or an event on an object, such as when * xQueueReceive() or ulTaskNotifyTake() is called. If the handle of a task * that is in the Blocked state is used in a call to xTaskAbortDelay() then the * task will leave the Blocked state, and return from whichever function call * placed the task into the Blocked state. * * There is no 'FromISR' version of this function as an interrupt would need to * know which object a task was blocked on in order to know which actions to * take. For example, if the task was blocked on a queue the interrupt handler * would then need to know if the queue was locked. * * @param xTask The handle of the task to remove from the Blocked state. * * @return If the task referenced by xTask was not in the Blocked state then * pdFAIL is returned. Otherwise pdPASS is returned. * * \defgroup xTaskAbortDelay xTaskAbortDelay * \ingroup TaskCtrl */ BaseType_t xTaskAbortDelay( TaskHandle_t xTask ) ; /** * task. h * @code{c} * UBaseType_t uxTaskPriorityGet( const TaskHandle_t xTask ); * @endcode * * INCLUDE_uxTaskPriorityGet must be defined as 1 for this function to be available. * See the configuration section for more information. * * Obtain the priority of any task. * * @param xTask Handle of the task to be queried. Passing a NULL * handle results in the priority of the calling task being returned. * * @return The priority of xTask. * * Example usage: * @code{c} * void vAFunction( void ) * { * TaskHandle_t xHandle; * * // Create a task, storing the handle. * xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); * * // ... * * // Use the handle to obtain the priority of the created task. * // It was created with tskIDLE_PRIORITY, but may have changed * // it itself. * if( uxTaskPriorityGet( xHandle ) != tskIDLE_PRIORITY ) * { * // The task has changed it's priority. * } * * // ... * * // Is our priority higher than the created task? * if( uxTaskPriorityGet( xHandle ) < uxTaskPriorityGet( NULL ) ) * { * // Our priority (obtained using NULL handle) is higher. * } * } * @endcode * \defgroup uxTaskPriorityGet uxTaskPriorityGet * \ingroup TaskCtrl */ UBaseType_t uxTaskPriorityGet( const TaskHandle_t xTask ) ; /** * task. h * @code{c} * UBaseType_t uxTaskPriorityGetFromISR( const TaskHandle_t xTask ); * @endcode * * A version of uxTaskPriorityGet() that can be used from an ISR. */ UBaseType_t uxTaskPriorityGetFromISR( const TaskHandle_t xTask ) ; /** * task. h * @code{c} * eTaskState eTaskGetState( TaskHandle_t xTask ); * @endcode * * INCLUDE_eTaskGetState must be defined as 1 for this function to be available. * See the configuration section for more information. * * Obtain the state of any task. States are encoded by the eTaskState * enumerated type. * * @param xTask Handle of the task to be queried. * * @return The state of xTask at the time the function was called. Note the * state of the task might change between the function being called, and the * functions return value being tested by the calling task. */ eTaskState eTaskGetState( TaskHandle_t xTask ) ; /** * task. h * @code{c} * void vTaskGetInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState ); * @endcode * * configUSE_TRACE_FACILITY must be defined as 1 for this function to be * available. See the configuration section for more information. * * Populates a TaskStatus_t structure with information about a task. * * @param xTask Handle of the task being queried. If xTask is NULL then * information will be returned about the calling task. * * @param pxTaskStatus A pointer to the TaskStatus_t structure that will be * filled with information about the task referenced by the handle passed using * the xTask parameter. * * @param xGetFreeStackSpace The TaskStatus_t structure contains a member to report * the stack high water mark of the task being queried. Calculating the stack * high water mark takes a relatively long time, and can make the system * temporarily unresponsive - so the xGetFreeStackSpace parameter is provided to * allow the high water mark checking to be skipped. The high watermark value * will only be written to the TaskStatus_t structure if xGetFreeStackSpace is * not set to pdFALSE; * * @param eState The TaskStatus_t structure contains a member to report the * state of the task being queried. Obtaining the task state is not as fast as * a simple assignment - so the eState parameter is provided to allow the state * information to be omitted from the TaskStatus_t structure. To obtain state * information then set eState to eInvalid - otherwise the value passed in * eState will be reported as the task state in the TaskStatus_t structure. * * Example usage: * @code{c} * void vAFunction( void ) * { * TaskHandle_t xHandle; * TaskStatus_t xTaskDetails; * * // Obtain the handle of a task from its name. * xHandle = xTaskGetHandle( "Task_Name" ); * * // Check the handle is not NULL. * configASSERT( xHandle ); * * // Use the handle to obtain further information about the task. * vTaskGetInfo( xHandle, * &xTaskDetails, * pdTRUE, // Include the high water mark in xTaskDetails. * eInvalid ); // Include the task state in xTaskDetails. * } * @endcode * \defgroup vTaskGetInfo vTaskGetInfo * \ingroup TaskCtrl */ void vTaskGetInfo( TaskHandle_t xTask, TaskStatus_t * pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState ) ; /** * task. h * @code{c} * void vTaskPrioritySet( TaskHandle_t xTask, UBaseType_t uxNewPriority ); * @endcode * * INCLUDE_vTaskPrioritySet must be defined as 1 for this function to be available. * See the configuration section for more information. * * Set the priority of any task. * * A context switch will occur before the function returns if the priority * being set is higher than the currently executing task. * * @param xTask Handle to the task for which the priority is being set. * Passing a NULL handle results in the priority of the calling task being set. * * @param uxNewPriority The priority to which the task will be set. * * Example usage: * @code{c} * void vAFunction( void ) * { * TaskHandle_t xHandle; * * // Create a task, storing the handle. * xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); * * // ... * * // Use the handle to raise the priority of the created task. * vTaskPrioritySet( xHandle, tskIDLE_PRIORITY + 1 ); * * // ... * * // Use a NULL handle to raise our priority to the same value. * vTaskPrioritySet( NULL, tskIDLE_PRIORITY + 1 ); * } * @endcode * \defgroup vTaskPrioritySet vTaskPrioritySet * \ingroup TaskCtrl */ void vTaskPrioritySet( TaskHandle_t xTask, UBaseType_t uxNewPriority ) ; /** * task. h * @code{c} * void vTaskSuspend( TaskHandle_t xTaskToSuspend ); * @endcode * * INCLUDE_vTaskSuspend must be defined as 1 for this function to be available. * See the configuration section for more information. * * Suspend any task. When suspended a task will never get any microcontroller * processing time, no matter what its priority. * * Calls to vTaskSuspend are not accumulative - * i.e. calling vTaskSuspend () twice on the same task still only requires one * call to vTaskResume () to ready the suspended task. * * @param xTaskToSuspend Handle to the task being suspended. Passing a NULL * handle will cause the calling task to be suspended. * * Example usage: * @code{c} * void vAFunction( void ) * { * TaskHandle_t xHandle; * * // Create a task, storing the handle. * xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); * * // ... * * // Use the handle to suspend the created task. * vTaskSuspend( xHandle ); * * // ... * * // The created task will not run during this period, unless * // another task calls vTaskResume( xHandle ). * * //... * * * // Suspend ourselves. * vTaskSuspend( NULL ); * * // We cannot get here unless another task calls vTaskResume * // with our handle as the parameter. * } * @endcode * \defgroup vTaskSuspend vTaskSuspend * \ingroup TaskCtrl */ void vTaskSuspend( TaskHandle_t xTaskToSuspend ) ; /** * task. h * @code{c} * void vTaskResume( TaskHandle_t xTaskToResume ); * @endcode * * INCLUDE_vTaskSuspend must be defined as 1 for this function to be available. * See the configuration section for more information. * * Resumes a suspended task. * * A task that has been suspended by one or more calls to vTaskSuspend () * will be made available for running again by a single call to * vTaskResume (). * * @param xTaskToResume Handle to the task being readied. * * Example usage: * @code{c} * void vAFunction( void ) * { * TaskHandle_t xHandle; * * // Create a task, storing the handle. * xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); * * // ... * * // Use the handle to suspend the created task. * vTaskSuspend( xHandle ); * * // ... * * // The created task will not run during this period, unless * // another task calls vTaskResume( xHandle ). * * //... * * * // Resume the suspended task ourselves. * vTaskResume( xHandle ); * * // The created task will once again get microcontroller processing * // time in accordance with its priority within the system. * } * @endcode * \defgroup vTaskResume vTaskResume * \ingroup TaskCtrl */ void vTaskResume( TaskHandle_t xTaskToResume ) ; /** * task. h * @code{c} * void xTaskResumeFromISR( TaskHandle_t xTaskToResume ); * @endcode * * INCLUDE_xTaskResumeFromISR must be defined as 1 for this function to be * available. See the configuration section for more information. * * An implementation of vTaskResume() that can be called from within an ISR. * * A task that has been suspended by one or more calls to vTaskSuspend () * will be made available for running again by a single call to * xTaskResumeFromISR (). * * xTaskResumeFromISR() should not be used to synchronise a task with an * interrupt if there is a chance that the interrupt could arrive prior to the * task being suspended - as this can lead to interrupts being missed. Use of a * semaphore as a synchronisation mechanism would avoid this eventuality. * * @param xTaskToResume Handle to the task being readied. * * @return pdTRUE if resuming the task should result in a context switch, * otherwise pdFALSE. This is used by the ISR to determine if a context switch * may be required following the ISR. * * \defgroup vTaskResumeFromISR vTaskResumeFromISR * \ingroup TaskCtrl */ BaseType_t xTaskResumeFromISR( TaskHandle_t xTaskToResume ) ; /*----------------------------------------------------------- * SCHEDULER CONTROL *----------------------------------------------------------*/ /** * task. h * @code{c} * void vTaskStartScheduler( void ); * @endcode * * Starts the real time kernel tick processing. After calling the kernel * has control over which tasks are executed and when. * * See the demo application file main.c for an example of creating * tasks and starting the kernel. * * Example usage: * @code{c} * void vAFunction( void ) * { * // Create at least one task before starting the kernel. * xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); * * // Start the real time kernel with preemption. * vTaskStartScheduler (); * * // Will not get here unless a task calls vTaskEndScheduler () * } * @endcode * * \defgroup vTaskStartScheduler vTaskStartScheduler * \ingroup SchedulerControl */ void vTaskStartScheduler( void ) ; /** * task. h * @code{c} * void vTaskEndScheduler( void ); * @endcode * * NOTE: At the time of writing only the x86 real mode port, which runs on a PC * in place of DOS, implements this function. * * Stops the real time kernel tick. All created tasks will be automatically * deleted and multitasking (either preemptive or cooperative) will * stop. Execution then resumes from the point where vTaskStartScheduler () * was called, as if vTaskStartScheduler () had just returned. * * See the demo application file main. c in the demo/PC directory for an * example that uses vTaskEndScheduler (). * * vTaskEndScheduler () requires an exit function to be defined within the * portable layer (see vPortEndScheduler () in port. c for the PC port). This * performs hardware specific operations such as stopping the kernel tick. * * vTaskEndScheduler () will cause all of the resources allocated by the * kernel to be freed - but will not free resources allocated by application * tasks. * * Example usage: * @code{c} * void vTaskCode( void * pvParameters ) * { * for( ;; ) * { * // Task code goes here. * * // At some point we want to end the real time kernel processing * // so call ... * vTaskEndScheduler (); * } * } * * void vAFunction( void ) * { * // Create at least one task before starting the kernel. * xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); * * // Start the real time kernel with preemption. * vTaskStartScheduler (); * * // Will only get here when the vTaskCode () task has called * // vTaskEndScheduler (). When we get here we are back to single task * // execution. * } * @endcode * * \defgroup vTaskEndScheduler vTaskEndScheduler * \ingroup SchedulerControl */ void vTaskEndScheduler( void ) ; /** * task. h * @code{c} * void vTaskSuspendAll( void ); * @endcode * * Suspends the scheduler without disabling interrupts. Context switches will * not occur while the scheduler is suspended. * * After calling vTaskSuspendAll () the calling task will continue to execute * without risk of being swapped out until a call to xTaskResumeAll () has been * made. * * API functions that have the potential to cause a context switch (for example, * xTaskDelayUntil(), xQueueSend(), etc.) must not be called while the scheduler * is suspended. * * Example usage: * @code{c} * void vTask1( void * pvParameters ) * { * for( ;; ) * { * // Task code goes here. * * // ... * * // At some point the task wants to perform a long operation during * // which it does not want to get swapped out. It cannot use * // taskENTER_CRITICAL ()/taskEXIT_CRITICAL () as the length of the * // operation may cause interrupts to be missed - including the * // ticks. * * // Prevent the real time kernel swapping out the task. * vTaskSuspendAll (); * * // Perform the operation here. There is no need to use critical * // sections as we have all the microcontroller processing time. * // During this time interrupts will still operate and the kernel * // tick count will be maintained. * * // ... * * // The operation is complete. Restart the kernel. * xTaskResumeAll (); * } * } * @endcode * \defgroup vTaskSuspendAll vTaskSuspendAll * \ingroup SchedulerControl */ void vTaskSuspendAll( void ) ; /** * task. h * @code{c} * BaseType_t xTaskResumeAll( void ); * @endcode * * Resumes scheduler activity after it was suspended by a call to * vTaskSuspendAll(). * * xTaskResumeAll() only resumes the scheduler. It does not unsuspend tasks * that were previously suspended by a call to vTaskSuspend(). * * @return If resuming the scheduler caused a context switch then pdTRUE is * returned, otherwise pdFALSE is returned. * * Example usage: * @code{c} * void vTask1( void * pvParameters ) * { * for( ;; ) * { * // Task code goes here. * * // ... * * // At some point the task wants to perform a long operation during * // which it does not want to get swapped out. It cannot use * // taskENTER_CRITICAL ()/taskEXIT_CRITICAL () as the length of the * // operation may cause interrupts to be missed - including the * // ticks. * * // Prevent the real time kernel swapping out the task. * vTaskSuspendAll (); * * // Perform the operation here. There is no need to use critical * // sections as we have all the microcontroller processing time. * // During this time interrupts will still operate and the real * // time kernel tick count will be maintained. * * // ... * * // The operation is complete. Restart the kernel. We want to force * // a context switch - but there is no point if resuming the scheduler * // caused a context switch already. * if( !xTaskResumeAll () ) * { * taskYIELD (); * } * } * } * @endcode * \defgroup xTaskResumeAll xTaskResumeAll * \ingroup SchedulerControl */ BaseType_t xTaskResumeAll( void ) ; /*----------------------------------------------------------- * TASK UTILITIES *----------------------------------------------------------*/ /** * task. h * @code{c} * TickType_t xTaskGetTickCount( void ); * @endcode * * @return The count of ticks since vTaskStartScheduler was called. * * \defgroup xTaskGetTickCount xTaskGetTickCount * \ingroup TaskUtils */ TickType_t xTaskGetTickCount( void ) ; /** * task. h * @code{c} * TickType_t xTaskGetTickCountFromISR( void ); * @endcode * * @return The count of ticks since vTaskStartScheduler was called. * * This is a version of xTaskGetTickCount() that is safe to be called from an * ISR - provided that TickType_t is the natural word size of the * microcontroller being used or interrupt nesting is either not supported or * not being used. * * \defgroup xTaskGetTickCountFromISR xTaskGetTickCountFromISR * \ingroup TaskUtils */ TickType_t xTaskGetTickCountFromISR( void ) ; /** * task. h * @code{c} * uint16_t uxTaskGetNumberOfTasks( void ); * @endcode * * @return The number of tasks that the real time kernel is currently managing. * This includes all ready, blocked and suspended tasks. A task that * has been deleted but not yet freed by the idle task will also be * included in the count. * * \defgroup uxTaskGetNumberOfTasks uxTaskGetNumberOfTasks * \ingroup TaskUtils */ UBaseType_t uxTaskGetNumberOfTasks( void ) ; /** * task. h * @code{c} * char *pcTaskGetName( TaskHandle_t xTaskToQuery ); * @endcode * * @return The text (human readable) name of the task referenced by the handle * xTaskToQuery. A task can query its own name by either passing in its own * handle, or by setting xTaskToQuery to NULL. * * \defgroup pcTaskGetName pcTaskGetName * \ingroup TaskUtils */ char * pcTaskGetName( TaskHandle_t xTaskToQuery ) ; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ /** * task. h * @code{c} * TaskHandle_t xTaskGetHandle( const char *pcNameToQuery ); * @endcode * * NOTE: This function takes a relatively long time to complete and should be * used sparingly. * * @return The handle of the task that has the human readable name pcNameToQuery. * NULL is returned if no matching name is found. INCLUDE_xTaskGetHandle * must be set to 1 in FreeRTOSConfig.h for pcTaskGetHandle() to be available. * * \defgroup pcTaskGetHandle pcTaskGetHandle * \ingroup TaskUtils */ TaskHandle_t xTaskGetHandle( const char * pcNameToQuery ) ; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ /** * task.h * @code{c} * UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask ); * @endcode * * INCLUDE_uxTaskGetStackHighWaterMark must be set to 1 in FreeRTOSConfig.h for * this function to be available. * * Returns the high water mark of the stack associated with xTask. That is, * the minimum free stack space there has been (in words, so on a 32 bit machine * a value of 1 means 4 bytes) since the task started. The smaller the returned * number the closer the task has come to overflowing its stack. * * uxTaskGetStackHighWaterMark() and uxTaskGetStackHighWaterMark2() are the * same except for their return type. Using configSTACK_DEPTH_TYPE allows the * user to determine the return type. It gets around the problem of the value * overflowing on 8-bit types without breaking backward compatibility for * applications that expect an 8-bit return type. * * @param xTask Handle of the task associated with the stack to be checked. * Set xTask to NULL to check the stack of the calling task. * * @return The smallest amount of free stack space there has been (in words, so * actual spaces on the stack rather than bytes) since the task referenced by * xTask was created. */ UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) ; /** * task.h * @code{c} * configSTACK_DEPTH_TYPE uxTaskGetStackHighWaterMark2( TaskHandle_t xTask ); * @endcode * * INCLUDE_uxTaskGetStackHighWaterMark2 must be set to 1 in FreeRTOSConfig.h for * this function to be available. * * Returns the high water mark of the stack associated with xTask. That is, * the minimum free stack space there has been (in words, so on a 32 bit machine * a value of 1 means 4 bytes) since the task started. The smaller the returned * number the closer the task has come to overflowing its stack. * * uxTaskGetStackHighWaterMark() and uxTaskGetStackHighWaterMark2() are the * same except for their return type. Using configSTACK_DEPTH_TYPE allows the * user to determine the return type. It gets around the problem of the value * overflowing on 8-bit types without breaking backward compatibility for * applications that expect an 8-bit return type. * * @param xTask Handle of the task associated with the stack to be checked. * Set xTask to NULL to check the stack of the calling task. * * @return The smallest amount of free stack space there has been (in words, so * actual spaces on the stack rather than bytes) since the task referenced by * xTask was created. */ uint16_t uxTaskGetStackHighWaterMark2( TaskHandle_t xTask ) ; /* When using trace macros it is sometimes necessary to include task.h before * FreeRTOS.h. When this is done TaskHookFunction_t will not yet have been defined, * so the following two prototypes will cause a compilation error. This can be * fixed by simply guarding against the inclusion of these two prototypes unless * they are explicitly required by the configUSE_APPLICATION_TASK_TAG configuration * constant. */ /** * task.h * @code{c} * void vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxHookFunction ); * @endcode * * Sets pxHookFunction to be the task hook function used by the task xTask. * Passing xTask as NULL has the effect of setting the calling tasks hook * function. */ void vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxHookFunction ) ; /** * task.h * @code{c} * void xTaskGetApplicationTaskTag( TaskHandle_t xTask ); * @endcode * * Returns the pxHookFunction value assigned to the task xTask. Do not * call from an interrupt service routine - call * xTaskGetApplicationTaskTagFromISR() instead. */ TaskHookFunction_t xTaskGetApplicationTaskTag( TaskHandle_t xTask ) ; /** * task.h * @code{c} * void xTaskGetApplicationTaskTagFromISR( TaskHandle_t xTask ); * @endcode * * Returns the pxHookFunction value assigned to the task xTask. Can * be called from an interrupt service routine. */ TaskHookFunction_t xTaskGetApplicationTaskTagFromISR( TaskHandle_t xTask ) ; /* Each task contains an array of pointers that is dimensioned by the * configNUM_THREAD_LOCAL_STORAGE_POINTERS setting in FreeRTOSConfig.h. The * kernel does not use the pointers itself, so the application writer can use * the pointers for any purpose they wish. The following two functions are * used to set and query a pointer respectively. */ void vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, BaseType_t xIndex, void * pvValue ) ; void * pvTaskGetThreadLocalStoragePointer( TaskHandle_t xTaskToQuery, BaseType_t xIndex ) ; /** * task.h * @code{c} * void vApplicationStackOverflowHook( TaskHandle_t xTask char *pcTaskName); * @endcode * * The application stack overflow hook is called when a stack overflow is detected for a task. * * Details on stack overflow detection can be found here: https://www.FreeRTOS.org/Stacks-and-stack-overflow-checking.html * * @param xTask the task that just exceeded its stack boundaries. * @param pcTaskName A character string containing the name of the offending task. */ void vApplicationStackOverflowHook( TaskHandle_t xTask, char * pcTaskName ); # 1668 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source/third_party/freertos/include\\task.h" /** * task.h * @code{c} * void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize ) * @endcode * * This function is used to provide a statically allocated block of memory to FreeRTOS to hold the Idle Task TCB. This function is required when * configSUPPORT_STATIC_ALLOCATION is set. For more information see this URI: https://www.FreeRTOS.org/a00110.html#configSUPPORT_STATIC_ALLOCATION * * @param ppxIdleTaskTCBBuffer A handle to a statically allocated TCB buffer * @param ppxIdleTaskStackBuffer A handle to a statically allocated Stack buffer for the idle task * @param pulIdleTaskStackSize A pointer to the number of elements that will fit in the allocated stack buffer */ void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, uint32_t * pulIdleTaskStackSize ); /*lint !e526 Symbol not defined as it is an application callback. */ /** * task.h * @code{c} * BaseType_t xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter ); * @endcode * * Calls the hook function associated with xTask. Passing xTask as NULL has * the effect of calling the Running tasks (the calling task) hook function. * * pvParameter is passed to the hook function for the task to interpret as it * wants. The return value is the value returned by the task hook function * registered by the user. */ BaseType_t xTaskCallApplicationTaskHook( TaskHandle_t xTask, void * pvParameter ) ; /** * xTaskGetIdleTaskHandle() is only available if * INCLUDE_xTaskGetIdleTaskHandle is set to 1 in FreeRTOSConfig.h. * * Simply returns the handle of the idle task. It is not valid to call * xTaskGetIdleTaskHandle() before the scheduler has been started. */ TaskHandle_t xTaskGetIdleTaskHandle( void ) ; /** * configUSE_TRACE_FACILITY must be defined as 1 in FreeRTOSConfig.h for * uxTaskGetSystemState() to be available. * * uxTaskGetSystemState() populates an TaskStatus_t structure for each task in * the system. TaskStatus_t structures contain, among other things, members * for the task handle, task name, task priority, task state, and total amount * of run time consumed by the task. See the TaskStatus_t structure * definition in this file for the full member list. * * NOTE: This function is intended for debugging use only as its use results in * the scheduler remaining suspended for an extended period. * * @param pxTaskStatusArray A pointer to an array of TaskStatus_t structures. * The array must contain at least one TaskStatus_t structure for each task * that is under the control of the RTOS. The number of tasks under the control * of the RTOS can be determined using the uxTaskGetNumberOfTasks() API function. * * @param uxArraySize The size of the array pointed to by the pxTaskStatusArray * parameter. The size is specified as the number of indexes in the array, or * the number of TaskStatus_t structures contained in the array, not by the * number of bytes in the array. * * @param pulTotalRunTime If configGENERATE_RUN_TIME_STATS is set to 1 in * FreeRTOSConfig.h then *pulTotalRunTime is set by uxTaskGetSystemState() to the * total run time (as defined by the run time stats clock, see * https://www.FreeRTOS.org/rtos-run-time-stats.html) since the target booted. * pulTotalRunTime can be set to NULL to omit the total run time information. * * @return The number of TaskStatus_t structures that were populated by * uxTaskGetSystemState(). This should equal the number returned by the * uxTaskGetNumberOfTasks() API function, but will be zero if the value passed * in the uxArraySize parameter was too small. * * Example usage: * @code{c} * // This example demonstrates how a human readable table of run time stats * // information is generated from raw data provided by uxTaskGetSystemState(). * // The human readable table is written to pcWriteBuffer * void vTaskGetRunTimeStats( char *pcWriteBuffer ) * { * TaskStatus_t *pxTaskStatusArray; * volatile UBaseType_t uxArraySize, x; * configRUN_TIME_COUNTER_TYPE ulTotalRunTime, ulStatsAsPercentage; * * // Make sure the write buffer does not contain a string. * pcWriteBuffer = 0x00; * * // Take a snapshot of the number of tasks in case it changes while this * // function is executing. * uxArraySize = uxTaskGetNumberOfTasks(); * * // Allocate a TaskStatus_t structure for each task. An array could be * // allocated statically at compile time. * pxTaskStatusArray = pvPortMalloc( uxArraySize * sizeof( TaskStatus_t ) ); * * if( pxTaskStatusArray != NULL ) * { * // Generate raw status information about each task. * uxArraySize = uxTaskGetSystemState( pxTaskStatusArray, uxArraySize, &ulTotalRunTime ); * * // For percentage calculations. * ulTotalRunTime /= 100UL; * * // Avoid divide by zero errors. * if( ulTotalRunTime > 0 ) * { * // For each populated position in the pxTaskStatusArray array, * // format the raw data as human readable ASCII data * for( x = 0; x < uxArraySize; x++ ) * { * // What percentage of the total run time has the task used? * // This will always be rounded down to the nearest integer. * // ulTotalRunTimeDiv100 has already been divided by 100. * ulStatsAsPercentage = pxTaskStatusArray[ x ].ulRunTimeCounter / ulTotalRunTime; * * if( ulStatsAsPercentage > 0UL ) * { * sprintf( pcWriteBuffer, "%s\t\t%lu\t\t%lu%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter, ulStatsAsPercentage ); * } * else * { * // If the percentage is zero here then the task has * // consumed less than 1% of the total run time. * sprintf( pcWriteBuffer, "%s\t\t%lu\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter ); * } * * pcWriteBuffer += strlen( ( char * ) pcWriteBuffer ); * } * } * * // The array is no longer needed, free the memory it consumes. * vPortFree( pxTaskStatusArray ); * } * } * @endcode */ UBaseType_t uxTaskGetSystemState( TaskStatus_t * const pxTaskStatusArray, const UBaseType_t uxArraySize, uint32_t * const pulTotalRunTime ) ; /** * task. h * @code{c} * void vTaskList( char *pcWriteBuffer ); * @endcode * * configUSE_TRACE_FACILITY and configUSE_STATS_FORMATTING_FUNCTIONS must * both be defined as 1 for this function to be available. See the * configuration section of the FreeRTOS.org website for more information. * * NOTE 1: This function will disable interrupts for its duration. It is * not intended for normal application runtime use but as a debug aid. * * Lists all the current tasks, along with their current state and stack * usage high water mark. * * Tasks are reported as blocked ('B'), ready ('R'), deleted ('D') or * suspended ('S'). * * PLEASE NOTE: * * This function is provided for convenience only, and is used by many of the * demo applications. Do not consider it to be part of the scheduler. * * vTaskList() calls uxTaskGetSystemState(), then formats part of the * uxTaskGetSystemState() output into a human readable table that displays task: * names, states, priority, stack usage and task number. * Stack usage specified as the number of unused StackType_t words stack can hold * on top of stack - not the number of bytes. * * vTaskList() has a dependency on the sprintf() C library function that might * bloat the code size, use a lot of stack, and provide different results on * different platforms. An alternative, tiny, third party, and limited * functionality implementation of sprintf() is provided in many of the * FreeRTOS/Demo sub-directories in a file called printf-stdarg.c (note * printf-stdarg.c does not provide a full snprintf() implementation!). * * It is recommended that production systems call uxTaskGetSystemState() * directly to get access to raw stats data, rather than indirectly through a * call to vTaskList(). * * @param pcWriteBuffer A buffer into which the above mentioned details * will be written, in ASCII form. This buffer is assumed to be large * enough to contain the generated report. Approximately 40 bytes per * task should be sufficient. * * \defgroup vTaskList vTaskList * \ingroup TaskUtils */ void vTaskList( char * pcWriteBuffer ) ; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ /** * task. h * @code{c} * void vTaskGetRunTimeStats( char *pcWriteBuffer ); * @endcode * * configGENERATE_RUN_TIME_STATS and configUSE_STATS_FORMATTING_FUNCTIONS * must both be defined as 1 for this function to be available. The application * must also then provide definitions for * portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() and portGET_RUN_TIME_COUNTER_VALUE() * to configure a peripheral timer/counter and return the timers current count * value respectively. The counter should be at least 10 times the frequency of * the tick count. * * NOTE 1: This function will disable interrupts for its duration. It is * not intended for normal application runtime use but as a debug aid. * * Setting configGENERATE_RUN_TIME_STATS to 1 will result in a total * accumulated execution time being stored for each task. The resolution * of the accumulated time value depends on the frequency of the timer * configured by the portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() macro. * Calling vTaskGetRunTimeStats() writes the total execution time of each * task into a buffer, both as an absolute count value and as a percentage * of the total system execution time. * * NOTE 2: * * This function is provided for convenience only, and is used by many of the * demo applications. Do not consider it to be part of the scheduler. * * vTaskGetRunTimeStats() calls uxTaskGetSystemState(), then formats part of the * uxTaskGetSystemState() output into a human readable table that displays the * amount of time each task has spent in the Running state in both absolute and * percentage terms. * * vTaskGetRunTimeStats() has a dependency on the sprintf() C library function * that might bloat the code size, use a lot of stack, and provide different * results on different platforms. An alternative, tiny, third party, and * limited functionality implementation of sprintf() is provided in many of the * FreeRTOS/Demo sub-directories in a file called printf-stdarg.c (note * printf-stdarg.c does not provide a full snprintf() implementation!). * * It is recommended that production systems call uxTaskGetSystemState() directly * to get access to raw stats data, rather than indirectly through a call to * vTaskGetRunTimeStats(). * * @param pcWriteBuffer A buffer into which the execution times will be * written, in ASCII form. This buffer is assumed to be large enough to * contain the generated report. Approximately 40 bytes per task should * be sufficient. * * \defgroup vTaskGetRunTimeStats vTaskGetRunTimeStats * \ingroup TaskUtils */ void vTaskGetRunTimeStats( char * pcWriteBuffer ) ; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ /** * task. h * @code{c} * configRUN_TIME_COUNTER_TYPE ulTaskGetIdleRunTimeCounter( void ); * configRUN_TIME_COUNTER_TYPE ulTaskGetIdleRunTimePercent( void ); * @endcode * * configGENERATE_RUN_TIME_STATS, configUSE_STATS_FORMATTING_FUNCTIONS and * INCLUDE_xTaskGetIdleTaskHandle must all be defined as 1 for these functions * to be available. The application must also then provide definitions for * portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() and portGET_RUN_TIME_COUNTER_VALUE() * to configure a peripheral timer/counter and return the timers current count * value respectively. The counter should be at least 10 times the frequency of * the tick count. * * Setting configGENERATE_RUN_TIME_STATS to 1 will result in a total * accumulated execution time being stored for each task. The resolution * of the accumulated time value depends on the frequency of the timer * configured by the portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() macro. * While uxTaskGetSystemState() and vTaskGetRunTimeStats() writes the total * execution time of each task into a buffer, ulTaskGetIdleRunTimeCounter() * returns the total execution time of just the idle task and * ulTaskGetIdleRunTimePercent() returns the percentage of the CPU time used by * just the idle task. * * Note the amount of idle time is only a good measure of the slack time in a * system if there are no other tasks executing at the idle priority, tickless * idle is not used, and configIDLE_SHOULD_YIELD is set to 0. * * @return The total run time of the idle task or the percentage of the total * run time consumed by the idle task. This is the amount of time the * idle task has actually been executing. The unit of time is dependent on the * frequency configured using the portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() and * portGET_RUN_TIME_COUNTER_VALUE() macros. * * \defgroup ulTaskGetIdleRunTimeCounter ulTaskGetIdleRunTimeCounter * \ingroup TaskUtils */ uint32_t ulTaskGetIdleRunTimeCounter( void ) ; uint32_t ulTaskGetIdleRunTimePercent( void ) ; /** * task. h * @code{c} * BaseType_t xTaskNotifyIndexed( TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction ); * BaseType_t xTaskNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction ); * @endcode * * See https://www.FreeRTOS.org/RTOS-task-notifications.html for details. * * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for these * functions to be available. * * Sends a direct to task notification to a task, with an optional value and * action. * * Each task has a private array of "notification values" (or 'notifications'), * each of which is a 32-bit unsigned integer (uint32_t). The constant * configTASK_NOTIFICATION_ARRAY_ENTRIES sets the number of indexes in the * array, and (for backward compatibility) defaults to 1 if left undefined. * Prior to FreeRTOS V10.4.0 there was only one notification value per task. * * Events can be sent to a task using an intermediary object. Examples of such * objects are queues, semaphores, mutexes and event groups. Task notifications * are a method of sending an event directly to a task without the need for such * an intermediary object. * * A notification sent to a task can optionally perform an action, such as * update, overwrite or increment one of the task's notification values. In * that way task notifications can be used to send data to a task, or be used as * light weight and fast binary or counting semaphores. * * A task can use xTaskNotifyWaitIndexed() or ulTaskNotifyTakeIndexed() to * [optionally] block to wait for a notification to be pending. The task does * not consume any CPU time while it is in the Blocked state. * * A notification sent to a task will remain pending until it is cleared by the * task calling xTaskNotifyWaitIndexed() or ulTaskNotifyTakeIndexed() (or their * un-indexed equivalents). If the task was already in the Blocked state to * wait for a notification when the notification arrives then the task will * automatically be removed from the Blocked state (unblocked) and the * notification cleared. * * **NOTE** Each notification within the array operates independently - a task * can only block on one notification within the array at a time and will not be * unblocked by a notification sent to any other array index. * * Backward compatibility information: * Prior to FreeRTOS V10.4.0 each task had a single "notification value", and * all task notification API functions operated on that value. Replacing the * single notification value with an array of notification values necessitated a * new set of API functions that could address specific notifications within the * array. xTaskNotify() is the original API function, and remains backward * compatible by always operating on the notification value at index 0 in the * array. Calling xTaskNotify() is equivalent to calling xTaskNotifyIndexed() * with the uxIndexToNotify parameter set to 0. * * @param xTaskToNotify The handle of the task being notified. The handle to a * task can be returned from the xTaskCreate() API function used to create the * task, and the handle of the currently running task can be obtained by calling * xTaskGetCurrentTaskHandle(). * * @param uxIndexToNotify The index within the target task's array of * notification values to which the notification is to be sent. uxIndexToNotify * must be less than configTASK_NOTIFICATION_ARRAY_ENTRIES. xTaskNotify() does * not have this parameter and always sends notifications to index 0. * * @param ulValue Data that can be sent with the notification. How the data is * used depends on the value of the eAction parameter. * * @param eAction Specifies how the notification updates the task's notification * value, if at all. Valid values for eAction are as follows: * * eSetBits - * The target notification value is bitwise ORed with ulValue. * xTaskNotifyIndexed() always returns pdPASS in this case. * * eIncrement - * The target notification value is incremented. ulValue is not used and * xTaskNotifyIndexed() always returns pdPASS in this case. * * eSetValueWithOverwrite - * The target notification value is set to the value of ulValue, even if the * task being notified had not yet processed the previous notification at the * same array index (the task already had a notification pending at that index). * xTaskNotifyIndexed() always returns pdPASS in this case. * * eSetValueWithoutOverwrite - * If the task being notified did not already have a notification pending at the * same array index then the target notification value is set to ulValue and * xTaskNotifyIndexed() will return pdPASS. If the task being notified already * had a notification pending at the same array index then no action is * performed and pdFAIL is returned. * * eNoAction - * The task receives a notification at the specified array index without the * notification value at that index being updated. ulValue is not used and * xTaskNotifyIndexed() always returns pdPASS in this case. * * pulPreviousNotificationValue - * Can be used to pass out the subject task's notification value before any * bits are modified by the notify function. * * @return Dependent on the value of eAction. See the description of the * eAction parameter. * * \defgroup xTaskNotifyIndexed xTaskNotifyIndexed * \ingroup TaskNotifications */ BaseType_t xTaskGenericNotify( TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t * pulPreviousNotificationValue ) ; /** * task. h * @code{c} * BaseType_t xTaskNotifyAndQueryIndexed( TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotifyValue ); * BaseType_t xTaskNotifyAndQuery( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotifyValue ); * @endcode * * See https://www.FreeRTOS.org/RTOS-task-notifications.html for details. * * xTaskNotifyAndQueryIndexed() performs the same operation as * xTaskNotifyIndexed() with the addition that it also returns the subject * task's prior notification value (the notification value at the time the * function is called rather than when the function returns) in the additional * pulPreviousNotifyValue parameter. * * xTaskNotifyAndQuery() performs the same operation as xTaskNotify() with the * addition that it also returns the subject task's prior notification value * (the notification value as it was at the time the function is called, rather * than when the function returns) in the additional pulPreviousNotifyValue * parameter. * * \defgroup xTaskNotifyAndQueryIndexed xTaskNotifyAndQueryIndexed * \ingroup TaskNotifications */ /** * task. h * @code{c} * BaseType_t xTaskNotifyIndexedFromISR( TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, BaseType_t *pxHigherPriorityTaskWoken ); * BaseType_t xTaskNotifyFromISR( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, BaseType_t *pxHigherPriorityTaskWoken ); * @endcode * * See https://www.FreeRTOS.org/RTOS-task-notifications.html for details. * * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for these * functions to be available. * * A version of xTaskNotifyIndexed() that can be used from an interrupt service * routine (ISR). * * Each task has a private array of "notification values" (or 'notifications'), * each of which is a 32-bit unsigned integer (uint32_t). The constant * configTASK_NOTIFICATION_ARRAY_ENTRIES sets the number of indexes in the * array, and (for backward compatibility) defaults to 1 if left undefined. * Prior to FreeRTOS V10.4.0 there was only one notification value per task. * * Events can be sent to a task using an intermediary object. Examples of such * objects are queues, semaphores, mutexes and event groups. Task notifications * are a method of sending an event directly to a task without the need for such * an intermediary object. * * A notification sent to a task can optionally perform an action, such as * update, overwrite or increment one of the task's notification values. In * that way task notifications can be used to send data to a task, or be used as * light weight and fast binary or counting semaphores. * * A task can use xTaskNotifyWaitIndexed() to [optionally] block to wait for a * notification to be pending, or ulTaskNotifyTakeIndexed() to [optionally] block * to wait for a notification value to have a non-zero value. The task does * not consume any CPU time while it is in the Blocked state. * * A notification sent to a task will remain pending until it is cleared by the * task calling xTaskNotifyWaitIndexed() or ulTaskNotifyTakeIndexed() (or their * un-indexed equivalents). If the task was already in the Blocked state to * wait for a notification when the notification arrives then the task will * automatically be removed from the Blocked state (unblocked) and the * notification cleared. * * **NOTE** Each notification within the array operates independently - a task * can only block on one notification within the array at a time and will not be * unblocked by a notification sent to any other array index. * * Backward compatibility information: * Prior to FreeRTOS V10.4.0 each task had a single "notification value", and * all task notification API functions operated on that value. Replacing the * single notification value with an array of notification values necessitated a * new set of API functions that could address specific notifications within the * array. xTaskNotifyFromISR() is the original API function, and remains * backward compatible by always operating on the notification value at index 0 * within the array. Calling xTaskNotifyFromISR() is equivalent to calling * xTaskNotifyIndexedFromISR() with the uxIndexToNotify parameter set to 0. * * @param uxIndexToNotify The index within the target task's array of * notification values to which the notification is to be sent. uxIndexToNotify * must be less than configTASK_NOTIFICATION_ARRAY_ENTRIES. xTaskNotifyFromISR() * does not have this parameter and always sends notifications to index 0. * * @param xTaskToNotify The handle of the task being notified. The handle to a * task can be returned from the xTaskCreate() API function used to create the * task, and the handle of the currently running task can be obtained by calling * xTaskGetCurrentTaskHandle(). * * @param ulValue Data that can be sent with the notification. How the data is * used depends on the value of the eAction parameter. * * @param eAction Specifies how the notification updates the task's notification * value, if at all. Valid values for eAction are as follows: * * eSetBits - * The task's notification value is bitwise ORed with ulValue. xTaskNotify() * always returns pdPASS in this case. * * eIncrement - * The task's notification value is incremented. ulValue is not used and * xTaskNotify() always returns pdPASS in this case. * * eSetValueWithOverwrite - * The task's notification value is set to the value of ulValue, even if the * task being notified had not yet processed the previous notification (the * task already had a notification pending). xTaskNotify() always returns * pdPASS in this case. * * eSetValueWithoutOverwrite - * If the task being notified did not already have a notification pending then * the task's notification value is set to ulValue and xTaskNotify() will * return pdPASS. If the task being notified already had a notification * pending then no action is performed and pdFAIL is returned. * * eNoAction - * The task receives a notification without its notification value being * updated. ulValue is not used and xTaskNotify() always returns pdPASS in * this case. * * @param pxHigherPriorityTaskWoken xTaskNotifyFromISR() will set * *pxHigherPriorityTaskWoken to pdTRUE if sending the notification caused the * task to which the notification was sent to leave the Blocked state, and the * unblocked task has a priority higher than the currently running task. If * xTaskNotifyFromISR() sets this value to pdTRUE then a context switch should * be requested before the interrupt is exited. How a context switch is * requested from an ISR is dependent on the port - see the documentation page * for the port in use. * * @return Dependent on the value of eAction. See the description of the * eAction parameter. * * \defgroup xTaskNotifyIndexedFromISR xTaskNotifyIndexedFromISR * \ingroup TaskNotifications */ BaseType_t xTaskGenericNotifyFromISR( TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t * pulPreviousNotificationValue, BaseType_t * pxHigherPriorityTaskWoken ) ; /** * task. h * @code{c} * BaseType_t xTaskNotifyAndQueryIndexedFromISR( TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue, BaseType_t *pxHigherPriorityTaskWoken ); * BaseType_t xTaskNotifyAndQueryFromISR( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue, BaseType_t *pxHigherPriorityTaskWoken ); * @endcode * * See https://www.FreeRTOS.org/RTOS-task-notifications.html for details. * * xTaskNotifyAndQueryIndexedFromISR() performs the same operation as * xTaskNotifyIndexedFromISR() with the addition that it also returns the * subject task's prior notification value (the notification value at the time * the function is called rather than at the time the function returns) in the * additional pulPreviousNotifyValue parameter. * * xTaskNotifyAndQueryFromISR() performs the same operation as * xTaskNotifyFromISR() with the addition that it also returns the subject * task's prior notification value (the notification value at the time the * function is called rather than at the time the function returns) in the * additional pulPreviousNotifyValue parameter. * * \defgroup xTaskNotifyAndQueryIndexedFromISR xTaskNotifyAndQueryIndexedFromISR * \ingroup TaskNotifications */ /** * task. h * @code{c} * BaseType_t xTaskNotifyWaitIndexed( UBaseType_t uxIndexToWaitOn, uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait ); * * BaseType_t xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait ); * @endcode * * Waits for a direct to task notification to be pending at a given index within * an array of direct to task notifications. * * See https://www.FreeRTOS.org/RTOS-task-notifications.html for details. * * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this * function to be available. * * Each task has a private array of "notification values" (or 'notifications'), * each of which is a 32-bit unsigned integer (uint32_t). The constant * configTASK_NOTIFICATION_ARRAY_ENTRIES sets the number of indexes in the * array, and (for backward compatibility) defaults to 1 if left undefined. * Prior to FreeRTOS V10.4.0 there was only one notification value per task. * * Events can be sent to a task using an intermediary object. Examples of such * objects are queues, semaphores, mutexes and event groups. Task notifications * are a method of sending an event directly to a task without the need for such * an intermediary object. * * A notification sent to a task can optionally perform an action, such as * update, overwrite or increment one of the task's notification values. In * that way task notifications can be used to send data to a task, or be used as * light weight and fast binary or counting semaphores. * * A notification sent to a task will remain pending until it is cleared by the * task calling xTaskNotifyWaitIndexed() or ulTaskNotifyTakeIndexed() (or their * un-indexed equivalents). If the task was already in the Blocked state to * wait for a notification when the notification arrives then the task will * automatically be removed from the Blocked state (unblocked) and the * notification cleared. * * A task can use xTaskNotifyWaitIndexed() to [optionally] block to wait for a * notification to be pending, or ulTaskNotifyTakeIndexed() to [optionally] block * to wait for a notification value to have a non-zero value. The task does * not consume any CPU time while it is in the Blocked state. * * **NOTE** Each notification within the array operates independently - a task * can only block on one notification within the array at a time and will not be * unblocked by a notification sent to any other array index. * * Backward compatibility information: * Prior to FreeRTOS V10.4.0 each task had a single "notification value", and * all task notification API functions operated on that value. Replacing the * single notification value with an array of notification values necessitated a * new set of API functions that could address specific notifications within the * array. xTaskNotifyWait() is the original API function, and remains backward * compatible by always operating on the notification value at index 0 in the * array. Calling xTaskNotifyWait() is equivalent to calling * xTaskNotifyWaitIndexed() with the uxIndexToWaitOn parameter set to 0. * * @param uxIndexToWaitOn The index within the calling task's array of * notification values on which the calling task will wait for a notification to * be received. uxIndexToWaitOn must be less than * configTASK_NOTIFICATION_ARRAY_ENTRIES. xTaskNotifyWait() does * not have this parameter and always waits for notifications on index 0. * * @param ulBitsToClearOnEntry Bits that are set in ulBitsToClearOnEntry value * will be cleared in the calling task's notification value before the task * checks to see if any notifications are pending, and optionally blocks if no * notifications are pending. Setting ulBitsToClearOnEntry to ULONG_MAX (if * limits.h is included) or 0xffffffffUL (if limits.h is not included) will have * the effect of resetting the task's notification value to 0. Setting * ulBitsToClearOnEntry to 0 will leave the task's notification value unchanged. * * @param ulBitsToClearOnExit If a notification is pending or received before * the calling task exits the xTaskNotifyWait() function then the task's * notification value (see the xTaskNotify() API function) is passed out using * the pulNotificationValue parameter. Then any bits that are set in * ulBitsToClearOnExit will be cleared in the task's notification value (note * *pulNotificationValue is set before any bits are cleared). Setting * ulBitsToClearOnExit to ULONG_MAX (if limits.h is included) or 0xffffffffUL * (if limits.h is not included) will have the effect of resetting the task's * notification value to 0 before the function exits. Setting * ulBitsToClearOnExit to 0 will leave the task's notification value unchanged * when the function exits (in which case the value passed out in * pulNotificationValue will match the task's notification value). * * @param pulNotificationValue Used to pass the task's notification value out * of the function. Note the value passed out will not be effected by the * clearing of any bits caused by ulBitsToClearOnExit being non-zero. * * @param xTicksToWait The maximum amount of time that the task should wait in * the Blocked state for a notification to be received, should a notification * not already be pending when xTaskNotifyWait() was called. The task * will not consume any processing time while it is in the Blocked state. This * is specified in kernel ticks, the macro pdMS_TO_TICKS( value_in_ms ) can be * used to convert a time specified in milliseconds to a time specified in * ticks. * * @return If a notification was received (including notifications that were * already pending when xTaskNotifyWait was called) then pdPASS is * returned. Otherwise pdFAIL is returned. * * \defgroup xTaskNotifyWaitIndexed xTaskNotifyWaitIndexed * \ingroup TaskNotifications */ BaseType_t xTaskGenericNotifyWait( UBaseType_t uxIndexToWaitOn, uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t * pulNotificationValue, TickType_t xTicksToWait ) ; /** * task. h * @code{c} * BaseType_t xTaskNotifyGiveIndexed( TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify ); * BaseType_t xTaskNotifyGive( TaskHandle_t xTaskToNotify ); * @endcode * * Sends a direct to task notification to a particular index in the target * task's notification array in a manner similar to giving a counting semaphore. * * See https://www.FreeRTOS.org/RTOS-task-notifications.html for more details. * * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for these * macros to be available. * * Each task has a private array of "notification values" (or 'notifications'), * each of which is a 32-bit unsigned integer (uint32_t). The constant * configTASK_NOTIFICATION_ARRAY_ENTRIES sets the number of indexes in the * array, and (for backward compatibility) defaults to 1 if left undefined. * Prior to FreeRTOS V10.4.0 there was only one notification value per task. * * Events can be sent to a task using an intermediary object. Examples of such * objects are queues, semaphores, mutexes and event groups. Task notifications * are a method of sending an event directly to a task without the need for such * an intermediary object. * * A notification sent to a task can optionally perform an action, such as * update, overwrite or increment one of the task's notification values. In * that way task notifications can be used to send data to a task, or be used as * light weight and fast binary or counting semaphores. * * xTaskNotifyGiveIndexed() is a helper macro intended for use when task * notifications are used as light weight and faster binary or counting * semaphore equivalents. Actual FreeRTOS semaphores are given using the * xSemaphoreGive() API function, the equivalent action that instead uses a task * notification is xTaskNotifyGiveIndexed(). * * When task notifications are being used as a binary or counting semaphore * equivalent then the task being notified should wait for the notification * using the ulTaskNotifyTakeIndexed() API function rather than the * xTaskNotifyWaitIndexed() API function. * * **NOTE** Each notification within the array operates independently - a task * can only block on one notification within the array at a time and will not be * unblocked by a notification sent to any other array index. * * Backward compatibility information: * Prior to FreeRTOS V10.4.0 each task had a single "notification value", and * all task notification API functions operated on that value. Replacing the * single notification value with an array of notification values necessitated a * new set of API functions that could address specific notifications within the * array. xTaskNotifyGive() is the original API function, and remains backward * compatible by always operating on the notification value at index 0 in the * array. Calling xTaskNotifyGive() is equivalent to calling * xTaskNotifyGiveIndexed() with the uxIndexToNotify parameter set to 0. * * @param xTaskToNotify The handle of the task being notified. The handle to a * task can be returned from the xTaskCreate() API function used to create the * task, and the handle of the currently running task can be obtained by calling * xTaskGetCurrentTaskHandle(). * * @param uxIndexToNotify The index within the target task's array of * notification values to which the notification is to be sent. uxIndexToNotify * must be less than configTASK_NOTIFICATION_ARRAY_ENTRIES. xTaskNotifyGive() * does not have this parameter and always sends notifications to index 0. * * @return xTaskNotifyGive() is a macro that calls xTaskNotify() with the * eAction parameter set to eIncrement - so pdPASS is always returned. * * \defgroup xTaskNotifyGiveIndexed xTaskNotifyGiveIndexed * \ingroup TaskNotifications */ /** * task. h * @code{c} * void vTaskNotifyGiveIndexedFromISR( TaskHandle_t xTaskHandle, UBaseType_t uxIndexToNotify, BaseType_t *pxHigherPriorityTaskWoken ); * void vTaskNotifyGiveFromISR( TaskHandle_t xTaskHandle, BaseType_t *pxHigherPriorityTaskWoken ); * @endcode * * A version of xTaskNotifyGiveIndexed() that can be called from an interrupt * service routine (ISR). * * See https://www.FreeRTOS.org/RTOS-task-notifications.html for more details. * * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this macro * to be available. * * Each task has a private array of "notification values" (or 'notifications'), * each of which is a 32-bit unsigned integer (uint32_t). The constant * configTASK_NOTIFICATION_ARRAY_ENTRIES sets the number of indexes in the * array, and (for backward compatibility) defaults to 1 if left undefined. * Prior to FreeRTOS V10.4.0 there was only one notification value per task. * * Events can be sent to a task using an intermediary object. Examples of such * objects are queues, semaphores, mutexes and event groups. Task notifications * are a method of sending an event directly to a task without the need for such * an intermediary object. * * A notification sent to a task can optionally perform an action, such as * update, overwrite or increment one of the task's notification values. In * that way task notifications can be used to send data to a task, or be used as * light weight and fast binary or counting semaphores. * * vTaskNotifyGiveIndexedFromISR() is intended for use when task notifications * are used as light weight and faster binary or counting semaphore equivalents. * Actual FreeRTOS semaphores are given from an ISR using the * xSemaphoreGiveFromISR() API function, the equivalent action that instead uses * a task notification is vTaskNotifyGiveIndexedFromISR(). * * When task notifications are being used as a binary or counting semaphore * equivalent then the task being notified should wait for the notification * using the ulTaskNotifyTakeIndexed() API function rather than the * xTaskNotifyWaitIndexed() API function. * * **NOTE** Each notification within the array operates independently - a task * can only block on one notification within the array at a time and will not be * unblocked by a notification sent to any other array index. * * Backward compatibility information: * Prior to FreeRTOS V10.4.0 each task had a single "notification value", and * all task notification API functions operated on that value. Replacing the * single notification value with an array of notification values necessitated a * new set of API functions that could address specific notifications within the * array. xTaskNotifyFromISR() is the original API function, and remains * backward compatible by always operating on the notification value at index 0 * within the array. Calling xTaskNotifyGiveFromISR() is equivalent to calling * xTaskNotifyGiveIndexedFromISR() with the uxIndexToNotify parameter set to 0. * * @param xTaskToNotify The handle of the task being notified. The handle to a * task can be returned from the xTaskCreate() API function used to create the * task, and the handle of the currently running task can be obtained by calling * xTaskGetCurrentTaskHandle(). * * @param uxIndexToNotify The index within the target task's array of * notification values to which the notification is to be sent. uxIndexToNotify * must be less than configTASK_NOTIFICATION_ARRAY_ENTRIES. * xTaskNotifyGiveFromISR() does not have this parameter and always sends * notifications to index 0. * * @param pxHigherPriorityTaskWoken vTaskNotifyGiveFromISR() will set * *pxHigherPriorityTaskWoken to pdTRUE if sending the notification caused the * task to which the notification was sent to leave the Blocked state, and the * unblocked task has a priority higher than the currently running task. If * vTaskNotifyGiveFromISR() sets this value to pdTRUE then a context switch * should be requested before the interrupt is exited. How a context switch is * requested from an ISR is dependent on the port - see the documentation page * for the port in use. * * \defgroup vTaskNotifyGiveIndexedFromISR vTaskNotifyGiveIndexedFromISR * \ingroup TaskNotifications */ void vTaskGenericNotifyGiveFromISR( TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, BaseType_t * pxHigherPriorityTaskWoken ) ; /** * task. h * @code{c} * uint32_t ulTaskNotifyTakeIndexed( UBaseType_t uxIndexToWaitOn, BaseType_t xClearCountOnExit, TickType_t xTicksToWait ); * * uint32_t ulTaskNotifyTake( BaseType_t xClearCountOnExit, TickType_t xTicksToWait ); * @endcode * * Waits for a direct to task notification on a particular index in the calling * task's notification array in a manner similar to taking a counting semaphore. * * See https://www.FreeRTOS.org/RTOS-task-notifications.html for details. * * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this * function to be available. * * Each task has a private array of "notification values" (or 'notifications'), * each of which is a 32-bit unsigned integer (uint32_t). The constant * configTASK_NOTIFICATION_ARRAY_ENTRIES sets the number of indexes in the * array, and (for backward compatibility) defaults to 1 if left undefined. * Prior to FreeRTOS V10.4.0 there was only one notification value per task. * * Events can be sent to a task using an intermediary object. Examples of such * objects are queues, semaphores, mutexes and event groups. Task notifications * are a method of sending an event directly to a task without the need for such * an intermediary object. * * A notification sent to a task can optionally perform an action, such as * update, overwrite or increment one of the task's notification values. In * that way task notifications can be used to send data to a task, or be used as * light weight and fast binary or counting semaphores. * * ulTaskNotifyTakeIndexed() is intended for use when a task notification is * used as a faster and lighter weight binary or counting semaphore alternative. * Actual FreeRTOS semaphores are taken using the xSemaphoreTake() API function, * the equivalent action that instead uses a task notification is * ulTaskNotifyTakeIndexed(). * * When a task is using its notification value as a binary or counting semaphore * other tasks should send notifications to it using the xTaskNotifyGiveIndexed() * macro, or xTaskNotifyIndex() function with the eAction parameter set to * eIncrement. * * ulTaskNotifyTakeIndexed() can either clear the task's notification value at * the array index specified by the uxIndexToWaitOn parameter to zero on exit, * in which case the notification value acts like a binary semaphore, or * decrement the notification value on exit, in which case the notification * value acts like a counting semaphore. * * A task can use ulTaskNotifyTakeIndexed() to [optionally] block to wait for * a notification. The task does not consume any CPU time while it is in the * Blocked state. * * Where as xTaskNotifyWaitIndexed() will return when a notification is pending, * ulTaskNotifyTakeIndexed() will return when the task's notification value is * not zero. * * **NOTE** Each notification within the array operates independently - a task * can only block on one notification within the array at a time and will not be * unblocked by a notification sent to any other array index. * * Backward compatibility information: * Prior to FreeRTOS V10.4.0 each task had a single "notification value", and * all task notification API functions operated on that value. Replacing the * single notification value with an array of notification values necessitated a * new set of API functions that could address specific notifications within the * array. ulTaskNotifyTake() is the original API function, and remains backward * compatible by always operating on the notification value at index 0 in the * array. Calling ulTaskNotifyTake() is equivalent to calling * ulTaskNotifyTakeIndexed() with the uxIndexToWaitOn parameter set to 0. * * @param uxIndexToWaitOn The index within the calling task's array of * notification values on which the calling task will wait for a notification to * be non-zero. uxIndexToWaitOn must be less than * configTASK_NOTIFICATION_ARRAY_ENTRIES. xTaskNotifyTake() does * not have this parameter and always waits for notifications on index 0. * * @param xClearCountOnExit if xClearCountOnExit is pdFALSE then the task's * notification value is decremented when the function exits. In this way the * notification value acts like a counting semaphore. If xClearCountOnExit is * not pdFALSE then the task's notification value is cleared to zero when the * function exits. In this way the notification value acts like a binary * semaphore. * * @param xTicksToWait The maximum amount of time that the task should wait in * the Blocked state for the task's notification value to be greater than zero, * should the count not already be greater than zero when * ulTaskNotifyTake() was called. The task will not consume any processing * time while it is in the Blocked state. This is specified in kernel ticks, * the macro pdMS_TO_TICKS( value_in_ms ) can be used to convert a time * specified in milliseconds to a time specified in ticks. * * @return The task's notification count before it is either cleared to zero or * decremented (see the xClearCountOnExit parameter). * * \defgroup ulTaskNotifyTakeIndexed ulTaskNotifyTakeIndexed * \ingroup TaskNotifications */ uint32_t ulTaskGenericNotifyTake( UBaseType_t uxIndexToWaitOn, BaseType_t xClearCountOnExit, TickType_t xTicksToWait ) ; /** * task. h * @code{c} * BaseType_t xTaskNotifyStateClearIndexed( TaskHandle_t xTask, UBaseType_t uxIndexToCLear ); * * BaseType_t xTaskNotifyStateClear( TaskHandle_t xTask ); * @endcode * * See https://www.FreeRTOS.org/RTOS-task-notifications.html for details. * * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for these * functions to be available. * * Each task has a private array of "notification values" (or 'notifications'), * each of which is a 32-bit unsigned integer (uint32_t). The constant * configTASK_NOTIFICATION_ARRAY_ENTRIES sets the number of indexes in the * array, and (for backward compatibility) defaults to 1 if left undefined. * Prior to FreeRTOS V10.4.0 there was only one notification value per task. * * If a notification is sent to an index within the array of notifications then * the notification at that index is said to be 'pending' until it is read or * explicitly cleared by the receiving task. xTaskNotifyStateClearIndexed() * is the function that clears a pending notification without reading the * notification value. The notification value at the same array index is not * altered. Set xTask to NULL to clear the notification state of the calling * task. * * Backward compatibility information: * Prior to FreeRTOS V10.4.0 each task had a single "notification value", and * all task notification API functions operated on that value. Replacing the * single notification value with an array of notification values necessitated a * new set of API functions that could address specific notifications within the * array. xTaskNotifyStateClear() is the original API function, and remains * backward compatible by always operating on the notification value at index 0 * within the array. Calling xTaskNotifyStateClear() is equivalent to calling * xTaskNotifyStateClearIndexed() with the uxIndexToNotify parameter set to 0. * * @param xTask The handle of the RTOS task that will have a notification state * cleared. Set xTask to NULL to clear a notification state in the calling * task. To obtain a task's handle create the task using xTaskCreate() and * make use of the pxCreatedTask parameter, or create the task using * xTaskCreateStatic() and store the returned value, or use the task's name in * a call to xTaskGetHandle(). * * @param uxIndexToClear The index within the target task's array of * notification values to act upon. For example, setting uxIndexToClear to 1 * will clear the state of the notification at index 1 within the array. * uxIndexToClear must be less than configTASK_NOTIFICATION_ARRAY_ENTRIES. * ulTaskNotifyStateClear() does not have this parameter and always acts on the * notification at index 0. * * @return pdTRUE if the task's notification state was set to * eNotWaitingNotification, otherwise pdFALSE. * * \defgroup xTaskNotifyStateClearIndexed xTaskNotifyStateClearIndexed * \ingroup TaskNotifications */ BaseType_t xTaskGenericNotifyStateClear( TaskHandle_t xTask, UBaseType_t uxIndexToClear ) ; /** * task. h * @code{c} * uint32_t ulTaskNotifyValueClearIndexed( TaskHandle_t xTask, UBaseType_t uxIndexToClear, uint32_t ulBitsToClear ); * * uint32_t ulTaskNotifyValueClear( TaskHandle_t xTask, uint32_t ulBitsToClear ); * @endcode * * See https://www.FreeRTOS.org/RTOS-task-notifications.html for details. * * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for these * functions to be available. * * Each task has a private array of "notification values" (or 'notifications'), * each of which is a 32-bit unsigned integer (uint32_t). The constant * configTASK_NOTIFICATION_ARRAY_ENTRIES sets the number of indexes in the * array, and (for backward compatibility) defaults to 1 if left undefined. * Prior to FreeRTOS V10.4.0 there was only one notification value per task. * * ulTaskNotifyValueClearIndexed() clears the bits specified by the * ulBitsToClear bit mask in the notification value at array index uxIndexToClear * of the task referenced by xTask. * * Backward compatibility information: * Prior to FreeRTOS V10.4.0 each task had a single "notification value", and * all task notification API functions operated on that value. Replacing the * single notification value with an array of notification values necessitated a * new set of API functions that could address specific notifications within the * array. ulTaskNotifyValueClear() is the original API function, and remains * backward compatible by always operating on the notification value at index 0 * within the array. Calling ulTaskNotifyValueClear() is equivalent to calling * ulTaskNotifyValueClearIndexed() with the uxIndexToClear parameter set to 0. * * @param xTask The handle of the RTOS task that will have bits in one of its * notification values cleared. Set xTask to NULL to clear bits in a * notification value of the calling task. To obtain a task's handle create the * task using xTaskCreate() and make use of the pxCreatedTask parameter, or * create the task using xTaskCreateStatic() and store the returned value, or * use the task's name in a call to xTaskGetHandle(). * * @param uxIndexToClear The index within the target task's array of * notification values in which to clear the bits. uxIndexToClear * must be less than configTASK_NOTIFICATION_ARRAY_ENTRIES. * ulTaskNotifyValueClear() does not have this parameter and always clears bits * in the notification value at index 0. * * @param ulBitsToClear Bit mask of the bits to clear in the notification value of * xTask. Set a bit to 1 to clear the corresponding bits in the task's notification * value. Set ulBitsToClear to 0xffffffff (UINT_MAX on 32-bit architectures) to clear * the notification value to 0. Set ulBitsToClear to 0 to query the task's * notification value without clearing any bits. * * * @return The value of the target task's notification value before the bits * specified by ulBitsToClear were cleared. * \defgroup ulTaskNotifyValueClear ulTaskNotifyValueClear * \ingroup TaskNotifications */ uint32_t ulTaskGenericNotifyValueClear( TaskHandle_t xTask, UBaseType_t uxIndexToClear, uint32_t ulBitsToClear ) ; /** * task.h * @code{c} * void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ); * @endcode * * Capture the current time for future use with xTaskCheckForTimeOut(). * * @param pxTimeOut Pointer to a timeout object into which the current time * is to be captured. The captured time includes the tick count and the number * of times the tick count has overflowed since the system first booted. * \defgroup vTaskSetTimeOutState vTaskSetTimeOutState * \ingroup TaskCtrl */ void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) ; /** * task.h * @code{c} * BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ); * @endcode * * Determines if pxTicksToWait ticks has passed since a time was captured * using a call to vTaskSetTimeOutState(). The captured time includes the tick * count and the number of times the tick count has overflowed. * * @param pxTimeOut The time status as captured previously using * vTaskSetTimeOutState. If the timeout has not yet occurred, it is updated * to reflect the current time status. * @param pxTicksToWait The number of ticks to check for timeout i.e. if * pxTicksToWait ticks have passed since pxTimeOut was last updated (either by * vTaskSetTimeOutState() or xTaskCheckForTimeOut()), the timeout has occurred. * If the timeout has not occurred, pxTicksToWait is updated to reflect the * number of remaining ticks. * * @return If timeout has occurred, pdTRUE is returned. Otherwise pdFALSE is * returned and pxTicksToWait is updated to reflect the number of remaining * ticks. * * @see https://www.FreeRTOS.org/xTaskCheckForTimeOut.html * * Example Usage: * @code{c} * // Driver library function used to receive uxWantedBytes from an Rx buffer * // that is filled by a UART interrupt. If there are not enough bytes in the * // Rx buffer then the task enters the Blocked state until it is notified that * // more data has been placed into the buffer. If there is still not enough * // data then the task re-enters the Blocked state, and xTaskCheckForTimeOut() * // is used to re-calculate the Block time to ensure the total amount of time * // spent in the Blocked state does not exceed MAX_TIME_TO_WAIT. This * // continues until either the buffer contains at least uxWantedBytes bytes, * // or the total amount of time spent in the Blocked state reaches * // MAX_TIME_TO_WAIT - at which point the task reads however many bytes are * // available up to a maximum of uxWantedBytes. * * size_t xUART_Receive( uint8_t *pucBuffer, size_t uxWantedBytes ) * { * size_t uxReceived = 0; * TickType_t xTicksToWait = MAX_TIME_TO_WAIT; * TimeOut_t xTimeOut; * * // Initialize xTimeOut. This records the time at which this function * // was entered. * vTaskSetTimeOutState( &xTimeOut ); * * // Loop until the buffer contains the wanted number of bytes, or a * // timeout occurs. * while( UART_bytes_in_rx_buffer( pxUARTInstance ) < uxWantedBytes ) * { * // The buffer didn't contain enough data so this task is going to * // enter the Blocked state. Adjusting xTicksToWait to account for * // any time that has been spent in the Blocked state within this * // function so far to ensure the total amount of time spent in the * // Blocked state does not exceed MAX_TIME_TO_WAIT. * if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) != pdFALSE ) * { * //Timed out before the wanted number of bytes were available, * // exit the loop. * break; * } * * // Wait for a maximum of xTicksToWait ticks to be notified that the * // receive interrupt has placed more data into the buffer. * ulTaskNotifyTake( pdTRUE, xTicksToWait ); * } * * // Attempt to read uxWantedBytes from the receive buffer into pucBuffer. * // The actual number of bytes read (which might be less than * // uxWantedBytes) is returned. * uxReceived = UART_read_from_receive_buffer( pxUARTInstance, * pucBuffer, * uxWantedBytes ); * * return uxReceived; * } * @endcode * \defgroup xTaskCheckForTimeOut xTaskCheckForTimeOut * \ingroup TaskCtrl */ BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ) ; /** * task.h * @code{c} * BaseType_t xTaskCatchUpTicks( TickType_t xTicksToCatchUp ); * @endcode * * This function corrects the tick count value after the application code has held * interrupts disabled for an extended period resulting in tick interrupts having * been missed. * * This function is similar to vTaskStepTick(), however, unlike * vTaskStepTick(), xTaskCatchUpTicks() may move the tick count forward past a * time at which a task should be removed from the blocked state. That means * tasks may have to be removed from the blocked state as the tick count is * moved. * * @param xTicksToCatchUp The number of tick interrupts that have been missed due to * interrupts being disabled. Its value is not computed automatically, so must be * computed by the application writer. * * @return pdTRUE if moving the tick count forward resulted in a task leaving the * blocked state and a context switch being performed. Otherwise pdFALSE. * * \defgroup xTaskCatchUpTicks xTaskCatchUpTicks * \ingroup TaskCtrl */ BaseType_t xTaskCatchUpTicks( TickType_t xTicksToCatchUp ) ; /*----------------------------------------------------------- * SCHEDULER INTERNALS AVAILABLE FOR PORTING PURPOSES *----------------------------------------------------------*/ /* * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS ONLY * INTENDED FOR USE WHEN IMPLEMENTING A PORT OF THE SCHEDULER AND IS * AN INTERFACE WHICH IS FOR THE EXCLUSIVE USE OF THE SCHEDULER. * * Called from the real time kernel tick (either preemptive or cooperative), * this increments the tick count and checks if any tasks that are blocked * for a finite period required removing from a blocked list and placing on * a ready list. If a non-zero value is returned then a context switch is * required because either: * + A task was removed from a blocked list because its timeout had expired, * or * + Time slicing is in use and there is a task of equal priority to the * currently running task. */ BaseType_t xTaskIncrementTick( void ) ; /* * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS AN * INTERFACE WHICH IS FOR THE EXCLUSIVE USE OF THE SCHEDULER. * * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED. * * Removes the calling task from the ready list and places it both * on the list of tasks waiting for a particular event, and the * list of delayed tasks. The task will be removed from both lists * and replaced on the ready list should either the event occur (and * there be no higher priority tasks waiting on the same event) or * the delay period expires. * * The 'unordered' version replaces the event list item value with the * xItemValue value, and inserts the list item at the end of the list. * * The 'ordered' version uses the existing event list item value (which is the * owning task's priority) to insert the list item into the event list in task * priority order. * * @param pxEventList The list containing tasks that are blocked waiting * for the event to occur. * * @param xItemValue The item value to use for the event list item when the * event list is not ordered by task priority. * * @param xTicksToWait The maximum amount of time that the task should wait * for the event to occur. This is specified in kernel ticks, the constant * portTICK_PERIOD_MS can be used to convert kernel ticks into a real time * period. */ void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait ) ; void vTaskPlaceOnUnorderedEventList( List_t * pxEventList, const TickType_t xItemValue, const TickType_t xTicksToWait ) ; /* * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS AN * INTERFACE WHICH IS FOR THE EXCLUSIVE USE OF THE SCHEDULER. * * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED. * * This function performs nearly the same function as vTaskPlaceOnEventList(). * The difference being that this function does not permit tasks to block * indefinitely, whereas vTaskPlaceOnEventList() does. * */ void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely ) ; /* * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS AN * INTERFACE WHICH IS FOR THE EXCLUSIVE USE OF THE SCHEDULER. * * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED. * * Removes a task from both the specified event list and the list of blocked * tasks, and places it on a ready queue. * * xTaskRemoveFromEventList()/vTaskRemoveFromUnorderedEventList() will be called * if either an event occurs to unblock a task, or the block timeout period * expires. * * xTaskRemoveFromEventList() is used when the event list is in task priority * order. It removes the list item from the head of the event list as that will * have the highest priority owning task of all the tasks on the event list. * vTaskRemoveFromUnorderedEventList() is used when the event list is not * ordered and the event list items hold something other than the owning tasks * priority. In this case the event list item value is updated to the value * passed in the xItemValue parameter. * * @return pdTRUE if the task being removed has a higher priority than the task * making the call, otherwise pdFALSE. */ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList ) ; void vTaskRemoveFromUnorderedEventList( ListItem_t * pxEventListItem, const TickType_t xItemValue ) ; /* * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS ONLY * INTENDED FOR USE WHEN IMPLEMENTING A PORT OF THE SCHEDULER AND IS * AN INTERFACE WHICH IS FOR THE EXCLUSIVE USE OF THE SCHEDULER. * * Sets the pointer to the current TCB to the TCB of the highest priority task * that is ready to run. */ __attribute__( ( used ) ) void vTaskSwitchContext( void ) ; /* * THESE FUNCTIONS MUST NOT BE USED FROM APPLICATION CODE. THEY ARE USED BY * THE EVENT BITS MODULE. */ TickType_t uxTaskResetEventItemValue( void ) ; /* * Return the handle of the calling task. */ TaskHandle_t xTaskGetCurrentTaskHandle( void ) ; /* * Shortcut used by the queue implementation to prevent unnecessary call to * taskYIELD(); */ void vTaskMissedYield( void ) ; /* * Returns the scheduler state as taskSCHEDULER_RUNNING, * taskSCHEDULER_NOT_STARTED or taskSCHEDULER_SUSPENDED. */ BaseType_t xTaskGetSchedulerState( void ) ; /* * Raises the priority of the mutex holder to that of the calling task should * the mutex holder have a priority less than the calling task. */ BaseType_t xTaskPriorityInherit( TaskHandle_t const pxMutexHolder ) ; /* * Set the priority of a task back to its proper priority in the case that it * inherited a higher priority while it was holding a semaphore. */ BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) ; /* * If a higher priority task attempting to obtain a mutex caused a lower * priority task to inherit the higher priority task's priority - but the higher * priority task then timed out without obtaining the mutex, then the lower * priority task will disinherit the priority again - but only down as far as * the highest priority task that is still waiting for the mutex (if there were * more than one task waiting for the mutex). */ void vTaskPriorityDisinheritAfterTimeout( TaskHandle_t const pxMutexHolder, UBaseType_t uxHighestPriorityWaitingTask ) ; /* * Get the uxTaskNumber assigned to the task referenced by the xTask parameter. */ UBaseType_t uxTaskGetTaskNumber( TaskHandle_t xTask ) ; /* * Set the uxTaskNumber of the task referenced by the xTask parameter to * uxHandle. */ void vTaskSetTaskNumber( TaskHandle_t xTask, const UBaseType_t uxHandle ) ; /* * Only available when configUSE_TICKLESS_IDLE is set to 1. * If tickless mode is being used, or a low power mode is implemented, then * the tick interrupt will not execute during idle periods. When this is the * case, the tick count value maintained by the scheduler needs to be kept up * to date with the actual execution time by being skipped forward by a time * equal to the idle period. */ void vTaskStepTick( TickType_t xTicksToJump ) ; /* * Only available when configUSE_TICKLESS_IDLE is set to 1. * Provided for use within portSUPPRESS_TICKS_AND_SLEEP() to allow the port * specific sleep function to determine if it is ok to proceed with the sleep, * and if it is ok to proceed, if it is ok to sleep indefinitely. * * This function is necessary because portSUPPRESS_TICKS_AND_SLEEP() is only * called with the scheduler suspended, not from within a critical section. It * is therefore possible for an interrupt to request a context switch between * portSUPPRESS_TICKS_AND_SLEEP() and the low power mode actually being * entered. eTaskConfirmSleepModeStatus() should be called from a short * critical section between the timer being stopped and the sleep mode being * entered to ensure it is ok to proceed into the sleep mode. */ eSleepModeStatus eTaskConfirmSleepModeStatus( void ) ; /* * For internal use only. Increment the mutex held count when a mutex is * taken and return the handle of the task that has taken the mutex. */ TaskHandle_t pvTaskIncrementMutexHeldCount( void ) ; /* * For internal use only. Same as vTaskSetTimeOutState(), but without a critical * section. */ void vTaskInternalSetTimeOutState( TimeOut_t * const pxTimeOut ) ; /* *INDENT-OFF* */ /* *INDENT-ON* */ # 48 "../main_freertos.c" 2 # 1 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source\\ti/drivers/Board.h" 1 /* * Copyright (c) 2015-2019, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * 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. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * 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. */ /*!**************************************************************************** * @file Board.h * @brief Portable board-specific symbols * * The Board header file should be included in an application as follows: * @code * #include * @endcode * * This header serves as device-independent interface for applications using * peripherals connected to the device via standard digital interfaces; e.g, * GPIO, SPI, I2C, UART, etc. Its purpose is to enable application code that * references a peripheral to be portable to any device and board that * supports the peripheral. * * ## Usage ## * * @anchor ti_drivers_Board_Synopsis * ### Synopsis # * @anchor ti_drivers_Board_Synopsis_Code * @code * #include * * void main(void) * { * Board_init(); * : * } * @endcode * * ## Initializing the hardware ## * * \p Board_init() must be called before any other driver API. This function * is owned by the user (typically generated by SysConfig), and is * responsible for device specific initialization; e.g., initializing clocks * and power management functionality. ****************************************************************************** */ # 79 "C:/ti/simplelink_lowpower_f3_sdk_9_11_00_18/source\\ti/drivers/Board.h" /*! * @brief Performs "early" board-level initialization required by TI-DRIVERS * * Board_init() must be called before any other TI-DRIVER API. This function * calls all device and board specific initialization functions needed by * TI-DRIVERS; e.g., to initialize clocks and power management functionality. * * This function should only be called once and as early in the application's * startup as possible. In most applications, a call to Board_init() is the * first statement in \p main(). * * @pre \p Board_init must be called after every CPU reset and _prior_ to * enabling any interrupts. */ extern void Board_init(void); # 50 "../main_freertos.c" 2 extern void *mainThread(void *arg0); /* Stack size in bytes */ /* * ======== main ======== */ int main(void) { pthread_t thread; pthread_attr_t attrs; struct sched_param priParam; int retc; /* initialize the system locks */ Board_init(); /* Initialize the attributes structure with default values */ pthread_attr_init(&attrs); /* Set priority, detach state, and stack size attributes */ priParam.sched_priority = 1; retc = pthread_attr_setschedparam(&attrs, &priParam); retc |= pthread_attr_setdetachstate(&attrs, 1); retc |= pthread_attr_setstacksize(&attrs, 1024); if (retc != 0) { /* failed to set attributes */ while (1) {} } retc = pthread_create(&thread, &attrs, mainThread, ((void*)0)); if (retc != 0) { /* pthread_create() failed */ while (1) {} } /* Start the FreeRTOS scheduler */ vTaskStartScheduler(); return (0); }