[PVFS2-CVS]
commit by neill in pvfs2/src/client/sysint: client-state-machine.c
client-state-machine.h
CVS commit program
cvs at parl.clemson.edu
Fri May 21 11:56:58 EDT 2004
Update of /projects/cvsroot/pvfs2/src/client/sysint
In directory parlweb:/tmp/cvs-serv15433/src/client/sysint
Modified Files:
client-state-machine.c client-state-machine.h
Log Message:
- wrap id-generator code to avoid including id-generator.h directly from
pvfs2-sysint.h
Index: client-state-machine.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/client-state-machine.c,v
diff -p -u -r1.48 -r1.49
--- client-state-machine.c 20 May 2004 19:16:15 -0000 1.48
+++ client-state-machine.c 21 May 2004 14:56:58 -0000 1.49
@@ -169,7 +169,7 @@ int PINT_client_state_machine_post(
if (op_id)
{
- ret = id_gen_safe_register(op_id, (void *)sm_p);
+ ret = PINT_id_gen_safe_register(op_id, (void *)sm_p);
}
return ret;
}
@@ -213,7 +213,7 @@ int PINT_client_state_machine_test(
return ret;
}
- sm_p = id_gen_safe_lookup(op_id);
+ sm_p = PINT_id_gen_safe_lookup(op_id);
if (!sm_p)
{
return ret;
Index: client-state-machine.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/client-state-machine.h,v
diff -p -u -r1.110 -r1.111
--- client-state-machine.h 20 May 2004 17:27:48 -0000 1.110
+++ client-state-machine.h 21 May 2004 14:56:58 -0000 1.111
@@ -18,6 +18,7 @@
#include "job.h"
#include "trove.h"
#include "acache.h"
+#include "id-generator.h"
#define PINT_STATE_STACK_SIZE 3
@@ -423,6 +424,25 @@ int PINT_client_state_machine_testsome(
PVFS_sys_op_id *op_id_array,
int *op_count); /* in/out */
+/* exposed wrappers around the id-generator code */
+static inline int PINT_id_gen_safe_register(
+ PVFS_sys_op_id *new_id,
+ void *item)
+{
+ return id_gen_safe_register(new_id, item);
+}
+
+static inline void *PINT_id_gen_safe_lookup(
+ PVFS_sys_op_id id)
+{
+ return id_gen_safe_lookup(id);
+}
+
+static inline int PINT_id_gen_safe_unregister(
+ PVFS_sys_op_id id)
+{
+ return id_gen_safe_unregister(id);
+}
/* used with post call to tell the system what state machine to use
* when processing a new PINT_client_sm structure.
@@ -524,7 +544,7 @@ do {
PINT_client_sm *sm_p = (PINT_client_sm *)id_gen_safe_lookup(op_id); \
if (sm_p) \
{ \
- id_gen_safe_unregister(op_id); \
+ PINT_id_gen_safe_unregister(op_id); \
free(sm_p); \
} \
} while(0)
More information about the PVFS2-CVS
mailing list