From fdcb2b52b7c1fd0acc2d29f72b8316f732870bef Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 14 Jun 2000 13:38:47 +0000 Subject: Thread iterator and libgjc support submitted too early. --- c/src/exec/score/include/rtems/score/object.h | 34 ------------ c/src/exec/score/include/rtems/score/thread.h | 17 ------ c/src/exec/score/src/Makefile.am | 19 ++++--- c/src/exec/score/src/objectlocaliterate.c | 77 --------------------------- c/src/exec/score/src/threadlocaliterate.c | 77 --------------------------- 5 files changed, 9 insertions(+), 215 deletions(-) delete mode 100644 c/src/exec/score/src/objectlocaliterate.c delete mode 100644 c/src/exec/score/src/threadlocaliterate.c (limited to 'c/src/exec') diff --git a/c/src/exec/score/include/rtems/score/object.h b/c/src/exec/score/include/rtems/score/object.h index 7640dce3d3..811e33a17e 100644 --- a/c/src/exec/score/include/rtems/score/object.h +++ b/c/src/exec/score/include/rtems/score/object.h @@ -443,21 +443,6 @@ Objects_Control *_Objects_Get ( Objects_Locations *location ); -/* - * _Objects_Get_by_index - * - * DESCRIPTION: - * - * This routine sets the object pointer for the given - * object id based on the given object information structure. - */ - -Objects_Control *_Objects_Get_by_index( - Objects_Information *information, - unsigned32 index, - Objects_Locations *location -); - /* * _Objects_Get_next * @@ -474,25 +459,6 @@ Objects_Control *_Objects_Get_next( Objects_Id *next_id_p ); -/* - * _Objects_Local_iterate - * - * DESCRIPTION: - * - * This function invokes the callback function for each existing object - * of the type specified by the information block pointer. Iteration - * continues until either all objects have been processed, or, if - * break_on_error is TRUE, until an invocation of the callback returns - * something other than 0. - */ - -unsigned32 _Objects_Local_iterate( - Objects_Information *information, - unsigned32 (*callback)(Objects_Control *object, void * arg), - void * arg, - boolean break_on_error -); - /* * Pieces of object.inl are promoted out to the user */ diff --git a/c/src/exec/score/include/rtems/score/thread.h b/c/src/exec/score/include/rtems/score/thread.h index 7739925e66..4c8032f558 100644 --- a/c/src/exec/score/include/rtems/score/thread.h +++ b/c/src/exec/score/include/rtems/score/thread.h @@ -733,23 +733,6 @@ Thread_Control *_Thread_Get ( ); #endif -/* - * _Thread_Local_iterate - * - * DESCRIPTION: - * - * This function invokes the callback function for each existing thread. - * Iteration continues until either all threads have been processed, or, - * if break_on_error is TRUE, until an invocation of the callback returns - * an integer value other than 0. - */ - -unsigned32 _Thread_Local_iterate( - unsigned32 (*callback)(Thread_Control *the_thread, void * arg), - void * arg, - boolean break_on_error -); - /* * _Thread_Idle_body * diff --git a/c/src/exec/score/src/Makefile.am b/c/src/exec/score/src/Makefile.am index 97a2597cda..c348a606f1 100644 --- a/c/src/exec/score/src/Makefile.am +++ b/c/src/exec/score/src/Makefile.am @@ -27,18 +27,17 @@ OBJECT_C_FILES = object.c objectallocate.c objectallocatebyindex.c \ objectclearname.c objectcomparenameraw.c objectcomparenamestring.c \ objectcopynameraw.c objectcopynamestring.c objectextendinformation.c \ objectfree.c objectget.c objectgetbyindex.c objectgetnext.c \ - objectinitializeinformation.c objectlocaliterate.c objectnametoid.c \ - objectshrinkinformation.c + objectinitializeinformation.c objectnametoid.c objectshrinkinformation.c THREAD_C_FILES = thread.c threadchangepriority.c threadclearstate.c \ threadclose.c threadcreateidle.c threaddelayended.c threaddispatch.c \ threadevaluatemode.c threadget.c threadhandler.c threadidlebody.c \ - threadinitialize.c threadloadenv.c threadlocaliterate.c threadready.c \ - threadresettimeslice.c threadreset.c threadrestart.c threadresume.c \ - threadrotatequeue.c threadsetpriority.c threadsetstate.c \ - threadsettransient.c threadstackallocate.c threadstackfree.c \ - threadstart.c threadstartmultitasking.c threadsuspend.c \ - threadtickletimeslice.c threadyieldprocessor.c + threadinitialize.c threadloadenv.c threadready.c threadresettimeslice.c \ + threadreset.c threadrestart.c threadresume.c threadrotatequeue.c \ + threadsetpriority.c threadsetstate.c threadsettransient.c \ + threadstackallocate.c threadstackfree.c threadstart.c \ + threadstartmultitasking.c threadsuspend.c threadtickletimeslice.c \ + threadyieldprocessor.c THREADQ_C_FILES = threadq.c threadqdequeue.c threadqdequeuefifo.c \ threadqdequeuepriority.c threadqenqueue.c threadqenqueuefifo.c \ @@ -54,8 +53,8 @@ WATCHDOG_C_FILES = watchdog.c watchdogadjust.c watchdoginsert.c \ watchdogremove.c watchdogtickle.c STD_C_FILES = apiext.c chain.c $(CORE_MESSAGE_QUEUE_C_FILES) \ - $(CORE_MUTEX_C_FILES) $(CORE_SEMAPHORE_C_FILES) $(HEAP_C_FILES) \ - interr.c isr.c $(OBJECT_C_FILES) $(THREAD_C_FILES) $(THREADQ_C_FILES) \ + $(CORE_MUTEX_C_FILES) $(CORE_SEMAPHORE_C_FILES) $(HEAP_C_FILES) interr.c \ + isr.c $(OBJECT_C_FILES) $(THREAD_C_FILES) $(THREADQ_C_FILES) \ $(TOD_C_FILES) userext.c $(WATCHDOG_C_FILES) wkspace.c if HAS_MP diff --git a/c/src/exec/score/src/objectlocaliterate.c b/c/src/exec/score/src/objectlocaliterate.c deleted file mode 100644 index e4b0f28de8..0000000000 --- a/c/src/exec/score/src/objectlocaliterate.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * object iterator - * - * - * COPYRIGHT (c) 2000. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include -#include - -/*PAGE - * - * _Objects_Local_iterate - * - * DESCRIPTION: - * - * This function invokes the callback function for each existing object - * of the type specified by the information block pointer. Iteration - * continues until either all objects have been processed, or, if - * break_on_error is TRUE, until an invocation of the callback returns - * something other than 0. - * - * Input parameters: - * information: - * A pointer to an Objects_Information block. Determines the type of - * object over which to iterate. - * callback: - * A pointer to a function with the indicated signature. - * arg: - * A pointer to some arbitrary entity. Passed on to the callback. - * break_on_error - * If TRUE, stop iterating on error. - * - * Output parameters: NONE - * But callback may write into space pointed to by arg. - * - * Return value: - * 0 if successful - * Value returned by the callback otherwise. - */ - -unsigned32 _Objects_Local_iterate( - Objects_Information *information, - unsigned32 (*callback)(Objects_Control *object, void * arg), - void *arg, - boolean break_on_error -) -{ - unsigned32 result; - unsigned32 i; - Objects_Control *the_object; - - if ( !information ) - return 0; - - if ( !callback ) - return 0; - - for( i = 1; i <= information->maximum; i++ ) { - the_object = (Objects_Control *)information->local_table[i]; - if( the_object ) { - result = (*callback)( the_object, arg ); - if ( result && break_on_error ) - return result; - } - } - - return 0; -} - diff --git a/c/src/exec/score/src/threadlocaliterate.c b/c/src/exec/score/src/threadlocaliterate.c deleted file mode 100644 index a2d94fe81a..0000000000 --- a/c/src/exec/score/src/threadlocaliterate.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Thread Iterator - * - * - * COPYRIGHT (c) 2000. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include -#include -#include - - -/*PAGE - * - * _Thread_Local_iterate - * - * DESCRIPTION: - * - * This function invokes the callback function for each existing thread. - * Iteration continues until either all threads have been processed, or, - * if break_on_error is TRUE, until an invocation of the callback returns - * an integer value other than 0. - * - * Input parameters: - * callback: - * A pointer to a function with the indicated signature. - * arg: - * A pointer to some arbitrary entity. Passed on to the callback. - * break_on_error - * If TRUE, stop iterating on error. - * - * - * Output parameters: NONE - * But callback may write into space pointed to by arg. - * - * Return value: - * 0 if successful - * Value returned by the callback otherwise. - */ - -unsigned32 _Thread_Local_iterate( - unsigned32 (*callback)(Thread_Control *the_thread, void * arg), - void *arg, - boolean break_on_error -) -{ - unsigned32 class_index; - unsigned32 result; - Objects_Information *information; - - if( callback == NULL ) - return 0; - - for ( class_index = OBJECTS_CLASSES_FIRST ; - class_index <= OBJECTS_CLASSES_LAST ; - class_index++ ) { - information = _Objects_Information_table[ class_index ]; - if ( information && information->is_thread ) { - result = _Objects_Local_iterate( - information, - (unsigned32 (*)(Objects_Control *, void *))callback, - arg, - break_on_error ); - if( result && break_on_error ) - return result; - } - } - - return 0; -} -- cgit v1.2.3