[Cbe-oss-dev] [PATCH] libspe2: remove undocumented function from API layer

Gerhard Stenzel stenzel at de.ibm.com
Tue Jul 10 00:16:08 EST 2007


This patch removes a function which has never been documented and 
should therefore be not in the API layer.
The functionality of spe_callback_handler_query() can be achieved by
using spe_callback_handler_register() in update mode.

Signed-off-by: Gerhard Stenzel <stenzel at de.ibm.com>

===================================================================
Index: libspe2/libspe2.c
===================================================================
--- libspe2/libspe2.c	(revision 71)
+++ libspe2/libspe2.c	(working copy)
@@ -464,14 +464,6 @@ void * spe_callback_handler_query(unsign
 }
 
 /*
- * spe_callback_handler_update
- */
-int spe_callback_handler_update(void *handler, unsigned int callnum) 
-{
-	return _base_spe_callback_handler_update(handler, callnum);
-}
-
-/*
  * spe_info_get
  */
 int spe_cpu_info_get(int info_requested, int cpu_node) 
Index: libspe2/spebase/spebase.h
===================================================================
--- libspe2/spebase/spebase.h	(revision 71)
+++ libspe2/spebase/spebase.h	(working copy)
@@ -556,12 +556,6 @@ extern int _base_spe_callback_handler_de
  */
 extern void * _base_spe_callback_handler_query(unsigned int callnum );
 
-/*
- * spe_callback_handler_update
- */
-extern int _base_spe_callback_handler_update(void *handler, unsigned int callnum);
-
-
 /**
  * _base_spe_stop_reason_get
  * 
Index: libspe2/spebase/lib_builtin.c
===================================================================
--- libspe2/spebase/lib_builtin.c	(revision 71)
+++ libspe2/spebase/lib_builtin.c	(working copy)
@@ -120,22 +120,6 @@ void * _base_spe_callback_handler_query(
 	return handlers[callnum];
 }
 
-int _base_spe_callback_handler_update(void *handler, unsigned int callnum)
-{
-	errno = 0;
-	if (callnum > MAX_CALLNUM) {
-		errno = EINVAL;
-		return -1;
-	}
-	if (handlers[callnum] == NULL) {
-		errno = ESRCH;
-		return -1;
-	}
-	
-	handlers[callnum] = handler;
-	return 0;
-}
-
 int handle_library_callback(struct spe_context *spe, int callnum,
 		unsigned int npc)
 {
Index: libspe2/libspe2.h
===================================================================
--- libspe2/libspe2.h	(revision 71)
+++ libspe2/libspe2.h	(working copy)
@@ -207,11 +207,6 @@ int spe_callback_handler_deregister (uns
 void * spe_callback_handler_query(unsigned int callnum);
 
 /*
- * spe_callback_handler_update
- */
-int spe_callback_handler_update(void *handler, unsigned int callnum);
-
-/*
  * spe_info_get
  */
 int spe_cpu_info_get(int info_requested, int cpu_node); 

===================================================================

Best regards, 

Gerhard Stenzel, Linux on Cell Development, LTC
-------------------------------------------------------------------------------------
IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter | Geschaeftsfuehrung: Herbert Kircher
Sitz der Gesellschaft: Boeblingen | Registergericht: Amtsgericht Stuttgart, HRB 243294



More information about the cbe-oss-dev mailing list