Xenomai API
2.6.5
|
Real-Time Driver Model for Xenomai, driver library. More...
Functions | |
nanosecs_abs_t | rtdm_clock_read (void) |
Get system time. More... | |
nanosecs_abs_t | rtdm_clock_read_monotonic (void) |
Get monotonic time. More... | |
int | rtdm_task_init (rtdm_task_t *task, const char *name, rtdm_task_proc_t task_proc, void *arg, int priority, nanosecs_rel_t period) |
Intialise and start a real-time task. More... | |
void | rtdm_task_destroy (rtdm_task_t *task) |
Destroy a real-time task. More... | |
void | rtdm_task_set_priority (rtdm_task_t *task, int priority) |
Adjust real-time task priority. More... | |
int | rtdm_task_set_period (rtdm_task_t *task, nanosecs_rel_t period) |
Adjust real-time task period. More... | |
int | rtdm_task_wait_period (void) |
Wait on next real-time task period. More... | |
int | rtdm_task_unblock (rtdm_task_t *task) |
Activate a blocked real-time task. More... | |
rtdm_task_t * | rtdm_task_current (void) |
Get current real-time task. More... | |
int | rtdm_task_sleep (nanosecs_rel_t delay) |
Sleep a specified amount of time. More... | |
int | rtdm_task_sleep_until (nanosecs_abs_t wakeup_time) |
Sleep until a specified absolute time. More... | |
int | rtdm_task_sleep_abs (nanosecs_abs_t wakeup_time, enum rtdm_timer_mode mode) |
Sleep until a specified absolute time. More... | |
void | rtdm_task_join_nrt (rtdm_task_t *task, unsigned int poll_delay) |
Wait on a real-time task to terminate. More... | |
void | rtdm_task_busy_sleep (nanosecs_rel_t delay) |
Busy-wait a specified amount of time. More... | |
int | rtdm_timer_init (rtdm_timer_t *timer, rtdm_timer_handler_t handler, const char *name) |
Initialise a timer. More... | |
void | rtdm_timer_destroy (rtdm_timer_t *timer) |
Destroy a timer. More... | |
int | rtdm_timer_start (rtdm_timer_t *timer, nanosecs_abs_t expiry, nanosecs_rel_t interval, enum rtdm_timer_mode mode) |
Start a timer. More... | |
void | rtdm_timer_stop (rtdm_timer_t *timer) |
Stop a timer. More... | |
int | rtdm_timer_start_in_handler (rtdm_timer_t *timer, nanosecs_abs_t expiry, nanosecs_rel_t interval, enum rtdm_timer_mode mode) |
Start a timer from inside a timer handler. More... | |
void | rtdm_timer_stop_in_handler (rtdm_timer_t *timer) |
Stop a timer from inside a timer handler. More... | |
int | rtdm_irq_request (rtdm_irq_t *irq_handle, unsigned int irq_no, rtdm_irq_handler_t handler, unsigned long flags, const char *device_name, void *arg) |
Register an interrupt handler. More... | |
int | rtdm_irq_free (rtdm_irq_t *irq_handle) |
Release an interrupt handler. More... | |
int | rtdm_irq_enable (rtdm_irq_t *irq_handle) |
Enable interrupt line. More... | |
int | rtdm_irq_disable (rtdm_irq_t *irq_handle) |
Disable interrupt line. More... | |
int | rtdm_nrtsig_init (rtdm_nrtsig_t *nrt_sig, rtdm_nrtsig_handler_t handler, void *arg) |
Register a non-real-time signal handler. More... | |
void | rtdm_nrtsig_destroy (rtdm_nrtsig_t *nrt_sig) |
Release a non-realtime signal handler. More... | |
void | rtdm_nrtsig_pend (rtdm_nrtsig_t *nrt_sig) |
Trigger non-real-time signal. More... | |
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. More... | |
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. More... | |
int | rtdm_munmap (rtdm_user_info_t *user_info, void *ptr, size_t len) |
Unmap a user memory range. More... | |
int | rtdm_ratelimit (struct rtdm_ratelimit_state *rs, const char *func) |
Enforces a rate limit. 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 in real-time context. More... | |
void | rtdm_free (void *ptr) |
Release real-time memory block. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
int | rtdm_in_rt_context (void) |
Test if running in a real-time task. More... | |
int | rtdm_rt_capable (rtdm_user_info_t *user_info) |
Test if the caller is capable of running in real-time context. More... | |
Timeout Sequence Management | |
void | rtdm_toseq_init (rtdm_toseq_t *timeout_seq, nanosecs_rel_t timeout) |
Initialise a timeout sequence. More... | |
EXPORT_SYMBOL_GPL (rtdm_toseq_init) | |
Initialise a timeout sequence. More... | |
Event Services | |
void | rtdm_event_init (rtdm_event_t *event, unsigned long pending) |
Initialise an event. More... | |
EXPORT_SYMBOL_GPL (rtdm_event_init) | |
Initialise an event. More... | |
void | rtdm_event_destroy (rtdm_event_t *event) |
Destroy an event. More... | |
void | rtdm_event_pulse (rtdm_event_t *event) |
Signal an event occurrence to currently listening waiters. More... | |
void | rtdm_event_signal (rtdm_event_t *event) |
Signal an event occurrence. More... | |
EXPORT_SYMBOL_GPL (rtdm_event_signal) | |
Initialise an event. More... | |
int | rtdm_event_wait (rtdm_event_t *event) |
Wait on event occurrence. More... | |
EXPORT_SYMBOL_GPL (rtdm_event_wait) | |
Initialise an event. More... | |
int | rtdm_event_timedwait (rtdm_event_t *event, nanosecs_rel_t timeout, rtdm_toseq_t *timeout_seq) |
Wait on event occurrence with timeout. More... | |
EXPORT_SYMBOL_GPL (rtdm_event_timedwait) | |
Initialise an event. More... | |
void | rtdm_event_clear (rtdm_event_t *event) |
Clear event state. More... | |
EXPORT_SYMBOL_GPL (rtdm_event_clear) | |
Initialise an event. More... | |
int | rtdm_event_select_bind (rtdm_event_t *event, rtdm_selector_t *selector, enum rtdm_selecttype type, unsigned fd_index) |
Bind a selector to an event. More... | |
EXPORT_SYMBOL_GPL (rtdm_event_select_bind) | |
Initialise an event. More... | |
Semaphore Services | |
void | rtdm_sem_init (rtdm_sem_t *sem, unsigned long value) |
Initialise a semaphore. More... | |
EXPORT_SYMBOL_GPL (rtdm_sem_init) | |
Initialise a semaphore. More... | |
void | rtdm_sem_destroy (rtdm_sem_t *sem) |
Destroy a semaphore. More... | |
int | rtdm_sem_down (rtdm_sem_t *sem) |
Decrement a semaphore. More... | |
EXPORT_SYMBOL_GPL (rtdm_sem_down) | |
Initialise a semaphore. More... | |
int | rtdm_sem_timeddown (rtdm_sem_t *sem, nanosecs_rel_t timeout, rtdm_toseq_t *timeout_seq) |
Decrement a semaphore with timeout. More... | |
EXPORT_SYMBOL_GPL (rtdm_sem_timeddown) | |
Initialise a semaphore. More... | |
void | rtdm_sem_up (rtdm_sem_t *sem) |
Increment a semaphore. More... | |
EXPORT_SYMBOL_GPL (rtdm_sem_up) | |
Initialise a semaphore. More... | |
int | rtdm_sem_select_bind (rtdm_sem_t *sem, rtdm_selector_t *selector, enum rtdm_selecttype type, unsigned fd_index) |
Bind a selector to a semaphore. More... | |
EXPORT_SYMBOL_GPL (rtdm_sem_select_bind) | |
Initialise a semaphore. More... | |
Mutex Services | |
void | rtdm_mutex_init (rtdm_mutex_t *mutex) |
Initialise a mutex. More... | |
EXPORT_SYMBOL_GPL (rtdm_mutex_init) | |
Initialise a mutex. More... | |
void | rtdm_mutex_destroy (rtdm_mutex_t *mutex) |
Destroy a mutex. More... | |
void | rtdm_mutex_unlock (rtdm_mutex_t *mutex) |
Release a mutex. More... | |
int | rtdm_mutex_lock (rtdm_mutex_t *mutex) |
Request a mutex. More... | |
EXPORT_SYMBOL_GPL (rtdm_mutex_lock) | |
Initialise a mutex. More... | |
int | rtdm_mutex_timedlock (rtdm_mutex_t *mutex, nanosecs_rel_t timeout, rtdm_toseq_t *timeout_seq) |
Request a mutex with timeout. More... | |
EXPORT_SYMBOL_GPL (rtdm_mutex_timedlock) | |
Initialise a mutex. More... | |
Real-Time Driver Model for Xenomai, driver library.
Xenomai is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Xenomai is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Xenomai; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.