Interrupt routing – Comtrol eCos User Manual
Page 300

Chapter 9. HAL Interfaces
HAL_SMP_SCHEDLOCK_INC( lock, data )
Increment the scheduler lock. The first increment of the lock from zero to one for any CPU may cause it to
wait until the lock is zeroed by another CPU. Subsequent increments should be less expensive since this CPU
already holds the lock.
HAL_SMP_SCHEDLOCK_ZERO( lock, data )
Zero the scheduler lock. This operation will also clear the lock so that other CPUs may claim it.
HAL_SMP_SCHEDLOCK_SET( lock, data, new )
Set the lock to a different value, in
new
. This is only called when the lock is already known to be owned by
the current CPU. It is never called to zero the lock, or to increment it from zero.
Interrupt Routing
The routing of interrupts to different CPUs is supported by two new interfaces in hal_intr.h.
Once an interrupt has been routed to a new CPU, the existing vector masking and configuration operations should
take account of the CPU routing. For example, if the operation is not invoked on the destination CPU itself, then
the HAL may need to arrange to transfer the operation to the destination CPU for correct application.
HAL_INTERRUPT_SET_CPU( vector, cpu )
Route the interrupt for the given
vector
to the given
cpu
.
HAL_INTERRUPT_GET_CPU( vector, cpu )
Set
cpu
to the id of the CPU to which this vector is routed.
196