rx: Fix AIX test_and_set_bit

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>
This commit is contained in:
Simon Wilkinson 2013-02-02 07:17:53 +00:00 committed by Derrick Brashear
parent 69f6345034
commit 9dc6dd9858

View File

@ -174,7 +174,7 @@ rx_atomic_clear_bit(rx_atomic_t *atomic, int bit) {
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