- * SOURCE
- */
-typedef enum {
- SILC_FSM_CONTINUE, /* Continue immediately to next state */
- SILC_FSM_YIELD, /* Continue to next state through scheduler */
- SILC_FSM_WAIT, /* Wait for some async call or timeout */
- SILC_FSM_FINISH, /* Finish state machine and call destructor
- through scheduler */
-} SilcFSMStatus;
-/***/
+ * DESCRIPTION
+ *
+ * Suspends the machine or thread until it is awaken. This is used
+ * when asynchronous call is made or timer is set, or something else
+ * that requires waiting. The state function returns in this macro.
+ * The macro has no arguments.
+ *
+ ***/
+#define SILC_FSM_WAIT return SILC_FSM_ST_WAIT
+
+/****d* silcutil/SilcFSMAPI/SILC_FSM_FINISH
+ *
+ * NAME
+ *
+ * SILC_FSM_FINISH
+ *
+ * DESCRIPTION
+ *
+ * Finishes the machine or thread and calls its destructor, if defined.
+ * If the machine is finished when it has running threads the machine
+ * will fatally fail. User must always finish the threads before
+ * finishing the machine. The macro has no arguments.
+ *
+ ***/
+#define SILC_FSM_FINISH return SILC_FSM_ST_FINISH