RT_insight_config.h 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef __RT_INSIGHT_CONFIG_H__
  2. #define __RT_INSIGHT_CONFIG_H__
  3. /* ---------------- Insight Track Type Masks ---------------- */
  4. #define BASE_MASK (0xF0000000UL) /**< Base mask for track type category */
  5. #define FUNC_MASK (0x000000FFUL) /**< Mask for specific function/track type */
  6. /* ---------------- Thread Track Type ---------------- */
  7. #define THREAD_TRACK_BASE (0x00000000UL) /**< Base track type for threads */
  8. #define THREAD_RUN (THREAD_TRACK_BASE + (1 << 1)) /**< Thread running */
  9. #define THREAD_EXIT (THREAD_TRACK_BASE + (1 << 2)) /**< Thread exit */
  10. #define THREAD_RESUME (THREAD_TRACK_BASE + (1 << 3)) /**< Thread resumed */
  11. #define THREAD_SUSPEND (THREAD_TRACK_BASE + (1 << 4)) /**< Thread suspended */
  12. /* ---------------- IRQ / ISR Track Type ---------------- */
  13. #define IRQ_TRACK_BASE (0x10000000UL) /**< Base track type for IRQs */
  14. #define IRQ_ENTER (IRQ_TRACK_BASE + (1 << 1)) /**< IRQ enter */
  15. #define IRQ_EXIT (IRQ_TRACK_BASE + (1 << 2)) /**< IRQ exit */
  16. /* ---------------- Timer Track Type ---------------- */
  17. #define TIMER_TRACK_BASE (0x20000000UL) /**< Base track type for timers */
  18. #define TIMER_ENTER (TIMER_TRACK_BASE + (1 << 1)) /**< Timer callback start */
  19. #define TIMER_EXIT (TIMER_TRACK_BASE + (1 << 2)) /**< Timer callback end */
  20. /* ---------------- Semaphore Track Type ---------------- */
  21. #define SEM_TRACK_BASE (0x30000000UL) /**< Base track type for semaphores */
  22. #define SEM_TRYTAKE (SEM_TRACK_BASE + (1 << 1)) /**< Attempt to take semaphore */
  23. #define SEM_TAKE (SEM_TRACK_BASE + (1 << 2)) /**< Semaphore taken */
  24. #define SEM_RELEASE (SEM_TRACK_BASE + (1 << 3)) /**< Semaphore released */
  25. /* ---------------- Mutex Track Type ---------------- */
  26. #define MUTEX_TRACK_BASE (0x40000000UL) /**< Base track type for mutexes */
  27. #define MUTEX_TRYTAKE (MUTEX_TRACK_BASE + (1 << 1)) /**< Attempt to take mutex */
  28. #define MUTEX_TAKE (MUTEX_TRACK_BASE + (1 << 2)) /**< Mutex taken */
  29. #define MUTEX_RELEASE (MUTEX_TRACK_BASE + (1 << 3)) /**< Mutex released */
  30. /* ---------------- Event Object Track Type ---------------- */
  31. #define EVENT_TRACK_BASE (0x50000000UL) /**< Base track type for event objects */
  32. #define EVENT_TRYTAKE (EVENT_TRACK_BASE + (1 << 1)) /**< Attempt to take event */
  33. #define EVENT_TAKE (EVENT_TRACK_BASE + (1 << 2)) /**< Event taken */
  34. #define EVENT_RELEASE (EVENT_TRACK_BASE + (1 << 3)) /**< Event released */
  35. /* ---------------- Mailbox Track Type ---------------- */
  36. #define MAILBOX_TRACK_BASE (0x60000000UL) /**< Base track type for mailboxes */
  37. #define MAILBOX_TRYTAKE (MAILBOX_TRACK_BASE + (1 << 1)) /**< Attempt to take mailbox */
  38. #define MAILBOX_TAKE (MAILBOX_TRACK_BASE + (1 << 2)) /**< Mailbox taken */
  39. #define MAILBOX_RELEASE (MAILBOX_TRACK_BASE + (1 << 3)) /**< Mailbox released */
  40. /* ---------------- Message Queue Track Type ---------------- */
  41. #define QUEUE_TRACK_BASE (0x70000000UL) /**< Base track type for message queues */
  42. #define QUEUE_TRYTAKE (QUEUE_TRACK_BASE + (1 << 1)) /**< Attempt to take queue */
  43. #define QUEUE_TAKE (QUEUE_TRACK_BASE + (1 << 2)) /**< Queue taken */
  44. #define QUEUE_RELEASE (QUEUE_TRACK_BASE + (1 << 3)) /**< Queue released */
  45. #endif // __RT_INSIGHT_CONFIG_H__