GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBS / V2-12-1 > pbs / rhel4-32


Interface   Data Structures   File List   Data Fields   Globals  

TASK.ih File Reference

Task/Thread facility, a portable interface between VxWorks and POSIX implementations, inline version. More...

#include <PBI/Inline.h>
#include <PBI/Attribute.h>
#include <PBS/TASK.h>
#include <PBS/TBD.ih>
#include <PBI/TBD_id.h>

Functions

TASK__EXP_PROTO int TASK__priority_number_boost (int priority, int boost) ATTR_UNUSED_OK
 Boosts the priority number by the boost.
TASK__EXP_PROTO int TASK__priority_number_limit (int priority) ATTR_UNUSED_OK
 Limits the priority number to fit within the specified bounds.
TASK__EXP_PROTO TASK_tcbTASK__self (void) ATTR_UNUSED_OK
 Returns the tcb of the calling task.


Detailed Description

Task/Thread facility, a portable interface between VxWorks and POSIX implementations, inline version.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: TASK.ih,v 1.5 2011/03/24 23:05:44 apw Exp $

Function Documentation

TASK__EXP_FNC int TASK__priority_number_boost ( int  priority,
int  boost 
)

Boosts the priority number by the boost.

Parameters:
priority The priority number to boost
boost The amount to boost the priority number
Returns:
The boosted priority. This will be a number between the minimum, TASK_K_PRIORITY_MIN, and maximum, TASK_K_PRIORITY_MAX allowed priority numbers.
The specified priority number is boosted by boost. A task assigned a higher priority will run before a task with a lower priority. On some platforms were the highest priority tasks run with a lower priority number, the actual priority number will, in fact, decrease.

The boost can be specified as a positive or negative number. Positive boosts will always result in a priority number that raises a task's absolute priority. Negative numbers will always result in a priority number that lowers a task's priority number.

In all cases the routine will limit the resulting priority between the minimum, TASK_K_PRIORITY_MIN and TASK_K_PRIORITY_MAX numbers.

References TASK__priority_number_limit().

Referenced by TASK_priority_number_compute().

TASK__EXP_FNC int TASK__priority_number_limit ( int  priority  ) 

Limits the priority number to fit within the specified bounds.

Parameters:
priority The priority number to limit.
Returns:
The limit priority number

References TASK_K_PRIORITY_LIMITS_MAX, and TASK_K_PRIORITY_LIMITS_MIN.

Referenced by TASK__priority_number_boost(), TASK_attr_priority_set(), and TASK_priority_number_compute().

TASK__EXP_FNC TASK_tcb * TASK__self ( void   ) 

Returns the tcb of the calling task.

Returns:
The tcb of the calling task

References TBD__get(), and TBD__locate().

Referenced by TASK_resume(), TASK_suspend(), and TASK_wait().


Generated on Sat Apr 9 18:27:08 2011 by  doxygen 1.5.8