NEW and Correct Information
The reference for the instruction set can be found here.
To emulate a lock it is suggested in the documentation that interupts be disabled.
Example ; Make the operation ”VarC = VarA + VarB” atomic:
DINT ; Disable interrupts (INTM = 1)
MOVL ACC,@VarA ; ACC = VarA
ADDL ACC,@VarB ; ACC = ACC + VarB
MOVL @VarC,ACC ; Store result into VarC
EINT ; Enable interrupts (INTM = 0)
-- Algorithm pointers --
Interrupts pre-empt main-loop and apparently atomic operations do not exist. Your main-loop has to disable interrupts while it is popping. Since disabling interrupts is like owning a lock in this context you could implement the queue as contiguous memory or ontop of a slist. The former means copying out the memory to the stack of the main-loop on pop, which might be slower -- however provided your FIFO has enough memory you should not have to allocate slist nodes from a heap -- which means no memory management headaches. Of course, memory management headaches won't exist if the slist nodes are of a uniform size.
So, for a pop you must disable interrupts and remove the element -- once done, re-enable the interrupt. For interrupt vectors it is business as usual (you might need to disable the interupts during interupt vector processing -- this is controller dependant).