/* High level FSM API */
/**********************/
+/**
+ * Specifies state function visibility.
+ *
+ * If this macro is redefined from "" (empty) to static, then the
+ * state functions are declared as static.
+ */
+#define FSM_STATE_VISIBILITY
+
#define ___fsm_func_name(fsm, state, suf) fsm_state_##fsm##_##state##suf
#define __fsm_func_name(fsm, state, suf) ___fsm_func_name(fsm, state, suf)
#ifdef __FSM_NAME
#define FSM_STATE(name) \
static inline void __fsm_func_name(__FSM_NAME, name, _impl)(struct robo_fsm *fsm, int *__ret); \
- int __fsm_func_name(__FSM_NAME, name,)(struct robo_fsm *fsm) { \
+ FSM_STATE_VISIBILITY int __fsm_func_name(__FSM_NAME, name,)(struct robo_fsm *fsm) { \
int ret=RC_WAIT; \
DBG_FSM_STATE(#name); \
fsm->state_name = #name; \
*/
#ifdef __FSM_NAME
#define FSM_STATE_DECL(name) \
-int __fsm_func_name(__FSM_NAME, name,)(struct robo_fsm *fsm)
+FSM_STATE_VISIBILITY int __fsm_func_name(__FSM_NAME, name,)(struct robo_fsm *fsm)
#else
#define FSM_STATE_DECL(name) error FSM_XXX_not_defined
#endif