/home/hillier_g/checkout/most4linux/most-kernel/most-common-rt.h File Reference

Common types and definitions used in the real-time part of the MOST driver. More...

Go to the source code of this file.

Data Structures

struct  rt_spin_locked_list

Defines

#define RT_SPIN_LOCKED_LIST(name)
#define copy_from_user_or_kernel(err, user_info, dst, src, size)


Detailed Description

Common types and definitions used in the real-time part of the MOST driver.

Definition in file most-common-rt.h.


Define Documentation

#define RT_SPIN_LOCKED_LIST ( name   ) 

Value:

struct rt_spin_locked_list name = {                                             \
        .list       = LIST_HEAD_INIT(name.list),                                    \
        .lock       = RTDM_LOCK_UNLOCKED                                            \
    }
Declare a rt_spin_locked_list variable and initialize the list elements statically

Parameters:
name the name for the variable

Definition at line 60 of file most-common-rt.h.

#define copy_from_user_or_kernel ( err,
user_info,
dst,
src,
size   ) 

Value:

do {                                                            \
        if (user_info) {                                            \
            err = rtdm_copy_from_user(user_info, dst, src, size);   \
        } else {                                                    \
            memcpy(dst, src, size);                                 \
            err = 0;                                                \
        }                                                           \
    } while (0)
If user_info is NULL, copies from kernel space to kernel space. If user_info is not NULL, copy from user space to kernel space.

src and dst must be valid pointers, i.e. checked with rtdm_read_user_ok if it's userspace.

Parameters:
err the variable where the return value is stored. 0 is success, a negative error value (-EFAULT) indicates an error
user_info the RTDM struct user_info value
dst the destination
src the source
size the number of bytes to copy

Definition at line 81 of file most-common-rt.h.

Referenced by most_sync_nrt_setup_rx(), and most_sync_nrt_setup_tx().


Generated on Fri Mar 9 14:48:58 2007 for MOST Linux Drivers (Linux and RTAI) by  doxygen 1.5.0