[Pvfs2-cvs] commit by kunkel in pvfs2/src/io/bmi:
bmi-method-support.h bmi.c bmi.h
CVS commit program
cvs at parl.clemson.edu
Tue Aug 29 06:41:17 EDT 2006
Update of /projects/cvsroot/pvfs2/src/io/bmi
In directory parlweb1:/tmp/cvs-serv30492/src/io/bmi
Modified Files:
Tag: kunkel-branch
bmi-method-support.h bmi.c bmi.h
Log Message:
Backmerge with HEAD
Index: bmi-method-support.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/bmi/bmi-method-support.h,v
diff -p -u -r1.24 -r1.24.6.1
--- bmi-method-support.h 24 May 2006 13:24:49 -0000 1.24
+++ bmi-method-support.h 29 Aug 2006 10:41:16 -0000 1.24.6.1
@@ -79,6 +79,9 @@ struct bmi_method_ops
int (*BMI_meth_memfree) (void *,
bmi_size_t,
enum bmi_op_type);
+
+ int (*BMI_meth_unexpected_free) (void *);
+
int (*BMI_meth_post_send) (bmi_op_id_t *,
method_addr_p,
const void *,
Index: bmi.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/bmi/bmi.c,v
diff -p -u -r1.71.2.3 -r1.71.2.4
--- bmi.c 18 Aug 2006 05:12:04 -0000 1.71.2.3
+++ bmi.c 29 Aug 2006 10:41:16 -0000 1.71.2.4
@@ -1092,6 +1092,38 @@ int BMI_memfree(PVFS_BMI_addr_t addr,
return (ret);
}
+/** Acknowledge that an unexpected message has been
+ * serviced that was returned from BMI_test_unexpected().
+ *
+ * \return 0 on success, -errno on failure.
+ */
+int BMI_unexpected_free(PVFS_BMI_addr_t addr,
+ void *buffer)
+{
+ ref_st_p tmp_ref = NULL;
+ int ret = -1;
+
+ /* find a reference that matches this address */
+ gen_mutex_lock(&ref_mutex);
+ tmp_ref = ref_list_search_addr(cur_ref_list, addr);
+ if (!tmp_ref)
+ {
+ gen_mutex_unlock(&ref_mutex);
+ return (bmi_errno_to_pvfs(-EINVAL));
+ }
+ gen_mutex_unlock(&ref_mutex);
+
+ if (!tmp_ref->interface->BMI_meth_unexpected_free)
+ {
+ gossip_err("unimplemented BMI_meth_unexpected_free callback\n");
+ return bmi_errno_to_pvfs(-EOPNOTSUPP);
+ }
+ /* free the memory */
+ ret = tmp_ref->interface->BMI_meth_unexpected_free(buffer);
+
+ return (ret);
+}
+
/** Pass in optional parameters.
*
* \return 0 on success, -errno on failure.
Index: bmi.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/bmi/bmi.h,v
diff -p -u -r1.27 -r1.27.24.1
--- bmi.h 2 Aug 2005 17:56:12 -0000 1.27
+++ bmi.h 29 Aug 2006 10:41:16 -0000 1.27.24.1
@@ -111,6 +111,9 @@ int BMI_memfree(PVFS_BMI_addr_t addr,
bmi_size_t size,
enum bmi_op_type send_recv);
+int BMI_unexpected_free(PVFS_BMI_addr_t addr,
+ void *buffer);
+
int BMI_set_info(PVFS_BMI_addr_t addr,
int option,
void *inout_parameter);
More information about the Pvfs2-cvs
mailing list