src/occ_405/thread/test/threadtest.c
// Function Specification
//
// Name: dump_thread_info
//
// Description: Dumps information related to all scheduled threads
//
// End Function Specification
Function Specification
Name: dump_thread_info

Dumps information related to all scheduled threads

End Function Specification
Function Specification Name : dump_thread_info Dumps information related to all scheduled threads End Function Specification
void dump_thread_info(void *arg)
{
    printf("dumping thread info--------------------------\n");
    int l_rc = 0;
    SsxThreadState l_state = 0;
    SsxThreadPriority l_pri = 0;
    int l_runnable=0;
    int x=0;
    for(x=0; x < THREADS_TO_SCHEDULE; x++)
    {
        l_rc = ssx_thread_info_get(G_scheduledThreads[x],
                                    &l_state,
                                    &l_pri,
                                    &l_runnable);
        printf("Thread %p: State %x priority %x runnable %x rc %x Global index %x\n",G_scheduledThreads[x],
                                                           l_state,
                                                            l_pri,
                                                            l_runnable,
                                                            l_rc,
                                                            G_threadSchedulerIndex);
    }
}
void dump_thread_info ( void * arg ) { printf ( " \n " ) ; int l_rc = 0 ; SsxThreadState l_state = 0 ; SsxThreadPriority l_pri = 0 ; int l_runnable = 0 ; int x = 0 ; for ( x = 0 ; x < THREADS_TO_SCHEDULE ; x ++ ) { l_rc = ssx_thread_info_get ( G_scheduledThreads [ x ] , & l_state , & l_pri , & l_runnable ) ; printf ( " \n " , G_scheduledThreads [ x ] , l_state , l_pri , l_runnable , l_rc , G_threadSchedulerIndex ) ; } }
Function Specification
Name: dump_thread_info
Function Specification Name : dump_thread_info