aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-03-28 16:13:17 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-03-28 16:13:17 +0000
commit64f96a5128c0358044efd962e0bcf7caee917348 (patch)
tree48c8793908fdd895df3a09c2e96f44ef89e338fc /src
parent42a90cc8cebf186c64bbae50a16a90a9979b80f4 (diff)
downloadChibiOS-64f96a5128c0358044efd962e0bcf7caee917348.tar.gz
ChibiOS-64f96a5128c0358044efd962e0bcf7caee917348.tar.bz2
ChibiOS-64f96a5128c0358044efd962e0bcf7caee917348.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@252 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src')
-rw-r--r--src/lib/ch.hpp15
1 files changed, 15 insertions, 0 deletions
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