Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions os/common/ports/RISCV-ECLIC/chcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,23 @@ struct port_context {
}
#endif

/**
* @brief Returns a word representing a critical section status.
*
* @return The critical section status.
*/
#define port_get_lock_status() port_get_irq_status()

/**
* @brief Determines if in a critical section.
*
* @param[in] sts status word returned by @p port_get_lock_status()
* @return The current status.
* @retval false if running outside a critical section.
* @retval true if running within a critical section.
*/
#define port_is_locked(sts) !port_irq_enabled(sts)

/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
Expand Down
Loading