mirror of
https://git.openafs.org/openafs.git
synced 2025-01-20 16:00:12 +00:00
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:
parent
69f6345034
commit
9dc6dd9858
@ -174,7 +174,7 @@ rx_atomic_clear_bit(rx_atomic_t *atomic, int bit) {
|
|||||||
|
|
||||||
static_inline int
|
static_inline int
|
||||||
rx_atomic_test_and_set_bit(rx_atomic_t *atomic, int bit) {
|
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
|
static_inline int
|
||||||
|
Loading…
Reference in New Issue
Block a user