From 64f96a5128c0358044efd962e0bcf7caee917348 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 28 Mar 2008 16:13:17 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@252 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/lib/ch.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/lib') diff --git a/src/lib/ch.hpp b/src/lib/ch.hpp index 177e9bb46..4b4ef196e 100644 --- a/src/lib/ch.hpp +++ b/src/lib/ch.hpp @@ -195,11 +195,26 @@ namespace chibios_rt { public: const char *name; + /** + * Full constructor. It allows to set a priority level for the new thread + * and specify the special option flags. + */ EnhancedThread(const char *tname, tprio_t prio, tmode_t mode) : BaseThread(prio, mode, wa, sizeof wa) { name = tname; } + + /** + * Simplified constructor, it allows to create a thread by simply + * specifying a name. In is assumed /p NORMALPRIO as initial priority + * and no special option flags. + */ + EnhancedThread(const char *tname) : + BaseThread(NORMALPRIO, 0, wa, sizeof wa) { + + name = tname; + } }; #ifdef CH_USE_SEMAPHORES -- cgit v1.2.3