Module Name: src
Committed By: riastradh
Date: Sat Oct 4 15:51:23 UTC 2014
Modified Files:
src/sys/external/bsd/drm/dist/bsd-core: drm_atomic.h
Log Message:
Canonicalize boolean result from test_and_set_bit.
Not actually semantically significant for any callers, but Linux
documentation insists it is important, so we'll follow suit.
Fixes last part of PR kern/48999.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h
diff -u src/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:1.4 src/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:1.5
--- src/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:1.4 Fri Jun 19 03:50:03 2009
+++ src/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h Sat Oct 4 15:51:23 2014
@@ -49,7 +49,7 @@ test_and_set_bit(int b, volatile void *p
unsigned int r = *(volatile int *)p & m;
*(volatile int *)p |= m;
splx(s);
- return r;
+ return !!r;
}
static __inline void
@@ -115,7 +115,7 @@ test_and_set_bit(int b, volatile void *p
break;
} while (atomic_cas_uint(val, old, old | mask) != old);
- return old & mask;
+ return !!(old & mask);
}
#endif