Hi guys,
i have a confusion with automic instruction. In the following code , i have a TSL instruction, which works automic. Thats fine. But, my question is, can i conside that the whole tsl_function works automic. (like , these 4 lines will be executed without being interrupted.)
TSL_enter_region:
tsl reg, lock
cmp reg, #0
jne TSL_enter_region
ret
Thanks for your help.
atomic operation
Re: atomic operation
i think , NO. This might be a implementation of Spin-lock. When a Theard is in busy-wait. And , An timer interrupt can occur, which takes this Thread away from this looping(spin-lock).
Am i right?
Am i right?
Re: atomic operation
Firstly, please take some care with your spelling and capitalisation.
No the entire function is not atomic. It looks like it contains an atomic instruction.But, my question is, can i conside that the whole tsl_function works automic. (like , these 4 lines will be executed without being interrupted.)
You are probably correct that it is a spinlock implementation.This might be a implementation of Spin-lock. When a Theard is in busy-wait. And , An timer interrupt can occur, which takes this Thread away from this looping(spin-lock).
It depends. What is your real question ?Am i right?
If a trainstation is where trains stop, what is a workstation ?
Re: atomic operation
Thank you very much . I have got my answer.