[Cbe-oss-dev] [RFC, PATCH] libspe2: remove obsolete event stuffs from spebase

Kazunori Asayama asayama at sm.sony.co.jp
Thu Dec 7 17:37:20 EST 2006


I'd like to remove the follwing stuffs from the spebase implementation
because they have moved to speevent or alternative methods are
provided, and existence of these obsolete things can confuse libspe2
implementers in the future.

  - ev_pipe in spe_context_base_priv and related functions
  - stop_reason and stop_status in spe_context_base_priv, and related
    functions

Attached is a patch to remove these stuffs.

----
Index: libspe2/spebase/accessors.c
===================================================================
--- libspe2.orig/spebase/accessors.c
+++ libspe2/spebase/accessors.c
@@ -25,16 +25,6 @@
  * accessor functions for private members 
  */
 
-int _base_spe_stop_reason_get(spe_context_ptr_t spe)
-{
-	return spe->base_private->stop_reason;
-}
-
-int _base_spe_stop_status_get(spe_context_ptr_t spe)
-{
-	return spe->base_private->stop_status;
-}
-
 void* _base_spe_ps_area_get(spe_context_ptr_t spe, enum ps_area area)
 {
 	switch (area) {
@@ -82,22 +72,6 @@ int __base_spe_spe_dir_get(spe_context_p
 	return spe->base_private->fd_spe_dir;
 }
 
-/**
- * speevent users read from this end
- */
-int __base_spe_stop_event_source_get(spe_context_ptr_t spe)
-{
-	return spe->base_private->ev_pipe[1];
-}
-
-/**
- * speevent writes to this end
- */
-int __base_spe_stop_event_target_get(spe_context_ptr_t spe)
-{
-	return spe->base_private->ev_pipe[0];
-}
-
 int _base_spe_ls_size_get(spe_context_ptr_t spe)
 {
 	return LS_SIZE;
Index: libspe2/spebase/spebase.h
===================================================================
--- libspe2.orig/spebase/spebase.h
+++ libspe2/spebase/spebase.h
@@ -66,9 +66,6 @@ struct spe_context_base_priv {
 	/* SPE MFC Unit fd */
 	//int	fd_mfc;
 	
-	/* event pipes for speevent library */
-	int ev_pipe[2];
-	
 	/* Base Addresses of memory mapped SPE areas */
 	void	*psmap_mmap_base;
 	void	*mem_mmap_base;
@@ -78,12 +75,6 @@ struct spe_context_base_priv {
 	void	*signal1_mmap_base;
 	void	*signal2_mmap_base;
 	
-	/* Last spu_run return code, for example stop and signal code */
-	unsigned int 	stop_reason;
-	
-	/* Last spu_run system call status code */
-	unsigned int 	stop_status;
-	
 	/* SPE program entry point generated by elf_load() */
 	int		entry;
 };
@@ -517,21 +508,6 @@ extern void _base_spe_callback_handler_r
  * NOTE: unregistering a handler from call zero and one is ignored.
  */
 extern void _base_spe_callback_handler_deregister(unsigned int callnum );
-
-/**
- * _base_spe_stop_reason_get
- * 
- * @param       spectx       one thread for which to check why it was stopped
- * 
- * @retval 0        success - eventid and eventdata set appropriately
- * @retval 1         spe has not stopped after checking last, so no data was written
- *                  to event
- * @retval      -1         an error has happened, event was not touched, errno gets set\n
- * Possible vales for errno:\n
- * EINVAL     speid is invalid\n
- * Exxxx      what else do we need here??
- */
-int _base_spe_stop_reason_get(spe_context_ptr_t spectx);
 			
 
 /**
@@ -542,28 +518,6 @@ int _base_spe_stop_reason_get(spe_contex
 int _base_spe_mfcio_tag_status_read(spe_context_ptr_t spectx, unsigned int mask, unsigned int behavior, unsigned int *tag_status);
 
 /**
- * __base_spe_stop_event_source_get
- * 
- * @param spectx Specifies the SPE context
- */
-int __base_spe_stop_event_source_get(spe_context_ptr_t spectx);
-
-/**
- * __base_spe_stop_event_target_get
- * 
- * @param spectx Specifies the SPE context
- */
-int __base_spe_stop_event_target_get(spe_context_ptr_t spectx);
-
-/**
- * _base_spe_stop_status_get
- * 
- * @param spectx Specifies the SPE context
- * 
- */
-int _base_spe_stop_status_get(spe_context_ptr_t spectx);
-
-/**
  * __base_spe_event_source_acquire opens a file descriptor to the specified event source 
  * 
  * @param spectx Specifies the SPE context



More information about the cbe-oss-dev mailing list