SYNOPSIS
#include <fthread.h>
ft_thread_t ft_automaton_create (ft_scheduler_t sched,
void (*automaton)(ft_thread_t),
void (*cleanup)(void*),
void *args);
AUTOMATON(name)
DEFINE_AUTOMATON(name)
BEGIN_AUTOMATON
END_AUTOMATON
STATE(num)
STATE_AWAIT(num,event)
STATE_AWAIT_N(num,event,delay)
STATE_GET_VALUE(num,event,n,result)
STATE_STAY(num,delay)
STATE_JOIN(num,thread)
STATE_JOIN_N(num,thread,delay)
STATE_SELECT(num,n,array,mask)
STATE_SELECT_N(num,n,array,mask,delay)
GOTO(num)
GOTO_NEXT
IMMEDIATE(num)
RETURN
SELF
SET_LOCAL(data)
LOCAL
ARGS
RETURN_CODE