diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/test/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/test/main.c b/src/modules/test/main.c index 507567f..493867e 100644 --- a/src/modules/test/main.c +++ b/src/modules/test/main.c @@ -30,6 +30,12 @@ void thread2(void* d) { } } +void thread_cascade(void* d) { + c_logSvc("{#} Thread cascade element started. Continuing.", LL_STATUS); + thread_new(thread_cascade, (void*)((int)d - 1)); + c_logSvc("{#} Thread cascade element finished.", LL_STATUS); +} + int main() { c_logSvc("Hi world from unregistered test module !", LL_NOTICE); c_registerSvc("test"); @@ -38,6 +44,9 @@ int main() { c_logSvc("{1} Sending a test message to manager", LL_STATUS); c_nothing(1, 0); + c_logSvc("{1} Creating thread cascade len:3", LL_STATUS); + thread_new(thread_cascade, (void*)3); + c_logSvc("{1} Thread now sleeping...", LL_WARNING); while (1) thread_sleep(1000); return 0; |