RUI3 (RAK Unified Interface 3) - RAK4631
RAKThread.h File Reference

Go to the source code of this file.

Data Structures

struct  rt
 

Macros

#define LABEL_INIT(s)   s = NULL
 
#define LABEL_RESUME(s)
 
#define LABEL_CONCAT2(s1, s2)   s1##s2
 
#define LABEL_CONCAT(s1, s2)   LABEL_CONCAT2(s1, s2)
 
#define LABEL_SET(s)
 
#define LABEL_END(s)
 
#define RT_WAITING   0
 
#define RT_YIELDED   1
 
#define RT_EXITED   2
 
#define RT_ENDED   3
 
#define RT_INIT(rt)   LABEL_INIT((rt)->label)
 
#define RT_BEGIN(rt)   { char RT_YIELD_FLAG = 1; LABEL_RESUME((rt)->label)
 
#define RT_END(rt)
 
#define RT_WAIT_UNTIL(rt, condition)
 
#define RT_WAIT_WHILE(rt, cond)   RT_WAIT_UNTIL((rt), !(cond))
 
#define RT_WAIT_THREAD(rt, thread)   RT_WAIT_WHILE((rt), RT_SCHEDULE(thread))
 
#define RT_SPAWN(rt, child, thread)
 
#define RT_RESTART(rt)
 
#define RT_EXIT(rt)
 
#define RT_SCHEDULE(f)   ((f) < RT_EXITED)
 
#define RT_YIELD(rt)
 
#define RT_YIELD_UNTIL(rt, cond)
 
#define RT_SLEEP(rt, delay)
 

Macro Definition Documentation

◆ LABEL_INIT

#define LABEL_INIT (   s)    s = NULL

◆ LABEL_RESUME

#define LABEL_RESUME (   s)
Value:
do { \
if(s != NULL) { \
goto *s; \
} \
} while(0)

◆ LABEL_CONCAT2

#define LABEL_CONCAT2 (   s1,
  s2 
)    s1##s2

◆ LABEL_CONCAT

#define LABEL_CONCAT (   s1,
  s2 
)    LABEL_CONCAT2(s1, s2)

◆ LABEL_SET

#define LABEL_SET (   s)
Value:
do { \
LABEL_CONCAT(LABEL_LABEL, __LINE__): \
(s) = &&LABEL_CONCAT(LABEL_LABEL, __LINE__); \
} while(0)
#define LABEL_CONCAT(s1, s2)
Definition: RAKThread.h:14

◆ LABEL_END

#define LABEL_END (   s)

◆ RT_WAITING

#define RT_WAITING   0

◆ RT_YIELDED

#define RT_YIELDED   1

◆ RT_EXITED

#define RT_EXITED   2

◆ RT_ENDED

#define RT_ENDED   3