summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-14 13:38:47 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-14 13:38:47 +0000
commitfdcb2b52b7c1fd0acc2d29f72b8316f732870bef (patch)
treea43406377773b6fb4951e54bc90741683ff80b2a /c/src/exec/score/src
parentFix typo. (diff)
downloadrtems-fdcb2b52b7c1fd0acc2d29f72b8316f732870bef.tar.bz2
Thread iterator and libgjc support submitted too early.
Diffstat (limited to 'c/src/exec/score/src')
-rw-r--r--c/src/exec/score/src/Makefile.am19
-rw-r--r--c/src/exec/score/src/objectlocaliterate.c77
-rw-r--r--c/src/exec/score/src/threadlocaliterate.c77
3 files changed, 9 insertions, 164 deletions
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 <rtems/system.h>
-#include <rtems/score/object.h>
-
-/*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 <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-
-
-/*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;
-}