GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBS / V2-12-1 > pbs / rhel6-32
#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>
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. |
CVS $Id: TASK.c,v 1.7 2011/03/24 23:05:46 apw Exp $
Just a place to gather the different implementations together. The real code is in the TASK.c.xx-xxx-xxx's.
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.
attributes | The attributes block to initialize |
References _TASK_attr::name, _TASK_attr::options, _TASK_attr::priority, _TASK_attr::stack_addr, and _TASK_attr::stack_size.
Referenced by wut_sys_connect().
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.
attributes | The target attributes block | |
priority | A signed integer indicating the absolute or relative priority. |
References _TASK_attr::priority, and TASK__priority_number_limit().
Referenced by wut_sys_connect().
TASK_tcb* TASK_cvt | ( | void | ) |
Converts an existing VXWORKs task or POSIX thread to TASK object.
TASK_revert ().
References MBA_alloc(), MBA_free(), TASK_convert(), and TASK_xtcb_sizeof().
int TASK_pause | ( | unsigned int | nsecs | ) |
Causes the calling task to wait (pause) for the specified number of nanoseconds.
nsecs | The number of nanoseconds to pause. |
References TASK_wait(), and TOV_from_nsecs().
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.
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. |
References TASK__priority_number_boost(), TASK__priority_number_limit(), TASK_K_PRIORITY_TYPE_REL, and TASK_priority_get().
int TASK_rvt | ( | void | ) |
Reverts the current task back to its native self by stripping it of its TASK functionality.
TASK_revert (). This function should be used with its partner,
References MBA_free(), TASK_revert(), and TASK_self().