X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=task.h;h=d08a36307ce65f97b15d44c4e4801f97bc7ed3e1;hb=a0556afb8953ae458fb0fe7bcc68bde851f0e630;hp=b53640f6ae946965f8d28a485dbf9d76f1898ef2;hpb=be367d7f046a080f1575ac4e918a94dfad24fa73;p=rgblamp.git diff --git a/task.h b/task.h index b53640f..d08a363 100644 --- a/task.h +++ b/task.h @@ -41,10 +41,10 @@ extern unsigned long _task_ids; extern task_id_t _task_bitno; /* 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) +#define task_post(t) (bit_set(_task_ids, t)) /* Initialize the task subsystem */ -#define task_init() do { _task_ids = 0; _task_bitno = 0; } while (0) +#define task_init() (_task_ids = 0) /* Returns non-zero if one or more tasks are posted. Does not block. */ bit task_check();