portbenchmark.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * FreeRTOS Kernel V10.4.6
  3. * Copyright (C) 2015-2019 Cadence Design Systems, Inc.
  4. * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  5. *
  6. * SPDX-License-Identifier: MIT
  7. *
  8. * Permission is hereby granted, free of charge, to any person obtaining a copy of
  9. * this software and associated documentation files (the "Software"), to deal in
  10. * the Software without restriction, including without limitation the rights to
  11. * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  12. * the Software, and to permit persons to whom the Software is furnished to do so,
  13. * subject to the following conditions:
  14. *
  15. * The above copyright notice and this permission notice shall be included in all
  16. * copies or substantial portions of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  20. * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  21. * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  22. * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  23. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  24. *
  25. * https://www.FreeRTOS.org
  26. * https://github.com/FreeRTOS
  27. *
  28. */
  29. /*
  30. * This utility helps benchmarking interrupt latency and context switches.
  31. * In order to enable it, set configBENCHMARK to 1 in FreeRTOSConfig.h.
  32. * You will also need to download the FreeRTOS_trace patch that contains
  33. * portbenchmark.c and the complete version of portbenchmark.h
  34. */
  35. #ifndef PORTBENCHMARK_H
  36. #define PORTBENCHMARK_H
  37. #if configBENCHMARK
  38. #error "You need to download the FreeRTOS_trace patch that overwrites this file"
  39. #endif
  40. #define portbenchmarkINTERRUPT_DISABLE()
  41. #define portbenchmarkINTERRUPT_RESTORE(newstate)
  42. #define portbenchmarkIntLatency()
  43. #define portbenchmarkIntWait()
  44. #define portbenchmarkReset()
  45. #define portbenchmarkPrint()
  46. #endif /* PORTBENCHMARK */