[Pvfs2-cvs] commit by pw in pvfs2/src/common/misc:
state-machine-fns.c
CVS commit program
cvs at parl.clemson.edu
Wed May 9 15:11:39 EDT 2007
Update of /projects/cvsroot/pvfs2/src/common/misc
In directory parlweb1:/tmp/cvs-serv21441/src/common/misc
Modified Files:
state-machine-fns.c
Log Message:
Use SM_ACTION enum, fix comments.
Index: state-machine-fns.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/state-machine-fns.c,v
diff -u -p -p -u -r1.3 -r1.4
--- state-machine-fns.c 18 Apr 2007 16:38:58 -0000 1.3
+++ state-machine-fns.c 9 May 2007 19:11:39 -0000 1.4
@@ -83,7 +83,8 @@ int PINT_state_machine_terminate(struct
if needed (sets op_terminate if SM_ACTION_TERMINATED is
returned)
*/
-int PINT_state_machine_invoke(struct PINT_smcb *smcb, job_status_s *r)
+PINT_sm_action PINT_state_machine_invoke(struct PINT_smcb *smcb,
+ job_status_s *r)
{
PINT_sm_action retval;
const char * state_name;
@@ -164,17 +165,18 @@ int PINT_state_machine_invoke(struct PIN
return retval;
}
-/* Function: PINT_state_machine_next()
+/* Function: PINT_state_machine_start()
Params: smcb pointer and job status pointer
Returns: return value of last state action
- Synopsis: runs the state action pointed to by the
+ Synopsis: Runs the state action pointed to by the
current state, then continues to run the SM
- as long asreturn code is SM_ACTION_COMPLETE
+ as long as return code is SM_ACTION_COMPLETE.
*/
PINT_sm_action PINT_state_machine_start(struct PINT_smcb *smcb, job_status_s *r)
{
- int ret;
+ PINT_sm_action ret;
+
/* run the current state action function */
ret = PINT_state_machine_invoke(smcb, r);
if (ret == SM_ACTION_COMPLETE || ret == SM_ACTION_TERMINATE)
@@ -202,7 +204,7 @@ PINT_sm_action PINT_state_machine_next(s
{
int i; /* index for transition table */
struct PINT_tran_tbl_s *transtbl;
- int ret; /* holds state action return code */
+ PINT_sm_action ret; /* holds state action return code */
if (!smcb)
{
@@ -300,7 +302,7 @@ PINT_sm_action PINT_state_machine_next(s
*/
PINT_sm_action PINT_state_machine_continue(struct PINT_smcb *smcb, job_status_s *r)
{
- int ret;
+ PINT_sm_action ret;
ret = PINT_state_machine_next(smcb, r);
More information about the Pvfs2-cvs
mailing list