mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-01 17:54:16 +03: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:
parent
19609724f9
commit
0f4f1efd94
21 changed files with 441 additions and 131 deletions
|
|
@ -9,7 +9,7 @@ static const bool config_stats =
|
|||
;
|
||||
|
||||
void *
|
||||
je_thread_start(void *arg)
|
||||
thd_start(void *arg)
|
||||
{
|
||||
int err;
|
||||
void *p;
|
||||
|
|
@ -98,16 +98,16 @@ label_ENOENT:
|
|||
TEST_BEGIN(test_main_thread)
|
||||
{
|
||||
|
||||
je_thread_start(NULL);
|
||||
thd_start(NULL);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_subthread)
|
||||
{
|
||||
je_thread_t thread;
|
||||
thd_t thd;
|
||||
|
||||
je_thread_create(&thread, je_thread_start, NULL);
|
||||
je_thread_join(thread, NULL);
|
||||
thd_create(&thd, thd_start, NULL);
|
||||
thd_join(thd, NULL);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue