Suppose I\'m modifying a few bits in a memory-mapped I/O register, and it\'s possible that another process or and ISR could be modifying other bits in the same register.
If the chip in question has a toggle register (which is essentially XORed with the output latch when written to) there is a work around.
as long as two processes do not modify the same pins (as opposed to "the same port") there is no race condition.
In the case of the bcm2708 you could choose an output pin whose neighbors are either unused or are never changed and write to GPFSELn in byte mode. This will however only ensure that you will not corrupt others. If others are writing in 32 bit mode and you interrupt them they will still corrupt you. So its kind of a hack.
Hope this helps