qres_ext_data.c File Reference

Go to the source code of this file.

Data Structures

struct  qres_ext_data
 External data attached to each RR server by the QRES. More...

Typedefs

typedef struct qres_ext_data qres_ext_data_t
 External data attached to each RR server by the QRES.

Enumerations

enum  qres_slot_t { QRES_SLOT_QSUP, QRES_SLOT_QMGR, QRES_SLOT_RFU, QRES_SLOT_NUMBER }
 

Available slots for attaching custom data to each RR server.

More...

Functions

qos_rv qres_setup_qsup_for_rres (server_t *rres, qsup_server_t *qsup)
 Allocate ext_data struct, associate it to tsk and attach qsup to ext_data.
qos_rv qres_attach_to_ext_data (qres_ext_data_t *ext_data, qres_slot_t s, void *data)
 Attach to ext_data custom data at slot s, with parameter checking.
qos_rv qres_attach_data_to_rres (server_t *rres, qres_slot_t s, void *data)
 Attach to RRES server custom data at slot s.
qos_rv qres_attach_data_to_task (struct task_struct *tsk, qres_slot_t s, void *data)
 Attach to RRES server (by task) custom data at slot s.
qos_rv qres_retrieve_from_rres (server_t *rres, int s, void **data)
 Retrieve custom data at slot s from an RRES server.
static qos_rv qres_retrieve_from_task (struct task_struct *tsk, int s, void **data)
 EXPORT_SYMBOL_GPL (qres_attach_data_to_rres)
 EXPORT_SYMBOL_GPL (qres_attach_data_to_task)
 EXPORT_SYMBOL_GPL (qres_retrieve_from_rres)

Typedef Documentation

External data attached to each RR server by the QRES.

This is used for attaching to each RR server multiple pointers, by using the rres_set_ext_data and rres_get_ext_data RR functions to attach a single qres_ext_data_t instance.


Enumeration Type Documentation

Available slots for attaching custom data to each RR server.

See also:
qres_slot_t
Enumerator:
QRES_SLOT_QSUP 

Reserved to the QRES module, points qsup_server_t.

QRES_SLOT_QMGR 

Reserved to the QMGR module, points to qmgr_t.

QRES_SLOT_RFU 

Reserved for Future Use.

QRES_SLOT_NUMBER 

Num of slots: must be last value.

Definition at line 26 of file qres_ext_data.c.


Function Documentation

EXPORT_SYMBOL_GPL ( qres_retrieve_from_rres   ) 
EXPORT_SYMBOL_GPL ( qres_attach_data_to_task   ) 
EXPORT_SYMBOL_GPL ( qres_attach_data_to_rres   ) 
qos_rv qres_attach_data_to_rres ( server_t rres,
qres_slot_t  s,
void *  data 
)

Attach to RRES server custom data at slot s.

This function may only be invoked after the qres_create_server attached a qres_ext_data_t struct to the created RRES server

Definition at line 94 of file qres_ext_data.c.

References qres_attach_to_ext_data().

Referenced by qres_attach_data_to_task().

qos_rv qres_attach_data_to_task ( struct task_struct *  tsk,
qres_slot_t  s,
void *  data 
)

Attach to RRES server (by task) custom data at slot s.

This function may only be invoked after the qres_create_server attached a qres_ext_data_t struct to the created RRES server

Definition at line 98 of file qres_ext_data.c.

References QOS_E_INCONSISTENT_STATE, QOS_E_INVALID_PARAM, qres_attach_data_to_rres(), QRES_SLOT_QSUP, and rres_find_by_task().

qos_rv qres_attach_to_ext_data ( qres_ext_data_t ext_data,
qres_slot_t  s,
void *  data 
)

Attach to ext_data custom data at slot s, with parameter checking.

Definition at line 81 of file qres_ext_data.c.

References qres_ext_data::data, QOS_E_INTERNAL_ERROR, QOS_E_INVALID_PARAM, qos_log_err, QOS_OK, and QRES_SLOT_NUMBER.

Referenced by qres_attach_data_to_rres(), and qres_setup_qsup_for_rres().

qos_rv qres_retrieve_from_rres ( server_t rres,
int  s,
void **  data 
)

Retrieve custom data at slot s from an RRES server.

This function may only be invoked after the qres_create_server attached an ext_data_t struct to the created RRES server

Todo:
we want compile out all checks when DEBUG not defined

Definition at line 107 of file qres_ext_data.c.

References qres_ext_data::data, QOS_E_INTERNAL_ERROR, QOS_E_INVALID_PARAM, qos_log_err, QOS_OK, and QRES_SLOT_NUMBER.

Referenced by qres_retrieve_from_task().

static qos_rv qres_retrieve_from_task ( struct task_struct *  tsk,
int  s,
void **  data 
) [inline, static]
qos_rv qres_setup_qsup_for_rres ( server_t rres,
qsup_server_t qsup 
)

Allocate ext_data struct, associate it to tsk and attach qsup to ext_data.

Create the qres_ext_data array and attach to rres

Store the ExtData pointer into the RRES struct

Store the qsup pointer into the RRES struct

Definition at line 60 of file qres_ext_data.c.

References qres_ext_data::data, QOS_E_NO_MEMORY, qos_log_err, qos_malloc(), QOS_OK, qres_attach_to_ext_data(), QRES_SLOT_NUMBER, and QRES_SLOT_QSUP.

Generated on Mon Aug 2 22:39:17 2010 for qosres by  doxygen 1.6.3