RTEMS: cpukit/include/rtems/qreslib.h File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions
qreslib.h File Reference

Constants and Structures Associated with the QoS RES library in RTEMS. More...

`#include <stdint.h>`
`#include <rtems/score/schedulercbs.h>`

Go to the source code of this file.

## Data Structures
struct | qres_params_t

## Macros
#define | QOS_OK SCHEDULER_CBS_OK
#define | QOS_E_GENERIC SCHEDULER_CBS_ERROR_GENERIC
#define | QOS_E_NO_MEMORY SCHEDULER_CBS_ERROR_NO_MEMORY
#define | QOS_E_INVALID_PARAM SCHEDULER_CBS_ERROR_INVALID_PARAMETER
#define | QOS_E_UNAUTHORIZED SCHEDULER_CBS_ERROR_UNAUTHORIZED
#define | QOS_E_UNIMPLEMENTED SCHEDULER_CBS_ERROR_UNIMPLEMENTED
#define | QOS_E_MISSING_COMPONENT SCHEDULER_CBS_ERROR_MISSING_COMPONENT
#define | QOS_E_INCONSISTENT_STATE SCHEDULER_CBS_ERROR_INCONSISTENT_STATE
#define | QOS_E_SYSTEM_OVERLOAD SCHEDULER_CBS_ERROR_SYSTEM_OVERLOAD
#define | QOS_E_INTERNAL_ERROR SCHEDULER_CBS_ERROR_INTERNAL_ERROR
#define | QOS_E_NOT_FOUND SCHEDULER_CBS_ERROR_NOT_FOUND
#define | QOS_E_FULL SCHEDULER_CBS_ERROR_FULL
#define | QOS_E_EMPTY SCHEDULER_CBS_ERROR_EMPTY
#define | QOS_E_NOSERVER SCHEDULER_CBS_ERROR_NOSERVER

## Typedefs
typedef int | qos_rv
typedef Scheduler_CBS_Server_id | qres_sid_t
typedef rtems_id | tid_t
typedef time_t | qres_time_t
typedef time_t | qres_atime_t

## Functions
RTEMS_INLINE_ROUTINE qos_rv | qres_init (void)
| qres init
RTEMS_INLINE_ROUTINE qos_rv | qres_cleanup (void)
| qres cleanup
RTEMS_INLINE_ROUTINE qos_rv | qres_create_server (qres_params_t *params, qres_sid_t *server_id)
| qres create server
RTEMS_INLINE_ROUTINE qos_rv | qres_attach_thread (qres_sid_t server_id, pid_t pid, tid_t task_id)
| qres attach thread
RTEMS_INLINE_ROUTINE qos_rv | qres_detach_thread (qres_sid_t server_id, pid_t pid, tid_t task_id)
| qres detach thread
RTEMS_INLINE_ROUTINE qos_rv | qres_destroy_server (qres_sid_t server_id)
| qres destroy server
RTEMS_INLINE_ROUTINE qos_rv | qres_get_sid (pid_t pid, tid_t task_id, qres_sid_t *server_id)
| qres get server id
RTEMS_INLINE_ROUTINE qos_rv | qres_get_params (qres_sid_t server_id, qres_params_t *params)
| qres get params
RTEMS_INLINE_ROUTINE qos_rv | qres_set_params (qres_sid_t server_id, qres_params_t *params)
| qres set params
RTEMS_INLINE_ROUTINE qos_rv | qres_get_exec_time (qres_sid_t server_id, qres_time_t *exec_time, qres_atime_t *abs_time)
| qres get execution time
RTEMS_INLINE_ROUTINE qos_rv | qres_get_curr_budget (qres_sid_t server_id, qres_time_t *current_budget)
| qres get current budget
RTEMS_INLINE_ROUTINE qos_rv | qres_get_appr_budget (qres_sid_t server_id, qres_time_t *appr_budget)
| qres get approved budget

## Detailed Description

Constants and Structures Associated with the QoS RES library in RTEMS.

This include file contains all the constants and structures associated with the QoS RES library in RTEMS.

Note
  The library is available only together with CBS scheduler.

## Typedef Documentation

## ◆ qos_rv

typedef int qos_rv

Return values.

## ◆ qres_atime_t

typedef time_t qres_atime_t

Absolute time value

## ◆ qres_sid_t

typedef Scheduler_CBS_Server_id qres_sid_t

Server id.

## ◆ qres_time_t

typedef time_t qres_time_t

Time value.

## ◆ tid_t

typedef rtems_id tid_t

Task id.

## Function Documentation

## ◆ qres_attach_thread()

RTEMS_INLINE_ROUTINE qos_rv qres_attach_thread | ( | qres_sid_t | server_id,
|  | pid_t | pid,
|  | tid_t | task_id
| ) |  |

qres attach thread

Attach a task to an already existing server.

Returns
  status code.

## ◆ qres_cleanup()

RTEMS_INLINE_ROUTINE qos_rv qres_cleanup | ( | void |  | ) |

qres cleanup

Cleanup resources associated to the QoS RES Library.

Returns
  status code.

## ◆ qres_create_server()

RTEMS_INLINE_ROUTINE qos_rv qres_create_server | ( | qres_params_t * | params,
|  | qres_sid_t * | server_id
| ) |  |

qres create server

Create a new server with specified parameters.

Returns
  status code.

## ◆ qres_destroy_server()

RTEMS_INLINE_ROUTINE qos_rv qres_destroy_server | ( | qres_sid_t | server_id | ) |

qres destroy server

Detach all tasks from a server and destroy it.

Returns
  status code.

## ◆ qres_detach_thread()

RTEMS_INLINE_ROUTINE qos_rv qres_detach_thread | ( | qres_sid_t | server_id,
|  | pid_t | pid,
|  | tid_t | task_id
| ) |  |

qres detach thread

Detach from the QoS Server.

Returns
  status code.

## ◆ qres_get_appr_budget()

RTEMS_INLINE_ROUTINE qos_rv qres_get_appr_budget | ( | qres_sid_t | server_id,
|  | qres_time_t * | appr_budget
| ) |  |

qres get approved budget

Retrieve the budget that has been approved for the subsequent server instances.

Returns
  status code.

## ◆ qres_get_curr_budget()

RTEMS_INLINE_ROUTINE qos_rv qres_get_curr_budget | ( | qres_sid_t | server_id,
|  | qres_time_t * | current_budget
| ) |  |

qres get current budget

Retrieve remaining budget for the current server instance.

Returns
  status code.

## ◆ qres_get_exec_time()

RTEMS_INLINE_ROUTINE qos_rv qres_get_exec_time | ( | qres_sid_t | server_id,
|  | qres_time_t * | exec_time,
|  | qres_atime_t * | abs_time
| ) |  |

qres get execution time

Retrieve time info relative to the current server.

Returns
  status code.

## ◆ qres_get_params()

RTEMS_INLINE_ROUTINE qos_rv qres_get_params | ( | qres_sid_t | server_id,
|  | qres_params_t * | params
| ) |  |

qres get params

Retrieve QoS scheduling parameters.

Returns
  status code.

## ◆ qres_get_sid()

RTEMS_INLINE_ROUTINE qos_rv qres_get_sid | ( | pid_t | pid,
|  | tid_t | task_id,
|  | qres_sid_t * | server_id
| ) |  |

qres get server id

Get a thread server id, or QOS_E_NOT_FOUND if it is not attached to any server.

Returns
  status code.

## ◆ qres_init()

RTEMS_INLINE_ROUTINE qos_rv qres_init | ( | void |  | ) |

qres init

Initializes the QoS RES library.

Returns
  status code.

## ◆ qres_set_params()

RTEMS_INLINE_ROUTINE qos_rv qres_set_params | ( | qres_sid_t | server_id,
|  | qres_params_t * | params
| ) |  |

qres set params

Change QoS scheduling parameters.

Returns
  status code.