The implementation of an interrupt-safe enqueue() is
listed in Figure 4. According to FIFO, a newly to be inserted
element becomes the last queue element and has to
terminate the list. List termination is handled in line 2 and
insertion of an element is handled in line 8. Furthermore
the tail pointer needs to be updated. This is done in line
4. In contemporary queue implementations, manipulation
of the tail pointer finishes the insertion procedure. In the
case discussed here this manipulation takes place before the
element is added to the queue.