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

D. Herrendoerfer d.herrendoerfer at herrendoerfer.name
Tue Jul 17 16:13:17 EST 2007


Added. 

Thank you very much.

D.Herrendoerfer

On Mon, 2007-07-09 at 16:16 +0200, Gerhard Stenzel wrote:
> 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
> _______________________________________________
> cbe-oss-dev mailing list
> cbe-oss-dev at ozlabs.org
> https://ozlabs.org/mailman/listinfo/cbe-oss-dev




More information about the cbe-oss-dev mailing list