diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-07-03 15:34:29 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-07-03 15:35:28 +0200 |
commit | 0f390b743634ef4cdda03da8cb3f175524d59bd0 (patch) | |
tree | 829dd7907fdf11190cb8b153d76bab0a3e8d1c1a /thread.h | |
parent | 1a8771c5d0e23fb91cb926614933405f39049d63 (diff) |
Removed old stuff.
Diffstat (limited to 'thread.h')
-rw-r--r-- | thread.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/thread.h b/thread.h deleted file mode 100644 index b69801a..0000000 --- a/thread.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef THREAD_H -#define THREAD_H - -#include <ch.h> - -#define noreturn_t __attribute__((noreturn)) void - -template<class Child, size_t stack_size> -class BaseThread { - private: - WORKING_AREA(stack_space, stack_size); - - static inline noreturn_t thread_main_wrap(void* arg) { - ((Child*)arg)->thread_main(); - } - - public: - void start(tprio_t priority = NORMALPRIO) { - chThdCreateStatic(stack_space, sizeof(stack_space), priority, (tfunc_t)thread_main_wrap, this); - } -}; - -#endif |