Go to the source code of this file.
Data Structures | |
struct | frame_part |
struct | spin_locked_list |
struct | rwsema_locked_list |
Defines | |
#define | kill_proc_info_as_uid(sig, info, pid, uid, euid) kill_proc_info_as_uid(sig, info, pid, uid, euid) |
#define | ker_malloc(m) kmalloc(m, GFP_KERNEL) |
#define | SPIN_LOCKED_LIST(name) |
#define | RWSEMA_LOCKED_LIST(name) |
#define | is_between_incl(value, a, b) (((value) >= (a)) && ((value) <= (b))) |
#define | is_between_excl(value, a, b) (((value) > (a)) && ((value) < (b))) |
#define | assert(expression) |
#define | return_if_fails_dbg(expression) |
#define | pr_reg_access_debug(fmt, arg...) rtnrt_debug(fmt,##arg) |
#define | pr_ioctl_debug(fmt, arg...) rtnrt_debug(fmt,##arg) |
#define | pr_devfunc_debug(fmt, arg...) rtnrt_debug(fmt,##arg) |
#define | pr_irq_debug(fmt, arg...) rtnrt_debug(fmt,##arg) |
#define | pr_rt_irq_debug(fmt, arg...) rtnrt_debug(fmt,##arg) |
#define | pr_txbuf_debug(fmt, arg...) rtnrt_debug(fmt,##arg) |
#define | pr_rxbuf_debug(fmt, arg...) rtnrt_debug(fmt,##arg) |
#define | pr_sync_debug(fmt, arg...) rtnrt_debug(fmt,##arg) |
#define | pr_nets_debug(fmt, arg...) rtnrt_debug(fmt,##arg) |
#define | pr_alsa_debug(fmt, arg...) rtnrt_debug(fmt,##arg) |
#define | pr_measure_debug(fmt, arg...) rtnrt_debug(fmt,##arg) |
#define | return_value_if_fails_dbg(expression, value) do { } while (0) |
#define | return_if_fails(expression) |
#define | return_value_if_fails(expression, value) |
Typedefs | |
typedef _Bool | bool |
typedef unsigned long | uintptr_t |
typedef long | intptr_t |
Enumerations | |
enum | { false = 0, true = 1 } |
Functions | |
static int | most_kill (int signo, struct task_struct *p, int data) |
static void | swap_bytes (u8 *b, int length) |
This has nothing to do with MOST, it could be used in any other drivers. It can also be included in userspace as it defines struct frame_part.
Definition in file most-common.h.
#define ker_malloc | ( | m | ) | kmalloc(m, GFP_KERNEL) |
Allocate memory, mainly because of usp-test.h
Definition at line 101 of file most-common.h.
Referenced by rxbuf_alloc(), and txbuf_alloc().
#define SPIN_LOCKED_LIST | ( | name | ) |
Value:
struct spin_locked_list name = { \ .list = LIST_HEAD_INIT(name.list), \ .lock = RTNRT_LOCK_UNLOCKED(name.lock) \ }
name | the name for the variable |
Definition at line 125 of file most-common.h.
#define RWSEMA_LOCKED_LIST | ( | name | ) |
Value:
struct rwsema_locked_list name = { \ .list = LIST_HEAD_INIT(name.list), \ .lock = __RWSEM_INITIALIZER(name.lock) \ };
name | the name for the variable |
Definition at line 151 of file most-common.h.
#define is_between_incl | ( | value, | |||
a, | |||||
b | ) | (((value) >= (a)) && ((value) <= (b))) |
Checks if value
is between a
and b
, i.e. if a <= value <= b.
value | the value to check | |
a | the lower bound | |
b | the upper bound |
true
if the condition is met, false otherwise Definition at line 165 of file most-common.h.
#define is_between_excl | ( | value, | |||
a, | |||||
b | ) | (((value) > (a)) && ((value) < (b))) |
Checks if value
is between a
and b
, i.e. if a < value < b.
value | the value to check | |
a | the lower bound | |
b | the upper bound |
true
if the condition is met, false otherwise Definition at line 176 of file most-common.h.
Referenced by ioctl_irq_set().
#define assert | ( | expression | ) |
Value:
do { \ if (!(expression)) { \ rtnrt_err("Assertion \"%s\" failed: file \"%s\", line %d\n", \ #expression, __FILE__, __LINE__); \ } \ } while (0)
DEBUG
mode, so expression
should not contain any side effects.
expression | the expression that should be checked. If expression is true , nothing is done. |
Definition at line 218 of file most-common.h.
Referenced by most_sync_int_handler(), most_sync_rt_read_write_begin(), most_sync_rt_read_write_end(), nets_int_handler(), and process_sigsend_handler().
#define return_if_fails_dbg | ( | expression | ) |
Value:
do { \ if (!(expression)) { \ rtnrt_err("\"%s\" failed: file \"%s\", line %d\n", \ #expression, __FILE__, __LINE__); \ return; \ } \ } while (0)
expression
fails, returns from the current function and print a debug message. Only evaluated in DEBUG
mode, expands to nothing in release mode.
This macro is meant as kind of assertions, i.e. a warning is printed if the condition fails. If it's a normal state that expression
fails, use return_if_fails().
expression | the expression to check |
Definition at line 242 of file most-common.h.
Referenced by most_sync_rt_interrupt_handler().
#define pr_reg_access_debug | ( | fmt, | |||
arg... | ) | rtnrt_debug(fmt,##arg) |
Low-level register access debugging
[in] | fmt | the format string |
[in] | arg | the arguments for the format string |
Definition at line 262 of file most-common.h.
Referenced by dma_allocate(), dma_deallocate(), readreg_int(), and writereg_int().
#define pr_ioctl_debug | ( | fmt, | |||
arg... | ) | rtnrt_debug(fmt,##arg) |
ioctl() debugging.
[in] | fmt | the format string |
[in] | arg | the arguments for the format string |
Definition at line 276 of file most-common.h.
Referenced by ioctl_irq_reset(), ioctl_irq_set(), ioctl_read_int(), ioctl_read_regblock(), ioctl_read_register(), ioctl_write_regblock(), and ioctl_write_register().
#define pr_devfunc_debug | ( | fmt, | |||
arg... | ) | rtnrt_debug(fmt,##arg) |
Device function debugging.
[in] | fmt | the format string |
[in] | arg | the arguments for the format string |
Definition at line 290 of file most-common.h.
Referenced by read_data_8104(), write_data_8104(), and write_map_8104().
#define pr_irq_debug | ( | fmt, | |||
arg... | ) | rtnrt_debug(fmt,##arg) |
Debugging in interrupt service routines
[in] | fmt | the format string |
[in] | arg | the arguments for the format string |
Definition at line 304 of file most-common.h.
Referenced by handle_interrupt(), intset(), and most_sync_int_handler().
#define pr_rt_irq_debug | ( | fmt, | |||
arg... | ) | rtnrt_debug(fmt,##arg) |
Debugging in real-time interrupt service routines
[in] | fmt | the format string |
[in] | arg | the arguments for the format string |
Definition at line 318 of file most-common.h.
Referenced by most_sync_rt_interrupt_handler().
#define pr_txbuf_debug | ( | fmt, | |||
arg... | ) | rtnrt_debug(fmt,##arg) |
Debugging function for txbuf.
[in] | fmt | the format string |
[in] | arg | the arguments for the format string |
Definition at line 332 of file most-common.h.
Referenced by txbuf_alloc(), and txbuf_put().
#define pr_rxbuf_debug | ( | fmt, | |||
arg... | ) | rtnrt_debug(fmt,##arg) |
Debugging function for rxbuf.
[in] | fmt | the format string |
[in] | arg | the arguments for the format string |
Definition at line 346 of file most-common.h.
Referenced by rxbuf_alloc(), rxbuf_get(), and rxbuf_put().
#define pr_sync_debug | ( | fmt, | |||
arg... | ) | rtnrt_debug(fmt,##arg) |
Debugging function for most-sync.
[in] | fmt | the format string |
[in] | arg | the arguments for the format string |
Definition at line 360 of file most-common.h.
Referenced by most_sync_do_open(), most_sync_do_release(), most_sync_nrt_close(), most_sync_nrt_open(), most_sync_nrt_setup_rx(), most_sync_probe(), most_sync_read(), most_sync_remove(), most_sync_rt_probe(), most_sync_rt_remove(), and most_sync_write().
#define pr_nets_debug | ( | fmt, | |||
arg... | ) | rtnrt_debug(fmt,##arg) |
Debugging function for most-netservice.
[in] | fmt | the format string |
[in] | arg | the arguments for the format string |
Definition at line 374 of file most-common.h.
Referenced by most_nets_open(), most_nets_release(), nets_probe(), and nets_remove().
#define pr_alsa_debug | ( | fmt, | |||
arg... | ) | rtnrt_debug(fmt,##arg) |
Debugging function for the ALSA driver
[in] | fmt | the format string |
[in] | arg | the arguments for the format string |
Definition at line 388 of file most-common.h.
Referenced by most_alsa_probe(), most_alsa_remove(), snd_most_capture_close(), snd_most_capture_hw_free(), snd_most_capture_hw_params(), snd_most_capture_open(), snd_most_capture_prepare(), snd_most_capture_thread(), snd_most_capture_trigger(), snd_most_playback_close(), snd_most_playback_hw_free(), snd_most_playback_hw_params(), snd_most_playback_open(), snd_most_playback_prepare(), snd_most_playback_thread(), and snd_most_playback_trigger().
#define pr_measure_debug | ( | fmt, | |||
arg... | ) | rtnrt_debug(fmt,##arg) |
Prints debug messages that are needed for measurings.
fmt | the format string | |
arg | the arguments for the format string |
Definition at line 402 of file most-common.h.
#define return_value_if_fails_dbg | ( | expression, | |||
value | ) | do { } while (0) |
If expression
failes, returns val
from the current function and print a debug message. Only evaluated in DEBUG
mode, expands to nothing in release mode.
This macro is meant as kind of assertions, i.e. a warning is printed if the condition fails. If it's a normal state that expression
fails, use return_value_if_fails().
expression | the expression to check | |
value | the value to return |
Definition at line 431 of file most-common.h.
Referenced by most_sync_probe(), most_sync_rt_probe(), most_sync_rt_read_write_begin(), nets_probe(), and rxbuf_put().
#define return_if_fails | ( | expression | ) |
Value:
do { \ if (!(expression)) { \ return; \ } \ } while (0)
expression
fails, return from the current function. This macro should be used if a failure of expression
is a valid program state.
expression | the expression to check |
Definition at line 442 of file most-common.h.
#define return_value_if_fails | ( | expression, | |||
value | ) |
Value:
do { \ if (!(expression)) { \ return value; \ } \ } while (0)
expression
fails, returns val
from the current function. This macro should be used if a failure of expression
is a valid program state.
expression | the expression to check | |
value | the value to return |
Definition at line 457 of file most-common.h.
Referenced by most_sync_read(), and most_sync_write().
typedef _Bool bool |
Define a boolean type. Don't include stdbool.h.
Definition at line 85 of file most-common.h.
typedef unsigned long uintptr_t |
Define an unsigned integer type that can hold pointers as in C99.
Definition at line 91 of file most-common.h.
typedef long intptr_t |
Define a integer type that can hold pointers as in C99.
Definition at line 96 of file most-common.h.
anonymous enum |
Define true and false.
Definition at line 77 of file most-common.h.
static int most_kill | ( | int | signo, | |
struct task_struct * | p, | |||
int | data | |||
) | [inline, static] |
Sends a signal to a specified process. Calls kill_proc_info_as_uid() internally.
signo | the signal number | |
pid | the PID of the current process | |
data | the data value that should be sent with the signal |
Definition at line 188 of file most-common.h.
References kill_proc_info_as_uid.
Referenced by process_sigsend_handler().
static void swap_bytes | ( | u8 * | b, | |
int | length | |||
) | [inline, static] |
Swaps bytes. Needed to convert big endian to little endian. From ./drivers/media/dvb/ttusb-dec/ttusb_dec.c
[in,out] | b | the bytes to swap |
[in] | length | the length |
Definition at line 471 of file most-common.h.
Referenced by snd_most_capture_thread(), and snd_most_playback_thread().