qos_debug.h File Reference

Space-Independent debugging functions. More...

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

Go to the source code of this file.

Data Structures

struct  __qos_rv
 The QoS Library return value, either QOS_OK or one of the QOS_E_error codes. More...

Defines

#define debug_print   fprintf
#define DBG_LEV
#define DBG_DEV   stderr,
#define QOS_FFLUSH   fflush(stderr)
#define DBG_TIME_FORMAT
#define DBG_TIME
#define atomic_t   int
#define ATOMIC_INIT(x)   (x)
#define atomic_inc_return(p)   (++(*(p)))
#define MAX_INDENT_LEVEL   32
#define _min(a, b)   ((a) < (b) ? (a) : (b))
#define _max(a, b)   ((a) > (b) ? (a) : (b))
#define pad   "+ + + + + + + + + + + + + + + + "
#define qos_log_str(level, str, msg, args...)
 For internal use only.
#define qos_log_simple(level, msg, args...)
 Log a message without function name and extra information.
#define QOS_LEVEL_NODEBUG   0
 No debug: no log messages are generated, except the ones generated through qos_log_crit().
#define QOS_LEVEL_ERROR   1
 Error messages: always reported if QOS_DEBUG_LEVEL >= 1.
#define QOS_LEVEL_WARN   2
 Warning messages: reported only if QOS_DEBUG_LEVEL >= 2.
#define QOS_LEVEL_INFO   3
 Information messages: reported only if QOS_DEBUG_LEVEL >= 3.
#define QOS_LEVEL_DEBUG   4
 Debug messages: reported only if QOS_DEBUG_LEVEL >= 4.
#define QOS_LEVEL_VERB   8
 Verbose messages: reported only if QOS_DEBUG_LEVEL >= 8.
#define QOS_DEBUG_LEVEL   QOS_LEVEL_WARN
 QOS_DEBUG_LEVEL sets the verbosity level of debug messages (see QOS_DEBUG_xx constants for details).
#define qos_log(level, msg, args...)   qos_log_str(level,"",msg,##args)
 Log a message with a specified level.
#define qos_log_err(msg, args...)   qos_log_str(QOS_LEVEL_ERROR, "<ERR> ",msg,##args)
 Log an error message.
#define qos_log_warn(msg, args...)   qos_log_str(QOS_LEVEL_WARN, "<WRN> ",msg,##args)
 Log a warning message.
#define qos_log_info(msg, args...)   qos_log_str(QOS_LEVEL_INFO, "<INF> ",msg,##args)
 Log an informative message.
#define qos_log_debug(msg, args...)   qos_log_str(QOS_LEVEL_DEBUG, "<DBG> ",msg,##args)
 Log a debugging message.
#define qos_log_verb(msg, args...)   qos_log_str(QOS_LEVEL_VERB, "<VRB> ",msg,##args)
 Log a verbose debugging message.
#define qos_log_var(level, __var_name, __var_type)   qos_log(level, #__var_name ": " __var_type, __var_name)
 Log a variable.
#define qos_log_crit(msg, args...)
 Log a critical error: always reported.
#define DUMP_STACK   do { qos_dump_stack(); } while (0)
#define qos_chk_do_msg(cond, stmt, msg, args...)
#define qos_chk_do(cond, stmt)   qos_chk_do_msg(cond, stmt, "")
#define qos_chk_msg(cond, msg, args...)   qos_chk_do_msg(cond, , msg, ##args)
 Evaluate cond and log a custom message with args if it is not satisfied.
#define qos_chk(cond)   qos_chk_do(cond, )
 Evaluate condition and log a warning message if it is not satisfied.
#define qos_chk_rv(cond, rv)   qos_chk_do(cond, return rv)
 Evaluate condition, and, if unsatisfied, then log a warning message and return from current function.
#define qos_return_if_cond(cond, rv, msg, args...)
 Evaluate cond.
#define qos_chk_ok_do(expr, stmt)
#define qos_chk_ok(expr)   qos_chk_ok_do(expr, )
 Evaluate expr and log a warning message with stringified error if it does not evaluate to QOS_OK.
#define qos_chk_ok_ret(expr)
 Evaluate expr once and, if it does not evaluate to QOS_OK, then log a warning message with the stringified error and return it to the caller.
#define qos_chk_go(cond, lab)   qos_chk_do(cond,goto lab)
 Evaluate cond and, if it is not satisfied, log a warning and go to label lab.
#define qos_chk_go_msg(cond, lab, msg, args...)   qos_chk_do_msg(cond,goto lab,msg,##args)
#define qos_debug_enabled_for(lev)   (QOS_DEBUG_LEVEL >= (lev))
 Check if debug is enabled for (at least) the specified level.
#define qos_chk_exit(cond)
 Evaluate cond and cause exit(-1) if it is not satisfied.
#define qos_chk_ok_exit(expr)   qos_chk_ok_do(expr, exit(-1))
 Evaluate expr and, if it does not evaluate to QOS_OK, prints the stringified error and causes exit(-1).

Functions

void qos_dump_stack (void)
char * qos_strerror (qos_rv err)
 Convert a QOS_E_* error code into a string.

Variables

QOS_LEVEL_DEBUG atomic_t qos_log_msg_id
 This is used to detect loss of messages.
int indent_lev
 This is used to highlight run-time nesting level of functions logging messages, through appropriate indentation.
char * func_names [MAX_INDENT_LEVEL]

QoS Library success and error return values



#define qos_rv_int(rv)   ((int) (long) (rv))
#define qos_int_rv(err)   ((qos_rv) (long) err)
#define QOS_OK   qos_int_rv(0)
 Operation successfully completed.
#define QOS_E_GENERIC   qos_int_rv(-16)
 Unspecified generic error.
#define QOS_E_NO_MEMORY   qos_int_rv(-17)
 Memory insufficient for the operation.
#define QOS_E_INVALID_PARAM   qos_int_rv(-18)
 Invalid input parameter(s).
#define QOS_E_UNAUTHORIZED   qos_int_rv(-19)
 Operation has not been authorized according to the configured security policy.
#define QOS_E_UNIMPLEMENTED   qos_int_rv(-20)
 Operation is not (yet) implemented.
#define QOS_E_MISSING_COMPONENT   qos_int_rv(-21)
 Dynamic loadable component not found, e.g.
#define QOS_E_INCONSISTENT_STATE   qos_int_rv(-22)
 Internal state inconsistent with operation.
#define QOS_E_SYSTEM_OVERLOAD   qos_int_rv(-23)
 Request rejected due to a temporary system overload.
#define QOS_E_INTERNAL_ERROR   qos_int_rv(-24)
 Internal error: report to authors, please.
#define QOS_E_NOT_FOUND   qos_int_rv(-25)
 Operation could not be completed because the reservation server could not be found.
#define QOS_E_FULL   qos_int_rv(-26)
 Operation could not be completed because the object was "full".
#define QOS_E_EMPTY   qos_int_rv(-27)
 Operation could not be completed because the object was "empty".
#define QOS_E_NOSERVER   QOS_E_NOT_FOUND
 Here for backward compatibility, will be removed in future releases.
typedef struct __qos_rvqos_rv
 The QoS Library return value, either QOS_OK or one of the QOS_E_error codes.

Detailed Description

Space-Independent debugging functions.

Most macros in this file may be called for logging or debugging both from kernel-space and from user-space. They automatically log messages with printk or fprintf(stderr, ...).

Definition in file qos_debug.h.


Define Documentation

#define _max ( a,
 )     ((a) > (b) ? (a) : (b))

Definition at line 141 of file qos_debug.h.

#define _min ( a,
 )     ((a) < (b) ? (a) : (b))

Definition at line 140 of file qos_debug.h.

#define atomic_inc_return ( p   )     (++(*(p)))

Definition at line 113 of file qos_debug.h.

#define ATOMIC_INIT (  )     (x)

Definition at line 112 of file qos_debug.h.

#define atomic_t   int

Definition at line 111 of file qos_debug.h.

#define DBG_DEV   stderr,

Definition at line 105 of file qos_debug.h.

#define DBG_LEV

Definition at line 104 of file qos_debug.h.

#define DBG_TIME

Definition at line 108 of file qos_debug.h.

#define DBG_TIME_FORMAT

Definition at line 107 of file qos_debug.h.

#define debug_print   fprintf

Definition at line 103 of file qos_debug.h.

#define DUMP_STACK   do { qos_dump_stack(); } while (0)

Definition at line 251 of file qos_debug.h.

Referenced by ready_queue_add().

#define MAX_INDENT_LEVEL   32

Definition at line 128 of file qos_debug.h.

#define pad   "+ + + + + + + + + + + + + + + + "

Definition at line 143 of file qos_debug.h.

#define qos_chk ( cond   )     qos_chk_do(cond, )

Evaluate condition and log a warning message if it is not satisfied.

Condition is always evaluated, independently of debug settings.

Definition at line 275 of file qos_debug.h.

Referenced by _rres_cleanup_server(), qres_find_by_rres(), rres_detach_task(), rres_edf_cleanup(), rres_schedule(), and tasklist_cleanup().

#define qos_chk_do ( cond,
stmt   )     qos_chk_do_msg(cond, stmt, "")
#define qos_chk_do_msg ( cond,
stmt,
msg,
args...   ) 
Value:
do {            \
    if (!(cond)) {                                              \
      qos_log_crit("ASSERTION '" #cond "' FAILED "                      \
                   "at line %d of file %s: " msg, __LINE__, __FILE__, ##args); \
      stmt;                                                             \
    }                                                           \
} while (0)

Definition at line 254 of file qos_debug.h.

#define qos_chk_exit ( cond   ) 
Value:
do {                                            \
  int ok = (cond);                                                      \
  if (! ok) {                                                           \
    qos_log_err("ASSERTION FAILED: '" #cond "' at line %d of file %s.",\
             __LINE__, __FILE__);                                       \
    exit(-1);                                                           \
  }                                                                     \
} while (0)

Evaluate cond and cause exit(-1) if it is not satisfied.

Only available in user-space.

Definition at line 350 of file qos_debug.h.

Referenced by data_write_timestamps(), and main().

#define qos_chk_go ( cond,
lab   )     qos_chk_do(cond,goto lab)

Evaluate cond and, if it is not satisfied, log a warning and go to label lab.

Allows to specify a custom printf-like format message with arguments. Condition is always evaluated, independently of debug settings.

Definition at line 335 of file qos_debug.h.

Referenced by start_periodic().

#define qos_chk_go_msg ( cond,
lab,
msg,
args...   )     qos_chk_do_msg(cond,goto lab,msg,##args)

Definition at line 337 of file qos_debug.h.

Referenced by qsup_get_avail_bw(), qsup_get_avail_gua_bw(), and test_rres_init_module().

#define qos_chk_msg ( cond,
msg,
args...   )     qos_chk_do_msg(cond, , msg, ##args)

Evaluate cond and log a custom message with args if it is not satisfied.

Allows to specify a custom printf-like format message with arguments. Condition is always evaluated, independently of debug settings.

Definition at line 269 of file qos_debug.h.

#define qos_chk_ok ( expr   )     qos_chk_ok_do(expr, )

Evaluate expr and log a warning message with stringified error if it does not evaluate to QOS_OK.

Expression is always evaluated, independently of debug settings.

Definition at line 313 of file qos_debug.h.

Referenced by iris_hr_reactive_timer_handler(), rres_cleanup_module(), rres_fork_hook(), rres_unblock_hook(), and test_rres_init_module().

#define qos_chk_ok_do ( expr,
stmt   ) 
Value:
do {                                   \
  qos_rv __rv = (expr);                                                 \
  if (__rv != QOS_OK) {                                                 \
    qos_log_crit("ASSERTION FAILED: '" #expr " = %s' at line %d of file %s.",\
             qos_strerror(__rv), __LINE__, __FILE__);                   \
    DUMP_STACK;                                                         \
    stmt;                                                               \
  }                                                                     \
} while (0)

Definition at line 298 of file qos_debug.h.

Referenced by job_fn(), job_fn_setup(), main(), qres_get_appr_budget(), qres_get_curr_budget(), qres_get_deadline(), qres_get_next_budget(), qres_get_weight(), qsup_get_available_bandwidth(), qsup_reserve_spare(), rres_cleanup_hook(), and rres_detach_task().

#define qos_chk_ok_exit ( expr   )     qos_chk_ok_do(expr, exit(-1))

Evaluate expr and, if it does not evaluate to QOS_OK, prints the stringified error and causes exit(-1).

Only available in user-space

Definition at line 363 of file qos_debug.h.

Referenced by f(), main(), main_body(), and main_loop().

#define qos_chk_ok_ret ( expr   ) 
Value:
do {            \
  qos_rv __rv = (expr);                         \
  if (__rv != QOS_OK) {                         \
    qos_log_crit("Check failed: '" #expr " = %s' at line %d of file %s.",\
       qos_strerror(__rv), __LINE__, __FILE__); \
    DUMP_STACK;                                 \
    return __rv;                                \
  }                                             \
} while (0)

Evaluate expr once and, if it does not evaluate to QOS_OK, then log a warning message with the stringified error and return it to the caller.

Expression is always evaluated, independently of debug settings.

Definition at line 320 of file qos_debug.h.

Referenced by qos_func_define(), qres_cleanup(), qres_get_bandwidth(), qsup_init_ks(), qsup_init_server(), rres_activate_nosched(), rres_attach_all_tasks_nosched(), rres_attach_task_nosched(), rres_check_destroy(), rres_create_server(), rres_destroy_server(), rres_detach_all_tasks_nosched(), rres_detach_task_nosched(), rres_init(), rres_init_server(), and rres_move_nosched().

#define qos_chk_rv ( cond,
rv   )     qos_chk_do(cond, return rv)

Evaluate condition, and, if unsatisfied, then log a warning message and return from current function.

Condition is always evaluated, independently of debug settings.

Definition at line 283 of file qos_debug.h.

Referenced by qos_func_define(), qres_attach_thread(), qres_create_server(), qres_destroy_server(), qres_detach_thread(), qres_get_exec_time(), qres_get_params(), qres_get_sid(), qres_set_bandwidth(), qres_set_params(), qres_set_weight(), qsup_add_group_rule(), qsup_add_level_rule(), qsup_add_user_rule(), qsup_find_constraint(), rres_create_server(), and rres_move_nosched().

#define qos_debug_enabled_for ( lev   )     (QOS_DEBUG_LEVEL >= (lev))

Check if debug is enabled for (at least) the specified level.

Definition at line 340 of file qos_debug.h.

Referenced by rres_init_server().

#define QOS_DEBUG_LEVEL   QOS_LEVEL_WARN

QOS_DEBUG_LEVEL sets the verbosity level of debug messages (see QOS_DEBUG_xx constants for details).

QOS_DEBUG_LEVEL is set by default to 1 (warnings and errors)

Definition at line 216 of file qos_debug.h.

#define QOS_E_EMPTY   qos_int_rv(-27)

Operation could not be completed because the object was "empty".

Definition at line 63 of file qos_debug.h.

Referenced by kal_eheap_t().

#define QOS_E_FULL   qos_int_rv(-26)

Operation could not be completed because the object was "full".

Definition at line 61 of file qos_debug.h.

Referenced by kal_eheap_t().

#define QOS_E_GENERIC   qos_int_rv(-16)

Unspecified generic error.

Definition at line 40 of file qos_debug.h.

Referenced by qos_dev_register(), qres_cleanup(), qres_module_exists(), qsup_cleanup(), start_periodic(), and wait_periodic().

#define QOS_E_INCONSISTENT_STATE   qos_int_rv(-22)

Internal state inconsistent with operation.

Definition at line 53 of file qos_debug.h.

Referenced by main(), qres_attach_data_to_task(), qres_cleanup(), qres_retrieve_from_task(), qsup_cleanup_server(), qsup_reserve_spare(), and rres_init_server().

#define QOS_E_INTERNAL_ERROR   qos_int_rv(-24)
#define QOS_E_INVALID_PARAM   qos_int_rv(-18)
#define QOS_E_MISSING_COMPONENT   qos_int_rv(-21)

Dynamic loadable component not found, e.g.

kernel module

Definition at line 51 of file qos_debug.h.

Referenced by qres_get_servers(), qres_init(), and qsup_init().

#define QOS_E_NO_MEMORY   qos_int_rv(-17)
#define QOS_E_NOSERVER   QOS_E_NOT_FOUND

Here for backward compatibility, will be removed in future releases.

Deprecated:

Definition at line 68 of file qos_debug.h.

#define QOS_E_NOT_FOUND   qos_int_rv(-25)

Operation could not be completed because the reservation server could not be found.

Definition at line 59 of file qos_debug.h.

Referenced by qos_func_define().

#define QOS_E_SYSTEM_OVERLOAD   qos_int_rv(-23)

Request rejected due to a temporary system overload.

Definition at line 55 of file qos_debug.h.

Referenced by qsup_init_server(), rres_init_server(), rres_set_budget(), and rres_set_params().

#define QOS_E_UNAUTHORIZED   qos_int_rv(-19)

Operation has not been authorized according to the configured security policy.

Definition at line 47 of file qos_debug.h.

Referenced by main(), qos_func_define(), qsup_gw_ks(), and qsup_init_server().

#define QOS_E_UNIMPLEMENTED   qos_int_rv(-20)

Operation is not (yet) implemented.

Definition at line 49 of file qos_debug.h.

Referenced by qos_func_define(), and rres_init_server().

#define QOS_FFLUSH   fflush(stderr)

Definition at line 106 of file qos_debug.h.

#define qos_int_rv ( err   )     ((qos_rv) (long) err)
#define QOS_LEVEL_DEBUG   4

Debug messages: reported only if QOS_DEBUG_LEVEL >= 4.

Report debugging information useful for components developers themselves.

Definition at line 202 of file qos_debug.h.

Referenced by rres_init_server().

#define QOS_LEVEL_ERROR   1

Error messages: always reported if QOS_DEBUG_LEVEL >= 1.

Used to report an unexpected condition that is at risk of compromising component functionality.

Definition at line 181 of file qos_debug.h.

Referenced by rres_get_exec_time().

#define QOS_LEVEL_INFO   3

Information messages: reported only if QOS_DEBUG_LEVEL >= 3.

Used to report useful information for the users, for example to report where and why specifically a failure occurred, in addition to the user-level error code that comes as a consequence.

Definition at line 196 of file qos_debug.h.

#define QOS_LEVEL_NODEBUG   0

No debug: no log messages are generated, except the ones generated through qos_log_crit().

Definition at line 174 of file qos_debug.h.

#define QOS_LEVEL_VERB   8

Verbose messages: reported only if QOS_DEBUG_LEVEL >= 8.

Report pedantic debugging information.

Definition at line 208 of file qos_debug.h.

Referenced by rres_cleanup().

#define QOS_LEVEL_WARN   2

Warning messages: reported only if QOS_DEBUG_LEVEL >= 2.

Used to report a condition that does not compromise a component functionality, but may possibly be a symptom of strange behaviours.

Definition at line 188 of file qos_debug.h.

#define qos_log ( level,
msg,
args...   )     qos_log_str(level,"",msg,##args)

Log a message with a specified level.

Definition at line 220 of file qos_debug.h.

Referenced by rres_cleanup(), and rres_get_exec_time().

#define qos_log_crit ( msg,
args...   ) 
#define qos_log_debug ( msg,
args...   )     qos_log_str(QOS_LEVEL_DEBUG, "<DBG> ",msg,##args)
#define qos_log_err ( msg,
args...   )     qos_log_str(QOS_LEVEL_ERROR, "<ERR> ",msg,##args)
#define qos_log_info ( msg,
args...   )     qos_log_str(QOS_LEVEL_INFO, "<INF> ",msg,##args)

Log an informative message.

Definition at line 229 of file qos_debug.h.

Referenced by qos_func_define(), qres_init_module(), qsup_dev_register(), and rres_cleanup_module().

#define qos_log_simple ( level,
msg,
args...   ) 
Value:
do {            \
  if ((level) <= QOS_DEBUG_LEVEL) {   \
    debug_print(DBG_LEV DBG_DEV msg "\n", ##args);  \
    QOS_FFLUSH;         \
  }           \
} while (0)

Log a message without function name and extra information.

Definition at line 163 of file qos_debug.h.

#define qos_log_str ( level,
str,
msg,
args...   ) 
Value:
do {                                                            \
  int __level = (level);                                        \
  if (__level <= QOS_DEBUG_LEVEL && __level <= QOS_GLOBAL_LEVEL) {  \
    debug_print(DBG_LEV DBG_DEV DBG_TIME_FORMAT                         \
                "[%6d]" "[%.24s%*s]" str " %.*s" msg "\n",      \
                DBG_TIME                                        \
                atomic_inc_return(&qos_log_msg_id), __func__,   \
                24-_min(24, (int)sizeof(__func__)-1), "",       \
                2*indent_lev, pad, ##args);                     \
    QOS_FFLUSH;                                                 \
  }                                                             \
} while (0)

For internal use only.

Definition at line 146 of file qos_debug.h.

#define qos_log_var ( level,
__var_name,
__var_type   )     qos_log(level, #__var_name ": " __var_type, __var_name)

Log a variable.

Example: to print the long int variable "my_long_int" as a debug message -> qos_log_var(QOS_LEVEL_DEBUG, my_long_int, "%ld")

Definition at line 239 of file qos_debug.h.

#define qos_log_verb ( msg,
args...   )     qos_log_str(QOS_LEVEL_VERB, "<VRB> ",msg,##args)

Log a verbose debugging message.

Definition at line 235 of file qos_debug.h.

#define qos_log_warn ( msg,
args...   )     qos_log_str(QOS_LEVEL_WARN, "<WRN> ",msg,##args)

Log a warning message.

Definition at line 226 of file qos_debug.h.

Referenced by my_init_module(), recharge(), and wait_periodic().

#define QOS_OK   qos_int_rv(0)

Operation successfully completed.

Definition at line 38 of file qos_debug.h.

Referenced by _rres_cleanup_server(), check_open(), find_task(), get_user_info(), kal_eheap_t(), main(), qos_dev_register(), qos_dev_unregister(), qos_func_define(), qos_strerror(), qres_attach_thread(), qres_attach_to_ext_data(), qres_cleanup(), qres_cleanup_module(), qres_create_server(), qres_destroy_server(), qres_detach_thread(), qres_get_appr_budget(), qres_get_bandwidth(), qres_get_curr_budget(), qres_get_deadline(), qres_get_exec_time(), qres_get_next_budget(), qres_get_params(), qres_get_servers(), qres_get_sid(), qres_get_weight(), qres_gw_ks(), qres_init(), qres_init_module(), qres_module_exists(), qres_retrieve_from_rres(), qres_set_bandwidth(), qres_set_params(), qres_set_weight(), qres_setup_qsup_for_rres(), qsup_add_group_constraints(), qsup_add_group_rule(), qsup_add_level_rule(), qsup_add_user_constraints(), qsup_add_user_rule(), qsup_cleanup(), qsup_cleanup_module(), qsup_cleanup_server(), qsup_create_server(), qsup_dev_register(), qsup_find_constraint(), qsup_get_avail_bw(), qsup_get_avail_gua_bw(), qsup_get_available_bandwidth(), qsup_gw_ks(), qsup_init(), qsup_init_ks(), qsup_init_module(), qsup_init_server(), qsup_reserve_spare(), qsup_set_required_bw(), ready_queue_add(), rres_activate_nosched(), rres_add(), rres_attach_all_tasks_nosched(), rres_attach_task_nosched(), rres_check_destroy(), rres_cleanup(), rres_create_server(), rres_deactivate_nosched(), rres_destroy_server(), rres_detach_all_tasks_nosched(), rres_detach_task(), rres_detach_task_nosched(), rres_edf_init(), rres_get_deadline(), rres_get_params(), rres_init(), rres_init_module(), rres_init_server(), rres_move_nosched(), rres_on_task_block(), rres_on_task_unblock(), rres_set_budget(), rres_set_params(), start_periodic(), and wait_periodic().

#define qos_return_if_cond ( cond,
rv,
msg,
args...   ) 
Value:
do {      \
  if (cond) {            \
    qos_log_debug("Check failed: '" #cond      \
      "' at line %d of file %s. " msg "\n", __LINE__, __FILE__,##args); \
    return rv;    \
  }               \
} while (0)

Evaluate cond.

If it is satisfied, log a custom message with args and return.

Allows to specify a custom printf-like format message with arguments. Condition is always evaluated, independently of debug settings.

Definition at line 290 of file qos_debug.h.

Referenced by rres_init_server().

#define qos_rv_int ( rv   )     ((int) (long) (rv))

Definition at line 34 of file qos_debug.h.

Referenced by device_ioctl(), qos_strerror(), and qsup_device_ioctl().


Typedef Documentation

typedef struct __qos_rv * qos_rv

The QoS Library return value, either QOS_OK or one of the QOS_E_error codes.

It may be converted to/from an integer through the qos_rv_int() and qos_int_rv() macros.

See also:
qos_rv_int qos_int_rv
Note:
Defined as a pointer in order to generate compile-time warnings in case of assignment with unallowed values (e.g. integers).

Function Documentation

void qos_dump_stack ( void   ) 

Definition at line 43 of file qos_debug.c.

References func_names, indent_lev, and qos_log_crit.

char* qos_strerror ( qos_rv  err  ) 

Convert a QOS_E_* error code into a string.

Returns a pointer to a statically allocated string with a human readable description of the error coded into the err parameter.

Definition at line 29 of file qos_debug.c.

References qos_errors, qos_log_err, QOS_OK, and qos_rv_int.

Referenced by device_ioctl(), qos_func_define(), qres_cleanup_module(), qres_get_appr_budget(), qres_get_curr_budget(), qres_get_deadline(), qres_get_exec_time(), qres_get_next_budget(), qres_get_weight(), qres_gw_ks(), qres_init_module(), qres_set_bandwidth(), qres_set_weight(), qsup_cleanup_module(), qsup_create_server(), qsup_device_ioctl(), qsup_init_module(), and rres_init_server().


Variable Documentation

char* func_names[MAX_INDENT_LEVEL]

Definition at line 27 of file qos_debug.c.

Referenced by qos_dump_stack().

This is used to highlight run-time nesting level of functions logging messages, through appropriate indentation.

This is used to highlight run-time nesting level of functions logging messages, through appropriate indentation.

concurrent kernel sections)

Definition at line 25 of file qos_debug.c.

Referenced by qos_dump_stack().

QOS_LEVEL_DEBUG atomic_t qos_log_msg_id

This is used to detect loss of messages.

Definition at line 21 of file qos_debug.c.

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