Xenomai API
2.5.6.1
|
Functions | |
int | rtdm_mmap_to_user (rtdm_user_info_t *user_info, 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. | |
int | rtdm_iomap_to_user (rtdm_user_info_t *user_info, 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. | |
int | rtdm_munmap (rtdm_user_info_t *user_info, void *ptr, size_t len) |
Unmap a user memory range. | |
void | rtdm_printk (const char *format,...) |
Real-time safe message printing on kernel console. | |
void * | rtdm_malloc (size_t size) |
Allocate memory block in real-time context. | |
void | rtdm_free (void *ptr) |
Release real-time memory block. | |
int | rtdm_read_user_ok (rtdm_user_info_t *user_info, const void __user *ptr, size_t size) |
Check if read access to user-space memory block is safe. | |
int | rtdm_rw_user_ok (rtdm_user_info_t *user_info, const void __user *ptr, size_t size) |
Check if read/write access to user-space memory block is safe. | |
int | rtdm_copy_from_user (rtdm_user_info_t *user_info, void *dst, const void __user *src, size_t size) |
Copy user-space memory block to specified buffer. | |
int | rtdm_safe_copy_from_user (rtdm_user_info_t *user_info, void *dst, const void __user *src, size_t size) |
Check if read access to user-space memory block and copy it to specified buffer. | |
int | rtdm_copy_to_user (rtdm_user_info_t *user_info, void __user *dst, const void *src, size_t size) |
Copy specified buffer to user-space memory block. | |
int | rtdm_safe_copy_to_user (rtdm_user_info_t *user_info, 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. | |
int | rtdm_strncpy_from_user (rtdm_user_info_t *user_info, char *dst, const char __user *src, size_t count) |
Copy user-space string to specified buffer. | |
int | rtdm_in_rt_context (void) |
Test if running in a real-time task. | |
int | rtdm_rt_capable (rtdm_user_info_t *user_info) |
Test if the caller is capable of running in real-time context. |
int rtdm_copy_from_user | ( | rtdm_user_info_t * | user_info, |
void * | dst, | ||
const void __user * | src, | ||
size_t | size | ||
) |
Copy user-space memory block to specified buffer.
[in] | user_info | User information pointer 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 |
Environments:
This service can be called from:
Rescheduling: never.
int rtdm_copy_to_user | ( | rtdm_user_info_t * | user_info, |
void __user * | dst, | ||
const void * | src, | ||
size_t | size | ||
) |
Copy specified buffer to user-space memory block.
[in] | user_info | User information pointer 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 |
Environments:
This service can be called from:
Rescheduling: never.
void rtdm_free | ( | void * | ptr | ) |
Release real-time memory block.
[in] | ptr | Pointer to memory block as returned by rtdm_malloc() |
Environments:
This service can be called from:
Rescheduling: never.
int rtdm_in_rt_context | ( | void | ) |
Test if running in a real-time task.
Environments:
This service can be called from:
Rescheduling: never.
int rtdm_iomap_to_user | ( | rtdm_user_info_t * | user_info, |
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] | user_info | User information pointer 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 vma_area of the user memory range or NULL |
[in] | vm_private_data | Private data to be stored in the vma_area, primarily useful for vm_operation handlers |
Environments:
This service can be called from:
Rescheduling: possible.
void* rtdm_malloc | ( | size_t | size | ) |
Allocate memory block in real-time context.
[in] | size | Requested size of the memory block |
Environments:
This service can be called from:
Rescheduling: never.
int rtdm_mmap_to_user | ( | rtdm_user_info_t * | user_info, |
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] | user_info | User information pointer 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 vma_area of the user memory range or NULL |
[in] | vm_private_data | Private data to be stored in the vma_area, primarily useful for vm_operation handlers |
Environments:
This service can be called from:
Rescheduling: possible.
int rtdm_munmap | ( | rtdm_user_info_t * | user_info, |
void * | ptr, | ||
size_t | len | ||
) |
Unmap a user memory range.
[in] | user_info | User information pointer as passed to rtdm_mmap_to_user() when requesting to map the memory range |
[in] | ptr | User address or the memory range |
[in] | len | Length of the memory range |
Environments:
This service can be called from:
Rescheduling: possible.
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 |
Environments:
This service can be called from:
Rescheduling: never in real-time context, possible in non-real-time environments.
int rtdm_read_user_ok | ( | rtdm_user_info_t * | user_info, |
const void __user * | ptr, | ||
size_t | size | ||
) |
Check if read access to user-space memory block is safe.
[in] | user_info | User information pointer as passed to the invoked device operation handler |
[in] | ptr | Address of the user-provided memory block |
[in] | size | Size of the memory block |
Environments:
This service can be called from:
Rescheduling: never.
int rtdm_rt_capable | ( | rtdm_user_info_t * | user_info | ) |
Test if the caller is capable of running in real-time context.
[in] | user_info | User information pointer as passed to the invoked device operation handler |
Environments:
This service can be called from:
Rescheduling: never.
int rtdm_rw_user_ok | ( | rtdm_user_info_t * | user_info, |
const void __user * | ptr, | ||
size_t | size | ||
) |
Check if read/write access to user-space memory block is safe.
[in] | user_info | User information pointer as passed to the invoked device operation handler |
[in] | ptr | Address of the user-provided memory block |
[in] | size | Size of the memory block |
Environments:
This service can be called from:
Rescheduling: never.
int rtdm_safe_copy_from_user | ( | rtdm_user_info_t * | user_info, |
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] | user_info | User information pointer 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 |
Environments:
This service can be called from:
Rescheduling: never.
int rtdm_safe_copy_to_user | ( | rtdm_user_info_t * | user_info, |
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] | user_info | User information pointer 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 |
Environments:
This service can be called from:
Rescheduling: never.
int rtdm_strncpy_from_user | ( | rtdm_user_info_t * | user_info, |
char * | dst, | ||
const char __user * | src, | ||
size_t | count | ||
) |
Copy user-space string to specified buffer.
[in] | user_info | User information pointer 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' |
Environments:
This service can be called from:
Rescheduling: never.