/* Atomic bitwise exclusive OR (XOR) primitive. 
is atomically bitwise XOR'ed with the value at <target>, placing the result at <target>, and the previous value at <target> is returned. */
atomic_val_t atomic_xor(atomic_t *target, atomic_val_t value)
/* Atomic bitwise exclusive OR (XOR) primitive. 
is atomically bitwise XOR'ed with the value at <target>, placing the result at <target>, and the previous value at <target> is returned. */
atomic_val_t atomic_xor(atomic_t *target, atomic_val_t value)
{
    unsigned int key;
    atomic_val_t ret;
    key = irq_lock();
    ret = *target;
    *target ^= value;
    irq_unlock(key);
    return ret;
}