OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [libmisc/] [monitor/] [mon-manager.c] - Rev 738

Go to most recent revision | Compare with Previous | Blame | View Log

/*
 * RTEMS Monitor "manager" support.
 * Used to traverse object (chain) lists and print them out.
 *
 *  $Id: mon-manager.c,v 1.2 2001-09-27 12:01:43 chris Exp $
 */
 
#include <rtems.h>
#include <rtems/monitor.h>
 
#include <stdio.h>
 
/*
 * "next" routine for all objects that are RTEMS manager objects
 */
 
void *
rtems_monitor_manager_next(
    void      *table_void,
    void      *canonical,
    rtems_id  *next_id
)
{
    Objects_Information     *table = table_void;
    rtems_monitor_generic_t *copy;
    Objects_Control         *object = 0;
    Objects_Locations        location;
 
    /*
     * When we are called, it must be local
     */
 
    if ( ! _Objects_Is_local_id(*next_id))
        goto done;
 
    object = _Objects_Get_next(table, *next_id, &location, next_id);
 
    if (object)
    {
        copy = (rtems_monitor_generic_t *) canonical;
        copy->id = object->id;
        _Objects_Copy_name_raw(object->name, &copy->name, sizeof(copy->name));
    }    
 
done:
    return object;
}
 
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.