[Cbe-oss-dev] [PATCH] libspe2: remove obsolete event API stuffs

Kazunori Asayama asayama at sm.sony.co.jp
Thu Nov 16 14:45:53 EST 2006


Attached is a patch to remove obsolete stuffs related to event API
from spebase. They are no longer needed because they moved to speevent
in ancient time.

--
(ASAYAMA Kazunori
  (asayama at sm.sony.co.jp))
t
-------------- next part --------------
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) {
@@ -72,32 +62,11 @@ int __base_spe_event_source_acquire(spe_
 	return open_if_closed(spe, fdesc);
 }
 
-void __base_spe_event_source_release(struct spe_context *spe, enum fd_name fdesc)
-{
-	close_if_open(spe, fdesc); 
-}
-
 int __base_spe_spe_dir_get(spe_context_ptr_t spe)
 {
 	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
@@ -59,9 +59,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;
@@ -71,12 +68,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;
 };
@@ -510,21 +501,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);
 			
 
 /**
@@ -535,28 +511,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
@@ -566,15 +520,6 @@ int _base_spe_stop_status_get(spe_contex
 int __base_spe_event_source_acquire(struct spe_context *spectx, enum fd_name fdesc);
 
 /**
- * __base_spe_event_source_release releases the file descriptor to the specified event source
- * 
- * @param spectx Specifies the SPE context
- * 
- * @param fdesc Specifies the event source
-  */
-void __base_spe_event_source_release(struct spe_context *spectx, enum fd_name fdesc);
-
-/**
  * _base_spe_ps_area_get returns a pointer to the start of memory mapped problem state
  * area 
  * 


More information about the cbe-oss-dev mailing list