Io_irelease (release semaphore) – Echelon Neuron User Manual
Page 181

watchdog timer reset. A Neuron C application can use the #pragma
deadlock_is_infinite compiler directive to avoid the watchdog timer reset. Do
not use this directive or the io_iaccess_wait() function for release targets; they
are intended only for debug targets.
As with the io_iaccess() function, the io_iaccess_wait() function takes no
arguments and always succeeds, but the time taken until the function returns
varies, subject to the state of the semaphore when calling this function.
As with the io_iaccess() function, use io_irelease to release the semaphore.
Stack Transformation: ( -- )
Location: Far
Registers Affected: None
Example:
This example acquires the semaphore, then modifies a global variable, then
releases the semaphore. This example assumes that interrupts are running on
the application processor and that the NodeBuilder debugger will be used.
Because you should not use the io_iaccess_wait() function in release target
code, you should modify all instances of io_iaccess_wait() to io_iaccess() after
debugging is complete.
import io_iaccess, io_access_wait, io_irelease
...
; ( data -- )
callf io_iaccess_wait ; ( data -- )
pop globalVar
; ( -- )
callf io_irelease
; ( -- )
io_irelease (Release Semaphore)
This function is only available for Series 5000 and 6000 chips. The function
releases the system synchronization semaphore and returns after the semaphore
has been released, completing the sequence of synchronized access to shared
resources from interrupts and application code which was started with the
io_iaccess call that acquired the semaphore.
The function takes no arguments and always succeeds.
The Series 5000 and 6000 chips support one single, binary, semaphore. Multiple
subsequent calls to this function are not supported. Use io_iaccess to acquire
the semaphore.
Stack Transformation: ( -- )
Location: Far
Registers Affected: None
Example:
Neuron Assembly Language Reference
171