summaryrefslogtreecommitdiff
path: root/cesar/mac/sar/inc/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/mac/sar/inc/thread.h')
-rw-r--r--cesar/mac/sar/inc/thread.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/cesar/mac/sar/inc/thread.h b/cesar/mac/sar/inc/thread.h
new file mode 100644
index 0000000000..bea39f30a1
--- /dev/null
+++ b/cesar/mac/sar/inc/thread.h
@@ -0,0 +1,51 @@
+#ifndef mac_sar_inc_thread_h
+#define mac_sar_inc_thread_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2011 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file mac/sar/inc/thread.h
+ * \brief Handle the Thread of the SAR.
+ * \ingroup mac_sar
+ */
+#include "common/defs/priority.h"
+#include <cyg/hal/hal_arch.h>
+#include <cyg/kernel/kapi.h>
+#include "mac/sar/sar.h"
+
+/* Thread structure. */
+struct sar_thread_t
+{
+ /** the Thread thread stack. */
+ u8 thread_stack [MAC_SAR_THREAD_STACK_SIZE];
+ /** the Thread handler. */
+ cyg_handle_t thread_handle;
+ /** The Thread. */
+ cyg_thread thread;
+ /** Sar context. */
+ sar_t *sar;
+};
+typedef struct sar_thread_t sar_thread_t;
+
+BEGIN_DECLS
+
+/**
+ * Initialise the sub module.
+ * \param the pointer to the SAR context.
+ */
+void
+sar_thread_init (sar_t *sar);
+
+/**
+ * Uninitialise the thread thread.
+ */
+void
+sar_thread_uninit (void);
+
+END_DECLS
+
+#endif /* mac_sar_inc_thread_h */