[Cbe-oss-dev] [PATCH] libspe2: add spe_get/set_app_data to libspe.h
Brian Watt
bwatt at austin.rr.com
Thu May 31 13:52:50 EST 2007
The following patch corrects a minor problem in the
libspe.h file in the libspe12 directory by adding
declarations for both spe_get_app_data and
spe_set_app_data which removed compilation warnings.
These two entry points were adapted from libspe
project's libspe.h file.
Signed-off-by: Brian Watt <bwatt at austin.rr.com>
===================================================================
Index: libspe2/libspe12/libspe.h
===================================================================
--- libspe2/libspe12/libspe.h (revision 45)
+++ libspe2/libspe12/libspe.h (working copy)
@@ -238,6 +238,23 @@
*/
extern int __spe_get_context_fd(speid_t speid);
+/* FUNCTION: spe_set_app_data(speid, data)
+ *
+ * The spe_set_app_data function associates application specific data
with an
+ * SPE thread. Any association with previously associated data is lost
on success.
+ * On failure, any previous association is unchanged.
+ */
+extern int spe_set_app_data(speid_t speid, void* data);
+
+/* FUNCTION: spe_get_app_data(speid, p_data)
+ *
+ * The spe_get_app_data function returns the application specific data
associated
+ * with the specified SPE thread as set by spe_set_app_data. If no
application
+ * data has been associated with the specified thread, then the memory
pointed to
+ * by p_data is set to NULL.
+ */
+extern int spe_get_app_data(speid_t speid, void** p_data);
+
#ifdef __cplusplus
}
#endif
More information about the cbe-oss-dev
mailing list