Chromium Code Reviews| Index: crosstest/test_sync_atomic.def |
| diff --git a/crosstest/test_sync_atomic.def b/crosstest/test_sync_atomic.def |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cd481839a32612d73b84a1ce060cdc2d0ea99e71 |
| --- /dev/null |
| +++ b/crosstest/test_sync_atomic.def |
| @@ -0,0 +1,38 @@ |
| +#ifndef TEST_SYNC_ATOMIC_DEF |
| +#define TEST_SYNC_ATOMIC_DEF |
| + |
| +#define XSTR(s) STR(s) |
|
Jim Stichnoth
2014/07/08 04:50:19
XSTR() is not used anywhere, consider removing it?
jvoung (off chromium)
2014/07/08 18:14:06
Done.
|
| +#define STR(s) #s |
| + |
| +#define RMWOP_TABLE \ |
| + /* inst */ \ |
| + X(add) \ |
| + X(sub) \ |
| + X(or) \ |
| + X(and) \ |
| + X(xor) |
| +//#define X(inst) |
| + |
| +#define ATOMIC_TYPE_TABLE \ |
| + /* type */ \ |
| + X(uint8_t) \ |
| + X(uint16_t) \ |
| + X(uint32_t) \ |
| + X(uint64_t) |
| +//#define X(type) |
| + |
| +#define FOR_ALL_RMWTYPES_INST(F, inst) \ |
| + F(inst, uint8_t) \ |
| + F(inst, uint16_t) \ |
| + F(inst, uint32_t) \ |
| + F(inst, uint64_t) |
| + |
| +#define FOR_ALL_RMWOP_TYPES(X) \ |
| + FOR_ALL_RMWTYPES_INST(X, add) \ |
| + FOR_ALL_RMWTYPES_INST(X, sub) \ |
| + FOR_ALL_RMWTYPES_INST(X, or) \ |
| + FOR_ALL_RMWTYPES_INST(X, and) \ |
| + FOR_ALL_RMWTYPES_INST(X, xor) |
| +//#define X(inst, type) |
| + |
| +#endif // TEST_SYNC_ATOMIC_DEF |