]> rtime.felk.cvut.cz Git - fpga/rpi-motor-control.git/blobdiff - pmsm-control/test_sw/misc.h
Added testing SW in folder test_sw.
[fpga/rpi-motor-control.git] / pmsm-control / test_sw / misc.h
diff --git a/pmsm-control/test_sw/misc.h b/pmsm-control/test_sw/misc.h
new file mode 100644 (file)
index 0000000..14b1089
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * \brief Interface pro pomocne funkce.
+ * \file misc.h
+ * \date Feb 1, 2015
+ * \author Martin Prudek
+ */
+
+#ifndef MISC_H_
+#define MISC_H_
+
+#include <semaphore.h>
+
+sem_t thd_par_sem; ///< semafor pro detekci zpracovani parametru noveho vlakna
+
+/*
+ * struktura predana novym vlaknum
+ */
+struct thread_param{
+       int sch_policy;
+       int sch_prior;
+};
+
+/**
+ * nastavi prioritu a scheduler podle parametru
+ * na konci vrati semafor
+ * \param pointer na struct thread_sched_param
+ */
+extern void set_priority(void *);
+
+
+#endif /* MISC_H_ */