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:
Jason Evans
2013-12-12 14:41:02 -08:00
parent 19609724f9
commit 0f4f1efd94
21 changed files with 441 additions and 131 deletions

View File

@@ -9,7 +9,7 @@ static const bool config_tcache =
;
void *
je_thread_start(void *arg)
thd_start(void *arg)
{
int err;
size_t sz;
@@ -86,16 +86,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