mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 21:23:06 +00:00
Add mq (message queue) to test infrastructure.
Add mtx (mutex) to test infrastructure, in order to avoid bootstrapping complications that would result from directly using malloc_mutex. Rename test infrastructure's thread abstraction from je_thread to thd. Fix some header ordering issues.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#define NTHREADS 10
|
||||
|
||||
void *
|
||||
je_thread_start(void *arg)
|
||||
thd_start(void *arg)
|
||||
{
|
||||
unsigned thread_ind = (unsigned)(uintptr_t)arg;
|
||||
unsigned arena_ind;
|
||||
@@ -36,16 +36,16 @@ je_thread_start(void *arg)
|
||||
|
||||
TEST_BEGIN(test_ALLOCM_ARENA)
|
||||
{
|
||||
je_thread_t threads[NTHREADS];
|
||||
thd_t thds[NTHREADS];
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < NTHREADS; i++) {
|
||||
je_thread_create(&threads[i], je_thread_start,
|
||||
thd_create(&thds[i], thd_start,
|
||||
(void *)(uintptr_t)i);
|
||||
}
|
||||
|
||||
for (i = 0; i < NTHREADS; i++)
|
||||
je_thread_join(threads[i], NULL);
|
||||
thd_join(thds[i], NULL);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
|
||||
Reference in New Issue
Block a user