#include #include #ifndef ICQ_SPINLOCK #define ICQ_SPINLOCK struct spinlock_t { #ifdef LEON4_IN_PROGRESS volatile uint32_t mutex; #endif #ifdef RTEMS rtems_id mutex; #endif } typedef spinlock_t; void spinlock_init(spinlock_t* sp); int spinlock_lock(spinlock_t sp); int spinlock_unlock(spinlock_t sp); #endif