#undef LOCAL_DEBUG
-#include "lib/lib.h"
-#include "lib/mempool.h"
-#include "lib/fastbuf.h"
-#include "lib/threads.h"
+#include "ucw/lib.h"
+#include "ucw/mempool.h"
+#include "ucw/fastbuf.h"
+#include "ucw/threads.h"
#include "images/images.h"
#include "images/color.h"
mp_delete(pool);
}
+#ifdef CONFIG_UCW_THREADS
+
#define TEST_THREADS_COUNT 4
static void *
return NULL;
}
+#endif
+
static void
test_threads(void)
{
+#ifdef CONFIG_UCW_THREADS
pthread_t threads[TEST_THREADS_COUNT - 1];
pthread_attr_t attr;
if (pthread_attr_init(&attr) < 0 ||
- pthread_attr_setstacksize(&attr, default_thread_stack_size) < 0)
+ pthread_attr_setstacksize(&attr, ucwlib_thread_stack_size) < 0)
ASSERT(0);
for (uns i = 0; i < TEST_THREADS_COUNT - 1; i++)
{
for (uns i = 0; i < TEST_THREADS_COUNT - 1; i++)
if (pthread_join(threads[i], NULL) < 0)
die("Cannot join thread: %m");
+#else
+ msg(L_WARN, "Disabled CONFIG_UCW_THREADS, threaded tests skipped");
+#endif
}
int