]> oss.titaniummirror.com Git - rgblamp.git/blobdiff - task.h
Fixes from picbtnisr work
[rgblamp.git] / task.h
diff --git a/task.h b/task.h
index f95d7159fa710ad879a7e330f76b840be8e82a6d..b53640f6ae946965f8d28a485dbf9d76f1898ef2 100644 (file)
--- a/task.h
+++ b/task.h
 #include "task_defs.h"
 #include "bit.h"
 
-typedef unsigned char task_id_t;
+typedef signed char task_id_t;
 
 /* Do not use directly; only for the 'inline' functions below */
 extern unsigned long _task_ids;
 extern task_id_t _task_bitno;
 
-/* Post task t from ISR */
-#define _task_post(t) do { _task_ids |= 1UL << t; } while (0)
+/* Post task t.  No need for ndi() since bit_set is a single instruction. */
+#define task_post(t) do { bit_set(_task_ids, t); } while (0)
 
 /* Initialize the task subsystem */
 #define task_init() do { _task_ids = 0; _task_bitno = 0; } while (0)
@@ -57,7 +57,4 @@ bit task_check();
  */
 task_id_t task_get(unsigned char block);
 
-/* Post task t from user code */
-void task_post(task_id_t t);
-
 #endif