threadinfo.c File Reference

L4-specific functions for getting thread information. More...

#include <l4/util/rdtsc.h>
#include <l4/log/l4log.h>
#include <l4/names/libnames.h>
#include "threadinfo.h"
#include "service.h"
#include "debug.h"

Defines

#define DIRENT_BUF_SIZE   4096

Functions

int get_thread_info (thread_t tid, thread_info_t *thread, thread_t *next)
 Return prio and time of a given pid.
int get_thread_name (thread_info_t *thread)
 Return name of a thread.
int get_thread_values (load_display_t *disp)
 Read thread-values into load-display struct.


Detailed Description

L4-specific functions for getting thread information.

Date:
01/19/2004
Author:
Jork Loeser <jork.loeser@inf.tu-dresden.de>

Function Documentation

int get_thread_info ( thread_t  tid,
thread_info_t *  thread,
thread_t *  next 
)

Return prio and time of a given pid.

This function fills: tid, prio, abstime

Returns:
0 on success, !0 else
Return values:
next contains the next thread-id

int get_thread_name ( thread_info_t *  thread  ) 

Return name of a thread.

This function fills: name

Returns:
1 on error, 0 else

int get_thread_values ( load_display_t *  disp  ) 

Read thread-values into load-display struct.

This function reads the current thread information into the given struct. The entries are read from the /proc filesystem. This functions only modifies the following arguments:

disp->list list of thread-infos, unsorted

Return values:
disp->list_size number of valid elements in list
disp->array array of thread-infos, tid-sorted
disp->array_size number of allocated array-elements
list and array are allocated as needed, reusing previously allocated fields.

Precondition:
Not reentrant, Must not be called in parallel.

References check_list(), get_thread_info(), and get_thread_name().


Generated on Wed Apr 11 06:39:34 2012 for JTop - Top for DROPS by  doxygen 1.5.6