GLAST/LAT >
DAQ and FSW >
FSW >
Doxygen Index >
PBS / V2-10-10
Constituent: pbs     Tag: sun-gcc
Interface Data Structures File List Data Fields Globals
TASK.c File Reference
TASK, platform independent implementation. More...
#include <stdio.h>
#include <string.h>
#include "PBS/TASK.h"
#include "TASK_pvtdefs.h"
#include "PBS/TBD.h"
#include "TBD_pvtdefs.h"
#include "PBS/TOV.h"
#include "PBS/TOC.h"
#include "PBS/MBA.h"
Include dependency graph for TASK.c:
|
Functions |
int | TASK_priority_number_compute (int priority, TASK_priority_type type, const TASK_tcb *tcb) |
| Computes a priority number, either as an absolute or based on the priority of another task.
|
int | TASK_attr_init (TASK_attr *attributes) |
| Provides a standard method of initializing the attributes block to a set of known values. These values may be platform dependent.
|
int | TASK_attr_priority_set (TASK_attr *attributes, int priority) |
| Sets the priority field in the task attributes block to the the specified value. This can be either absolute or relative to the current task's priority.
|
TASK_tcb * | TASK_cvt (void) |
| Converts an existing VXWORKs task or POSIX thread to TASK object.
|
int | TASK_pause (unsigned int nsecs) |
| Causes the calling task to wait (pause) for the specified number of nanoseconds.
|
int | TASK_rvt (void) |
| Reverts the current task back to its native self by stripping it of its TASK functionality.
|
Detailed Description
TASK, platform independent implementation.
- Author:
- JJRussell - russell@slac.stanford.edu
CVS $Id: TASK.c,v 1.6 2004/07/27 23:55:35 russell Exp $
Just a place to gather the different implementations together. The real code is in the TASK.c.xx-xxx-xxx's.
Function Documentation
int TASK_attr_init |
( |
TASK_attr * |
attributes |
) |
|
|
|
Provides a standard method of initializing the attributes block to a set of known values. These values may be platform dependent.
- Parameters:
-
| attributes | The attributes block to initialize |
- Returns:
- Status.
|
int TASK_attr_priority_set |
( |
TASK_attr * |
attributes, |
|
|
int |
priority |
|
) |
|
|
|
Sets the priority field in the task attributes block to the the specified value. This can be either absolute or relative to the current task's priority.
- Parameters:
-
| attributes | The target attributes block |
| priority | A signed integer indicating the absolute or relative priority. |
- Returns:
- The assigned priority level.
Absolute priorities numbers are always expressed in terms of the native system. |
|
Converts an existing VXWORKs task or POSIX thread to TASK object.
- Returns:
- The TASK's control block
- Warning:
- This is made for quick and dirty shell and test programming. It should never be used in production code. Use
- See also:
- TASK_convert () and
TASK_revert ().
|
int TASK_pause |
( |
unsigned int |
nsecs |
) |
|
|
|
Causes the calling task to wait (pause) for the specified number of nanoseconds.
- Parameters:
-
| nsecs | The number of nanoseconds to pause. |
- Returns:
- Status
- Warning:
- This call should only be used for debugging purposes. The range of the pause is approximately 0 to 4 seconds.
|
|
Computes a priority number, either as an absolute or based on the priority of another task.
- Parameters:
-
| priority | If the type is specified as an absolute priority number, then this number is used as is. If the type is relative, then it is a signed number. Positive numbers are interpretted as raising the priority level (even though the value of the priority number itself may be decremented) whereas negative numbers are interpreted as lowering the priority level (even though the value of the priority number itself may be incremented.) |
| type | The type or manner in which to set the priority. This can be either relative or absolulte. |
| tcb | The task control block of a reference task. This is used iff type == TASK_K_PRIORITY_TYPE_REL. If specified as NULL, then the priority of the calling task is used. |
- Returns:
- The priority number expressed in the native tasking model's scheme.
Simple utility routine to compute a priority potentially based on another task. The priority level is returned expressed in the native tasking model's scheme. If the type is an absolute priority, the priority number returned is potentially changed to keep it within bounds. |
|
Reverts the current task back to its native self by stripping it of its TASK functionality.
- Warning:
- This is made for quick and dirty shell and test programming. It should never be used in production code. Use
- See also:
- TASK_convert () and
TASK_revert (). This function should be used with its partner,
TASK_cvt().
|
Generated on Mon Nov 20 05:48:11 2006 by
1.4.4