diff options
author | Alexis211 <alexis211@gmail.com> | 2010-09-10 18:46:00 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2010-09-10 18:46:00 +0200 |
commit | aba6ed4b91aff5d914be11704e34de75bfd4d003 (patch) | |
tree | 3d5cf90e9ccad09d352c6a61e90027ef552dd87f /src/modules/test | |
parent | 5fc3baaa17a6ffb34490bb8accb86f53ef3d6d15 (diff) | |
download | TCE-aba6ed4b91aff5d914be11704e34de75bfd4d003.tar.gz TCE-aba6ed4b91aff5d914be11704e34de75bfd4d003.zip |
Each thread has its own stack. Added simple unit tests for kmalloc,kfree
Found a bug in heap_contract (not sure) but didn't fix it.
Diffstat (limited to 'src/modules/test')
-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; |