Xenomai
3.1
|
Functions | |
int | rtdm_mmap_to_user (struct rtdm_fd *fd, void *src_addr, size_t len, int prot, void **pptr, struct vm_operations_struct *vm_ops, void *vm_private_data) |
Map a kernel memory range into the address space of the user. More... | |
int | rtdm_iomap_to_user (struct rtdm_fd *fd, phys_addr_t src_addr, size_t len, int prot, void **pptr, struct vm_operations_struct *vm_ops, void *vm_private_data) |
Map an I/O memory range into the address space of the user. More... | |
int | rtdm_mmap_kmem (struct vm_area_struct *vma, void *va) |
Map a kernel logical memory range to a virtual user area. More... | |
int | rtdm_mmap_vmem (struct vm_area_struct *vma, void *va) |
Map a virtual memory range to a virtual user area. More... | |
int | rtdm_mmap_iomem (struct vm_area_struct *vma, phys_addr_t pa) |
Map an I/O memory range to a virtual user area. More... | |
int | rtdm_munmap (void *ptr, size_t len) |
Unmap a user memory range. More... | |
void | rtdm_printk_ratelimited (const char *format,...) |
Real-time safe rate-limited message printing on kernel console More... | |
void | rtdm_printk (const char *format,...) |
Real-time safe message printing on kernel console More... | |
void * | rtdm_malloc (size_t size) |
Allocate memory block More... | |
void | rtdm_free (void *ptr) |
Release real-time memory block More... | |
int | rtdm_read_user_ok (struct rtdm_fd *fd, const void __user *ptr, size_t size) |
Check if read access to user-space memory block is safe More... | |
int | rtdm_rw_user_ok (struct rtdm_fd *fd, const void __user *ptr, size_t size) |
Check if read/write access to user-space memory block is safe More... | |
int | rtdm_copy_from_user (struct rtdm_fd *fd, void *dst, const void __user *src, size_t size) |
Copy user-space memory block to specified buffer More... | |
int | rtdm_safe_copy_from_user (struct rtdm_fd *fd, void *dst, const void __user *src, size_t size) |
Check if read access to user-space memory block and copy it to specified buffer More... | |
int | rtdm_copy_to_user (struct rtdm_fd *fd, void __user *dst, const void *src, size_t size) |
Copy specified buffer to user-space memory block More... | |
int | rtdm_safe_copy_to_user (struct rtdm_fd *fd, void __user *dst, const void *src, size_t size) |
Check if read/write access to user-space memory block is safe and copy specified buffer to it More... | |
int | rtdm_strncpy_from_user (struct rtdm_fd *fd, char *dst, const char __user *src, size_t count) |
Copy user-space string to specified buffer More... | |
int | rtdm_in_rt_context (void) |
Test if running in a real-time task More... | |
int | rtdm_rt_capable (struct rtdm_fd *fd) |
Test if the caller is capable of running in real-time context More... | |
bool | rtdm_available (void) |
Test if the real-time core is available More... | |
bool rtdm_available | ( | void | ) |
Test if the real-time core is available
Referenced by a4l_register_drv().
int rtdm_copy_from_user | ( | struct rtdm_fd * | fd, |
void * | dst, | ||
const void __user * | src, | ||
size_t | size | ||
) |
Copy user-space memory block to specified buffer
[in] | fd | RTDM file descriptor as passed to the invoked device operation handler |
[in] | dst | Destination buffer address |
[in] | src | Address of the user-space memory block |
[in] | size | Size of the memory block |
int rtdm_copy_to_user | ( | struct rtdm_fd * | fd, |
void __user * | dst, | ||
const void * | src, | ||
size_t | size | ||
) |
Copy specified buffer to user-space memory block
[in] | fd | RTDM file descriptor as passed to the invoked device operation handler |
[in] | dst | Address of the user-space memory block |
[in] | src | Source buffer address |
[in] | size | Size of the memory block |
void rtdm_free | ( | void * | ptr | ) |
Release real-time memory block
[in] | ptr | Pointer to memory block as returned by rtdm_malloc() |
int rtdm_in_rt_context | ( | void | ) |
Test if running in a real-time task
int rtdm_iomap_to_user | ( | struct rtdm_fd * | fd, |
phys_addr_t | src_addr, | ||
size_t | len, | ||
int | prot, | ||
void ** | pptr, | ||
struct vm_operations_struct * | vm_ops, | ||
void * | vm_private_data | ||
) |
Map an I/O memory range into the address space of the user.
[in] | fd | RTDM file descriptor as passed to the invoked device operation handler |
[in] | src_addr | physical I/O address to be mapped |
[in] | len | Length of the memory range |
[in] | prot | Protection flags for the user's memory range, typically either PROT_READ or PROT_READ|PROT_WRITE |
[in,out] | pptr | Address of a pointer containing the desired user address or NULL on entry and the finally assigned address on return |
[in] | vm_ops | vm_operations to be executed on the vm_area of the user memory range or NULL |
[in] | vm_private_data | Private data to be stored in the vm_area, primarily useful for vm_operation handlers |
void* rtdm_malloc | ( | size_t | size | ) |
Allocate memory block
[in] | size | Requested size of the memory block |
Referenced by a4l_alloc_subd().
int rtdm_mmap_iomem | ( | struct vm_area_struct * | vma, |
phys_addr_t | pa | ||
) |
Map an I/O memory range to a virtual user area.
This routine is commonly used from a ->mmap() handler of a RTDM driver, for mapping an I/O memory area over the user address space referred to by vma.
[in] | vma | The VMA descriptor to receive the mapping. |
[in] | pa | The physical I/O address to be mapped. |
int rtdm_mmap_kmem | ( | struct vm_area_struct * | vma, |
void * | va | ||
) |
Map a kernel logical memory range to a virtual user area.
This routine is commonly used from a ->mmap() handler of a RTDM driver, for mapping a virtual memory area with a direct physical mapping over the user address space referred to by vma.
[in] | vma | The VMA descriptor to receive the mapping. |
[in] | va | The kernel logical address to be mapped. |
int rtdm_mmap_to_user | ( | struct rtdm_fd * | fd, |
void * | src_addr, | ||
size_t | len, | ||
int | prot, | ||
void ** | pptr, | ||
struct vm_operations_struct * | vm_ops, | ||
void * | vm_private_data | ||
) |
Map a kernel memory range into the address space of the user.
[in] | fd | RTDM file descriptor as passed to the invoked device operation handler |
[in] | src_addr | Kernel virtual address to be mapped |
[in] | len | Length of the memory range |
[in] | prot | Protection flags for the user's memory range, typically either PROT_READ or PROT_READ|PROT_WRITE |
[in,out] | pptr | Address of a pointer containing the desired user address or NULL on entry and the finally assigned address on return |
[in] | vm_ops | vm_operations to be executed on the vm_area of the user memory range or NULL |
[in] | vm_private_data | Private data to be stored in the vm_area, primarily useful for vm_operation handlers |
int rtdm_mmap_vmem | ( | struct vm_area_struct * | vma, |
void * | va | ||
) |
Map a virtual memory range to a virtual user area.
This routine is commonly used from a ->mmap() handler of a RTDM driver, for mapping a purely virtual memory area over the user address space referred to by vma.
[in] | vma | The VMA descriptor to receive the mapping. |
[in] | va | The virtual address to be mapped. |
int rtdm_munmap | ( | void * | ptr, |
size_t | len | ||
) |
Unmap a user memory range.
[in] | ptr | User address or the memory range |
[in] | len | Length of the memory range |
void rtdm_printk | ( | const char * | format, |
... | |||
) |
Real-time safe message printing on kernel console
[in] | format | Format string (conforming standard printf() ) |
... | Arguments referred by format |
void rtdm_printk_ratelimited | ( | const char * | format, |
... | |||
) |
Real-time safe rate-limited message printing on kernel console
[in] | format | Format string (conforming standard printf() ) |
... | Arguments referred by format |
int rtdm_read_user_ok | ( | struct rtdm_fd * | fd, |
const void __user * | ptr, | ||
size_t | size | ||
) |
Check if read access to user-space memory block is safe
[in] | fd | RTDM file descriptor as passed to the invoked device operation handler |
[in] | ptr | Address of the user-provided memory block |
[in] | size | Size of the memory block |
int rtdm_rt_capable | ( | struct rtdm_fd * | fd | ) |
Test if the caller is capable of running in real-time context
[in] | fd | RTDM file descriptor as passed to the invoked device operation handler |
int rtdm_rw_user_ok | ( | struct rtdm_fd * | fd, |
const void __user * | ptr, | ||
size_t | size | ||
) |
Check if read/write access to user-space memory block is safe
[in] | fd | RTDM file descriptor as passed to the invoked device operation handler |
[in] | ptr | Address of the user-provided memory block |
[in] | size | Size of the memory block |
int rtdm_safe_copy_from_user | ( | struct rtdm_fd * | fd, |
void * | dst, | ||
const void __user * | src, | ||
size_t | size | ||
) |
Check if read access to user-space memory block and copy it to specified buffer
[in] | fd | RTDM file descriptor as passed to the invoked device operation handler |
[in] | dst | Destination buffer address |
[in] | src | Address of the user-space memory block |
[in] | size | Size of the memory block |
int rtdm_safe_copy_to_user | ( | struct rtdm_fd * | fd, |
void __user * | dst, | ||
const void * | src, | ||
size_t | size | ||
) |
Check if read/write access to user-space memory block is safe and copy specified buffer to it
[in] | fd | RTDM file descriptor as passed to the invoked device operation handler |
[in] | dst | Address of the user-space memory block |
[in] | src | Source buffer address |
[in] | size | Size of the memory block |
int rtdm_strncpy_from_user | ( | struct rtdm_fd * | fd, |
char * | dst, | ||
const char __user * | src, | ||
size_t | count | ||
) |
Copy user-space string to specified buffer
[in] | fd | RTDM file descriptor as passed to the invoked device operation handler |
[in] | dst | Destination buffer address |
[in] | src | Address of the user-space string |
[in] | count | Maximum number of bytes to copy, including the trailing '0' |