misc.h 794 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (c) 2013-2014 Wind River Systems, Inc.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /**
  7. * @file
  8. * @brief ARM AArch32 public kernel miscellaneous
  9. *
  10. * ARM AArch32-specific kernel miscellaneous interface. Included by arm/arch.h.
  11. */
  12. #ifndef ZEPHYR_INCLUDE_ARCH_ARM_AARCH32_MISC_H_
  13. #define ZEPHYR_INCLUDE_ARCH_ARM_AARCH32_MISC_H_
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #ifndef _ASMLANGUAGE
  18. extern uint32_t sys_clock_cycle_get_32(void);
  19. static inline uint32_t arch_k_cycle_get_32(void)
  20. {
  21. return sys_clock_cycle_get_32();
  22. }
  23. static ALWAYS_INLINE void arch_nop(void)
  24. {
  25. __asm__ volatile("nop");
  26. }
  27. #if defined(CONFIG_USERSPACE)
  28. extern bool z_arm_thread_is_in_user_mode(void);
  29. #endif
  30. #endif
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif /* ZEPHYR_INCLUDE_ARCH_ARM_AARCH32_MISC_H_ */