1ace9bad4SMark Rutlandcat <<EOF 2dc1b4df0SMark Rutland ${int} ret; 3dc1b4df0SMark Rutland 4dc1b4df0SMark Rutland if (__native_word(${atomic}_t)) { 5dc1b4df0SMark Rutland ret = smp_load_acquire(&(v)->counter); 6dc1b4df0SMark Rutland } else { 7*9257959aSMark Rutland ret = raw_${atomic}_read(v); 8dc1b4df0SMark Rutland __atomic_acquire_fence(); 9dc1b4df0SMark Rutland } 10dc1b4df0SMark Rutland 11dc1b4df0SMark Rutland return ret; 12ace9bad4SMark RutlandEOF 13