X-Git-Url: http://git.silcnet.org/gitweb/?p=runtime.git;a=blobdiff_plain;f=lib%2Fsilcutil%2Ftests%2Ftest_silcthreadqueue.c;h=74d3902eb50ffc4fe492d42b82e41d1111ebf88c;hp=daecebffc131a3d3f5f9142960ef6d2bc55c5dee;hb=76c779783817ba7cdbe67ca83971134ce70e662f;hpb=480c4f6e83cbdec38af98419430450b9fd8600f8 diff --git a/lib/silcutil/tests/test_silcthreadqueue.c b/lib/silcutil/tests/test_silcthreadqueue.c index daecebff..74d3902e 100644 --- a/lib/silcutil/tests/test_silcthreadqueue.c +++ b/lib/silcutil/tests/test_silcthreadqueue.c @@ -17,7 +17,7 @@ SILC_FSM_STATE(test_st_start) SILC_LOG_DEBUG(("test_st_start")); - queue = silc_thread_queue_alloc(); + queue = silc_thread_queue_alloc(1, FALSE); if (!queue) { silc_fsm_next(fsm, test_st_finish); return SILC_FSM_CONTINUE; @@ -43,7 +43,7 @@ SILC_FSM_STATE(test_st_wait) SILC_LOG_DEBUG(("Wait for data")); /* Wait for data */ - data = silc_thread_queue_pop(queue, TRUE); + data = silc_thread_queue_pop(queue, 0, TRUE); if (!data || data != (void *)100) { silc_fsm_next(fsm, test_st_finish); return SILC_FSM_CONTINUE; @@ -62,7 +62,7 @@ SILC_FSM_STATE(test_st_thread_start) /* Send data */ SILC_LOG_DEBUG(("Send data")); - silc_thread_queue_push(queue, (void *)100); + silc_thread_queue_push(queue, 0, (void *)100, FALSE); silc_thread_queue_disconnect(queue); return SILC_FSM_FINISH; @@ -90,6 +90,8 @@ int main(int argc, char **argv) { SilcFSM fsm; + silc_runtime_init(); + if (argc > 1 && !strcmp(argv[1], "-d")) { silc_log_debug(TRUE); silc_log_debug_hexdump(TRUE); @@ -116,5 +118,7 @@ int main(int argc, char **argv) SILC_LOG_DEBUG(("Testing was %s", success ? "SUCCESS" : "FAILURE")); fprintf(stderr, "Testing was %s\n", success ? "SUCCESS" : "FAILURE"); + silc_runtime_uninit(); + return !success; }