MCPcopy Create free account
hub / github.com/apache/trafficserver / testalist

Function testalist

src/tscore/test_atomic.cc:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40int al_done = 0;
41
42void *
43testalist(void *ame)
44{
45 int me = static_cast<int>((uintptr_t)ame);
46 int j, k;
47 for (k = 0; k < MAX_ALIST_ARRAY; k++) {
48 ink_atomiclist_push(&al[k % MAX_ALIST_TEST], &al_test[me][k]);
49 }
50 void *x;
51 for (j = 0; j < 1000000; j++) {
52 if ((x = ink_atomiclist_pop(&al[me]))) {
53 ink_atomiclist_push(&al[rand() % MAX_ALIST_TEST], x);
54 }
55 }
56 ink_atomic_increment(&al_done, 1);
57 return nullptr;
58}
59#endif // !LONG_ATOMICLIST_TEST
60
61#ifdef LONG_ATOMICLIST_TEST

Callers

nothing calls this directly

Calls 3

ink_atomiclist_pushFunction · 0.85
ink_atomiclist_popFunction · 0.85
ink_atomic_incrementFunction · 0.85

Tested by

no test coverage detected