2
0

spin.c 261 B

123456789101112131415161718
  1. #include "test/jemalloc_test.h"
  2. #include "jemalloc/internal/spin.h"
  3. TEST_BEGIN(test_spin) {
  4. spin_t spinner = SPIN_INITIALIZER;
  5. for (unsigned i = 0; i < 100; i++) {
  6. spin_adaptive(&spinner);
  7. }
  8. }
  9. TEST_END
  10. int
  11. main(void) {
  12. return test(
  13. test_spin);
  14. }