restrict.h 550 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) 2016 Wind River Systems, Inc.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /**
  7. * @file
  8. * @brief _MLIBC_RESTRICT definition
  9. *
  10. * The macro "_MLIBC_RESTRICT" is intended to be private to the minimal libc
  11. * library. It evaluates to the "restrict" keyword when a C99 compiler is
  12. * used, and to "__restrict__" when a C++ compiler is used.
  13. */
  14. #if !defined(_MLIBC_RESTRICT_defined)
  15. #define _MLIBC_RESTRICT_defined
  16. #ifdef __cplusplus
  17. #define _MLIBC_RESTRICT __restrict__
  18. #else
  19. #define _MLIBC_RESTRICT restrict
  20. #endif
  21. #endif