The AIX definition of rx_atomic_test_and_set_bit had its test the
wrong way round - so an already set bit would return false, and a clear
bit would return true. Fix this.
Change-Id: I7778c411016bca53b38257fca59ae0f7aaad64ae
Reviewed-on: http://gerrit.openafs.org/9021
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
static_inline int
rx_atomic_test_and_set_bit(rx_atomic_t *atomic, int bit) {
- return (fetch_and_or(&atomic->var, (1<<bit)) & 1<<bit) == 0;
+ return (fetch_and_or(&atomic->var, (1<<bit)) & 1<<bit) != 0;
}
static_inline int