spin.c 261 B

12345678910111213141516171819
  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. }