Just a note: Such functions often are needed for semaphores etc. In that case they need to take multi-thread and multi-Processor issues into account. -Michael