Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

rk_util.h File Reference


Detailed Description

Header file for utility functions related to the TimeSys resource kernel.

Definition in file rk_util.h.

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct  rk_resource_set_usage

Typedefs

typedef rk_resource_set_usage * rk_resource_set_usage_t

Functions

rk_resource_set_t rk_resource_set_get_by_name (const char *name)
 Search for a resource set by name and return the first one encountered.

int rk_resource_set_get_usage (rk_resource_set_t rs, rk_resource_set_usage_t rsu)
 Compute the total resource usage for all the processes in a resource set.


Function Documentation

rk_resource_set_t rk_resource_set_get_by_name const char *  name  ) 
 

Search for a resource set by name and return the first one encountered.

Parameters:
name The resource set name to search for.
Returns:
A valid resource set pointer if the name was found, otherwise, NULL_RESOURCE_SET.

Definition at line 49 of file rk_util.c.

References NULL_RESOURCE_SET, require, RK_NAME_LEN, rk_resource_set_get_name(), rk_resource_set_t, and rk_resource_sets_get_list().

Referenced by RKTask::BeginCPUScheduling(), and rktProcessOptions().

Here is the call graph for this function:

int rk_resource_set_get_usage rk_resource_set_t  rs,
rk_resource_set_usage_t  rsu
 

Compute the total resource usage for all the processes in a resource set.

Currently, this is implemented by stepping through all of the processes attached to the resource set and pulling the usage information from '/proc/<pid>/stat'. Unfortunately, the standard kernel does not provide high-resolution data in the 'stat' file, so the file in the 'patch' directory before this function can be used.

See also:
rk_util/patch/tslinux-3.1-procstat.patch
Parameters:
rs The resource set to compute the resource usage for.
rsu An allocated rk_resource_set_stat_t object where the results should be placed.
Returns:
Zero on success, otherwise, an errno value.

Definition at line 75 of file rk_util.c.

References rk_resource_set_get_proclist(), and rk_resource_set_t.

Referenced by paGetAdvocate(), and sigalrm().

Here is the call graph for this function:


Generated on Mon Dec 1 16:30:12 2003 for CPU Broker by doxygen 1.3.4