#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)
*/
task_id_t task_get(unsigned char block);
-/* Post task t from user code */
-void task_post(task_id_t t);
-
#endif