void rt_global_cli (void);
void rt_global_sti (void);
rt_global_sti hard enables interrupts (sti) on the calling cpu and releases the global lock.
void rt_global_save_flags (unsigned long *flags);
int rt_global_save_flags_and_cli (void);
void rt_global_restore_flags (unsigned long flags);
rt_global_save_flags_and_cli hard disables interrupts on the requesting CPU and returns old state of cpu interrupt flag (IF) and the global lock flag, in bits 9 and 0.
rt_global_restore_flags restores the cpu hard interrupt flag (IF) and the global lock flag as given by flags, freeing or acquiring the global lock according to the state of the global flag bit.
void send_ipi_shorthand (unsigned int shorthand, int irq);
void send_ipi_logical (unsigned long dest, int irq);
send_ipi_logical sends an interprocessor message of irq to all CPUs defined by dest. dest is given by an unsigned long corresponding to a bitmask of the CPUs to be sent. It is used for local apics programmed in flat logical mode, so the max number of allowed CPUs is 8, a constraint that is valid for all functions and data of RTAI. The flat logical mode is set when RTAI is installed by calling rt_mount_rtai.
int rt_assign_irq_to_cpu (int irq, int cpu);
int rt_reset_irq_to_sym_mode (int irq);
rt_reset_irq_to_sym_mode resets the interrupt irq to the symmetric interrupts management. The symmetric mode distributes the IRQs over all the CPUs.
Note: These functions have effect on multiprocessor systems only.
If there is at least 2 CPU, on success 0 is returned. If cpu is refers to a non-existent CPU, the number of CPUs is returned. On other failures, a negative value is returned as desribed below.
int rt_request_global_irq (unsigned int irq, void (*handler)(void));
int rt_free_global_irq (unsigned int irq);
int request_RTirq (unsigned int irq, void (*handler)(void));
int free_RTirq (unsigned int irq);
rt_free_global_irq uninstalls the interrupt service routine.
request_RTirq and free_RTirq are macros defined in rtai.h and is supported only for backwards compatibility with our variant of RT_linux for 2.0.35. They are fully equivalent of the other two functions above.
int rt_request_linux_irq (unsigned int irq, void (*handler)(int irq, void *dev_id, struct pt_regs *regs), char *linux_handler_id, void *dev_id);
int rt_free_linux_irq (unsigned int irq, void *dev_id);
/proc/interrupts
.
/proc/interrupts
.
The parameter dev_id is to pass to the interrupt handler,
in the same way as the standard Linux irq request call.
The interrupt service routine can be uninstalled with rt_free_linux_irq.
void rt_pend_linux_irq (unsigned int irq);
int rt_request_srq (unsigned int label, void (*rtai_handler)(void), long long (*user_handler)(unsigned int whatever));
int rt_free_srq (unsigned int srq);
rt_free_srq uninstalls the system call identified by srq.
void rt_pend_linux_srq (unsigned int srq);
void rt_request_timer (void (*handler)(void), int tick, int apic);
void rt_free_timer (void);
rt_free_timer uninstalls the timer previously set by rt_request_timer.
void rt_mount_rtai (void);
void rt_umount_rtai (void);
rt_umount_rtai unmounts the real time application interface resetting Linux to its normal state.