Include dependency graph for sched.c:
Go to the source code of this file.
Data Structures | |
struct | sig_wakeup_t |
Defines | |
#define | __KERNEL_SYSCALLS__ |
#define | fpu_task (rt_smp_fpu_task[cpuid]) |
#define | rt_half_tick (rt_smp_half_tick[cpuid]) |
#define | oneshot_running (rt_smp_oneshot_running[cpuid]) |
#define | oneshot_timer_cpuid (rt_smp_oneshot_timer[rtai_cpuid()]) |
#define | timer_shot_fired (rt_smp_timer_shot_fired[cpuid]) |
#define | rt_times (rt_smp_times[cpuid]) |
#define | linux_cr0 (rt_smp_linux_cr0[cpuid]) |
#define | MAX_FRESTK_SRQ (2 << 6) |
#define | KTHREAD_M_PRIO MAX_LINUX_RTPRIO |
#define | KTHREAD_F_PRIO MAX_LINUX_RTPRIO |
#define | rt_request_sched_ipi() 0 |
#define | rt_free_sched_ipi() |
#define | sched_get_global_lock(cpuid) |
#define | sched_release_global_lock(cpuid) |
#define | rt_kstack_alloc(sz) rtheap_alloc(&rtai_kstack_heap, sz, 0) |
#define | rt_kstack_free(p) rtheap_free(&rtai_kstack_heap, p) |
#define | RR_YIELD() |
#define | TASK_TO_SCHEDULE() |
#define | RR_INTR_TIME(fire_shot) |
#define | LOCK_LINUX(cpuid) do { rt_switch_to_real_time(cpuid); } while (0) |
#define | UNLOCK_LINUX(cpuid) do { rt_switch_to_linux(cpuid); } while (0) |
#define | SAVE_LOCK_LINUX(cpuid) do { sflags = rt_save_switch_to_real_time(cpuid); } while (0) |
#define | RESTORE_UNLOCK_LINUX(cpuid) do { rt_restore_switch_to_linux(sflags, cpuid); } while (0) |
#define | SAVE_LOCK_LINUX_IN_IRQ(cpuid) |
#define | RESTORE_UNLOCK_LINUX_IN_IRQ(cpuid) |
#define | RTAI_TASK_SWITCH_SIGNAL() |
#define | SET_EXEC_TIME() |
#define | RST_EXEC_TIME() |
#define | SAVE_PREV_TASK() do { } while (0) |
#define | enq_soft_ready_task(ready_task) |
#define | pend_wake_up_hts(lnxtsk, cpuid) |
#define | lxrt_context_switch(prev, next, cpuid) |
#define | CHECK_LINUX_TIME() |
#define | SET_PEND_LINUX_TIMER_SHOT() |
#define | SET_NEXT_TIMER_SHOT(fire_shot) |
#define | IF_GOING_TO_LINUX_CHECK_TIMER_SHOT(fire_shot) |
#define | ONESHOT_DELAY(SHOT_FIRED) |
#define | FIRE_NEXT_TIMER_SHOT(SHOT_FIRED) |
#define | CALL_TIMER_HANDLER() do { if (timer_shot_fired < 0) rt_timer_handler(); } while (0) |
#define | REDO_TIMER_HANDLER() do { if (timer_shot_fired < 0) goto redo_timer_handler; } while (0) |
#define | FIRE_IMMEDIATE_LINUX_TIMER_SHOT() |
#define | SCHED_UNLOCK_SCHEDULE(cpuid) |
#define | REQUEST_RECOVER_JIFFIES() rt_request_linux_irq(TIMER_8254_IRQ, recover_jiffies, "rtai_jif_chk", recover_jiffies) |
#define | RELEASE_RECOVER_JIFFIES(timer) rt_free_linux_irq(TIMER_8254_IRQ, recover_jiffies) |
#define | cpuid 0 |
#define | rt_times (rt_smp_times[cpuid]) |
#define | SYSW_DIAG_MSG(x) |
#define | RESERVOIR 11 |
#define | HARD_KTHREAD_IN_USE ((char)220) |
#define | WAKE_UP_TASKs(klist) |
#define | WAKE_UP_THREADM(thread) |
#define | INTERCEPT_SCHEDULE_HEAD() do { } while (0) |
#define | DROP_MM2DROP(cpuid) do { } while (0) |
#define | RELEASE_SCHEDULE_HEAD() do { } while (0) |
#define | DROP_ALL_PENDING_MM2DROP() do { } while (0) |
Functions | |
MODULE_LICENSE ("GPL") | |
static int | lxrt_notify_reboot (struct notifier_block *nb, unsigned long event, void *ptr) |
RTAI_MODULE_PARM (rtai_kstack_heap_size, int) | |
int | get_min_tasks_cpuid (void) |
void | put_current_on_cpu (int cpuid) |
int | set_rtext (RT_TASK *task, int priority, int uses_fpu, void(*signal)(void), unsigned int cpuid, struct task_struct *relink) |
static void | start_stop_kthread (RT_TASK *, void(*)(long), long, int, int, void(*)(void), int) |
int | rt_kthread_init_cpuid (RT_TASK *task, void(*rt_thread)(long), long data, int stack_size, int priority, int uses_fpu, void(*signal)(void), unsigned int cpuid) |
int | rt_kthread_init (RT_TASK *task, void(*rt_thread)(long), long data, int stack_size, int priority, int uses_fpu, void(*signal)(void)) |
int | rt_task_init_cpuid (RT_TASK *task, void(*rt_thread)(long), long data, int stack_size, int priority, int uses_fpu, void(*signal)(void), unsigned int cpuid) |
int | rt_task_init (RT_TASK *task, void(*rt_thread)(long), long data, int stack_size, int priority, int uses_fpu, void(*signal)(void)) |
RTAI_SYSCALL_MODE void | rt_set_runnable_on_cpuid (RT_TASK *task, unsigned int cpuid) |
RTAI_SYSCALL_MODE void | rt_set_runnable_on_cpus (RT_TASK *task, unsigned long run_on_cpus) |
int | rt_check_current_stack (void) |
void | rt_do_force_soft (RT_TASK *rt_task) |
static void | force_current_soft (RT_TASK *rt_current, int cpuid) |
static RT_TASK * | switch_rtai_tasks (RT_TASK *rt_current, RT_TASK *new_task, int cpuid) |
static void | rt_timer_handler (void) |
void | rt_schedule (void) |
RTAI_SYSCALL_MODE void | rt_spv_RMS (int cpuid) |
void | rt_sched_lock (void) |
void | rt_sched_unlock (void) |
void | rtai_handle_isched_lock (int cpuid) |
void * | rt_get_lxrt_fun_entry (int index) |
static void | sched_sem_signal (SEM *sem) |
int | clr_rtext (RT_TASK *task) |
int | rt_task_delete (RT_TASK *task) |
int | rt_get_timer_cpu (void) |
static irqreturn_t | recover_jiffies (int irq, void *dev_id, struct pt_regs *regs) |
int | rt_is_hard_timer_running (void) |
void | rt_set_periodic_mode (void) |
void | rt_set_oneshot_mode (void) |
RTAI_SYSCALL_MODE RTIME | start_rt_timer (int period) |
RTAI_SYSCALL_MODE void | start_rt_apic_timers (struct apic_timer_setup_data *setup_mode, unsigned int rcvr_jiffies_cpuid) |
void | stop_rt_timer (void) |
int | rt_sched_type (void) |
RTAI_SYSCALL_MODE int | rt_hard_timer_tick_count (void) |
RTAI_SYSCALL_MODE int | rt_hard_timer_tick_count_cpuid (int cpuid) |
RT_TRAP_HANDLER | rt_set_task_trap_handler (RT_TASK *task, unsigned int vec, RT_TRAP_HANDLER handler) |
RTAI_MODULE_PARM (OneShot, int) | |
RTAI_MODULE_PARM (Latency, int) | |
RTAI_MODULE_PARM (SetupTimeTIMER, int) | |
void | krtai_objects_release (void) |
static void | frstk_srq_handler (void) |
static void | nihil (void) |
void | reset_rt_fun_entries (struct rt_native_fun_entry *entry) |
int | set_rt_fun_entries (struct rt_native_fun_entry *entry) |
static void | lxrt_killall (void) |
RTAI_SYSCALL_MODE RTIME | count2nano (RTIME counts) |
RTAI_SYSCALL_MODE RTIME | nano2count (RTIME ns) |
RTAI_SYSCALL_MODE RTIME | count2nano_cpuid (RTIME counts, unsigned int cpuid) |
RTAI_SYSCALL_MODE RTIME | nano2count_cpuid (RTIME ns, unsigned int cpuid) |
RTIME | rt_get_time (void) |
RTAI_SYSCALL_MODE RTIME | rt_get_time_cpuid (unsigned int cpuid) |
RTIME | rt_get_time_ns (void) |
RTAI_SYSCALL_MODE RTIME | rt_get_time_ns_cpuid (unsigned int cpuid) |
RTIME | rt_get_cpu_time_ns (void) |
RTIME | rt_get_real_time (void) |
RTIME | rt_get_real_time_ns (void) |
RT_TASK * | rt_get_base_linux_task (RT_TASK **base_linux_tasks) |
RT_TASK * | rt_alloc_dynamic_task (void) |
RT_TASK ** | rt_register_watchdog (RT_TASK *wd, int cpuid) |
void | rt_deregister_watchdog (RT_TASK *wd, int cpuid) |
static void | _rt_schedule_soft_tail (RT_TASK *rt_task, int cpuid) |
void | rt_schedule_soft (RT_TASK *rt_task) |
void | rt_schedule_soft_tail (RT_TASK *rt_task, int cpuid) |
static void | fast_schedule (RT_TASK *new_task, struct task_struct *lnxtsk, int cpuid) |
RTAI_MODULE_PARM (Reservoir, int) | |
RTAI_MODULE_PARM (SpareKthreads, int) | |
static struct task_struct * | __get_kthread (int cpuid) |
void | rt_daemonize (void) |
static void | kthread_fun (int cpuid) |
static void | kthread_m (int cpuid) |
void | steal_from_linux (RT_TASK *rt_task) |
void | give_back_to_linux (RT_TASK *rt_task, int keeprio) |
static struct task_struct * | get_kthread (int get, int cpuid, void *lnxtsk) |
static void | wake_up_srq_handler (unsigned srq) |
static int | lxrt_handle_trap (int vec, int signo, struct pt_regs *regs, void *dummy_data) |
static void | rt_signal_wake_up (RT_TASK *task) |
static int | lxrt_intercept_schedule_tail (unsigned event, void *nothing) |
static int | lxrt_intercept_sig_wakeup (long event, void *data) |
static int | lxrt_intercept_exit (unsigned long event, struct task_struct *lnx_task) |
long long | rtai_lxrt_invoke (unsigned long, void *, void *) |
static int | lxrt_intercept_syscall_prologue (struct pt_regs *regs) |
static int | lxrt_intercept_syscall_epilogue (unsigned long event, void *nothing) |
void | usp_request_rtc (int, void *) |
void | rt_release_rtc (void) |
static int | rt_gettid (void) |
static int | lxrt_init (void) |
static void | lxrt_exit (void) |
static void | timer_fun (unsigned long none) |
int | rt_registry_alloc (void) |
void | rt_registry_free (void) |
static int | __rtai_lxrt_init (void) |
static void | __rtai_lxrt_exit (void) |
module_init (__rtai_lxrt_init) | |
module_exit (__rtai_lxrt_exit) | |
EXPORT_SYMBOL (rt_fun_lxrt) | |
EXPORT_SYMBOL (clr_rtext) | |
EXPORT_SYMBOL (set_rtext) | |
EXPORT_SYMBOL (get_min_tasks_cpuid) | |
EXPORT_SYMBOL (put_current_on_cpu) | |
EXPORT_SYMBOL (rt_schedule_soft) | |
EXPORT_SYMBOL (rt_do_force_soft) | |
EXPORT_SYMBOL (rt_schedule_soft_tail) | |
EXPORT_SYMBOL (rt_sched_timed) | |
EXPORT_SYMBOL (rtai_handle_isched_lock) | |
EXPORT_SYMBOL (lxrt_prev_task) | |
Variables | |
RT_TASK | rt_smp_linux_task [NR_RT_CPUS] |
RT_TASK * | rt_smp_current [NR_RT_CPUS] |
RTIME | rt_smp_time_h [NR_RT_CPUS] |
int | rt_smp_oneshot_timer [NR_RT_CPUS] |
volatile int | rt_sched_timed |
static struct klist_t | wake_up_sth [NR_RT_CPUS] |
klist_t | wake_up_hts [NR_RT_CPUS] |
klist_t | wake_up_srq [NR_RT_CPUS] |
struct { | |
volatile int locked | |
volatile int rqsted | |
} | rt_scheduling [] |
static unsigned long | rt_smp_linux_cr0 [NR_RT_CPUS] |
static RT_TASK * | rt_smp_fpu_task [NR_RT_CPUS] |
static int | rt_smp_half_tick [NR_RT_CPUS] |
static int | rt_smp_oneshot_running [NR_RT_CPUS] |
static volatile int | rt_smp_timer_shot_fired [NR_RT_CPUS] |
static struct rt_times * | linux_times |
static RT_TASK * | lxrt_wdog_task [NR_RT_CPUS] |
RT_TASK * | lxrt_prev_task [NR_RT_CPUS] |
static struct notifier_block | lxrt_reboot_notifier |
static struct klist_t | klistm [NR_RT_CPUS] |
static struct task_struct * | kthreadm [NR_RT_CPUS] |
static struct semaphore | resem [NR_RT_CPUS] |
static int | endkthread |
struct { | |
int srq | |
volatile unsigned long in | |
volatile unsigned long out | |
void * mp [MAX_FRESTK_SRQ] | |
} | frstk_srq |
int | rtai_kstack_heap_size = (CONFIG_RTAI_KSTACK_HEAPSZ*1024) |
static rtheap_t | rtai_kstack_heap |
static int | tasks_per_cpu [NR_RT_CPUS] = { 0, } |
static int | oneshot_span |
static int | satdlay |
static int | OneShot = CONFIG_RTAI_ONE_SHOT |
static int | Latency = TIMER_LATENCY |
static int | SetupTimeTIMER = TIMER_SETUP_TIME |
rt_fun_entry | rt_fun_lxrt [MAX_LXRT_FUN] |
epoch_struct | boot_epoch |
static RT_TRAP_HANDLER | lxrt_old_trap_handler |
static RT_TASK | thread_task [NR_RT_CPUS] |
static int | rsvr_cnt [NR_RT_CPUS] |
static int | Reservoir = RESERVOIR |
static int | SpareKthreads = 100 |
static int | taskidx [NR_RT_CPUS] |
static struct task_struct ** | taskav [NR_RT_CPUS] |
static unsigned long | traptrans |
static unsigned long | systrans |
int(*[]) | sys_call_table (struct pt_regs) |
static struct rt_native_fun_entry | rt_sched_entries [] |
void * | rtai_lxrt_dispatcher |
DECLARE_FUSION_WAKE_UP_STUFF | |
DECLR_8254_TSC_EMULATION |
#define CALL_TIMER_HANDLER | ( | ) | do { if (timer_shot_fired < 0) rt_timer_handler(); } while (0) |
#define CHECK_LINUX_TIME | ( | ) |
#define cpuid 0 |
Referenced by __rtai_tasklets_exit(), __rtai_tasklets_init(), rt_disable_irq(), rt_insert_timer(), rt_linux_use_fpu(), rt_Name_locate(), rt_receive(), rt_receive_if(), rt_receive_until(), rt_return(), rt_rpc(), rt_rpc_if(), rt_rpc_until(), rt_sem_signal(), rt_send(), rt_send_if(), rt_send_until(), rt_task_suspend_until(), rt_task_wait_period(), rtai_decr_timer_handler(), rtai_hirq_dispatcher(), rtai_syscall_dispatcher(), rtai_timer_handler(), smpproof_task_delete(), and smpproof_task_suspend().
#define DROP_ALL_PENDING_MM2DROP | ( | ) | do { } while (0) |
#define DROP_MM2DROP | ( | cpuid | ) | do { } while (0) |
#define enq_soft_ready_task | ( | ready_task | ) |
Value:
do { \ RT_TASK *task = rt_smp_linux_task[cpuid].rnext; \ if (ready_task == task) break; \ task->rprev = (ready_task->rprev = task->rprev)->rnext = ready_task; \ ready_task->rnext = task; \ } while (0)
Definition at line 661 of file sched.c.
Referenced by fast_schedule(), force_current_soft(), rt_schedule(), and rt_schedule_soft().
#define FIRE_IMMEDIATE_LINUX_TIMER_SHOT | ( | ) |
Value:
do { \ LOCK_LINUX(cpuid); \ rt_timer_handler(); \ UNLOCK_LINUX(cpuid); \ } while (0)
#define FIRE_NEXT_TIMER_SHOT | ( | SHOT_FIRED | ) |
Value:
do { \ if (fire_shot) { \ int delay; \ ONESHOT_DELAY(SHOT_FIRED); \ if (delay > tuned.setup_time_TIMER_CPUNIT) { \ rt_set_timer_delay(imuldiv(delay, TIMER_FREQ, tuned.cpu_freq));\ timer_shot_fired = 1; \ } else { \ rt_times.intr_time = rt_time_h + tuned.setup_time_TIMER_CPUNIT;\ timer_shot_fired = -1;\ } \ } \ } while (0)
Definition at line 849 of file sched.c.
Referenced by rt_schedule(), and rt_timer_handler().
#define fpu_task (rt_smp_fpu_task[cpuid]) |
#define HARD_KTHREAD_IN_USE ((char)220) |
#define IF_GOING_TO_LINUX_CHECK_TIMER_SHOT | ( | fire_shot | ) |
Value:
do { \ if (prio == RT_SCHED_LINUX_PRIORITY) { \ CHECK_LINUX_TIME(); \ if (!timer_shot_fired) {\ fire_shot = 1; \ } \ } \ } while (0)
Definition at line 817 of file sched.c.
Referenced by rt_schedule(), and rt_timer_handler().
#define INTERCEPT_SCHEDULE_HEAD | ( | ) | do { } while (0) |
#define KTHREAD_F_PRIO MAX_LINUX_RTPRIO |
#define KTHREAD_M_PRIO MAX_LINUX_RTPRIO |
#define linux_cr0 (rt_smp_linux_cr0[cpuid]) |
Definition at line 139 of file sched.c.
Referenced by __rtai_lxrt_init(), rt_timers_manager(), and switch_rtai_tasks().
#define LOCK_LINUX | ( | cpuid | ) | do { rt_switch_to_real_time(cpuid); } while (0) |
Definition at line 585 of file sched.c.
Referenced by fast_schedule(), force_current_soft(), rt_schedule(), and rt_schedule_soft().
#define lxrt_context_switch | ( | prev, | |||
next, | |||||
cpuid | ) |
Value:
do { \ SAVE_PREV_TASK(); \ _lxrt_context_switch(prev, next, cpuid); barrier(); \ RTAI_TASK_SWITCH_SIGNAL(); \ } while (0)
Definition at line 759 of file sched.c.
Referenced by fast_schedule(), rt_schedule(), and rt_timer_handler().
#define MAX_FRESTK_SRQ (2 << 6) |
#define ONESHOT_DELAY | ( | SHOT_FIRED | ) |
Value:
do { \ if (!(SHOT_FIRED)) { \ RTIME span; \ if (unlikely((span = rt_times.intr_time - rt_time_h) > oneshot_span)) { \ rt_times.intr_time = rt_time_h + oneshot_span; \ delay = satdlay; \ } else { \ delay = (int)span - tuned.latency; \ } \ } else { \ delay = (int)(rt_times.intr_time - rt_time_h) - tuned.latency; \ } \ } while (0)
#define oneshot_running (rt_smp_oneshot_running[cpuid]) |
Definition at line 131 of file sched.c.
Referenced by __rtai_lxrt_init(), rt_schedule(), rt_set_periodic_mode(), and start_rt_timer().
#define oneshot_timer_cpuid (rt_smp_oneshot_timer[rtai_cpuid()]) |
#define pend_wake_up_hts | ( | lnxtsk, | |||
cpuid | ) |
Value:
do { \ wake_up_hts[cpuid].task[wake_up_hts[cpuid].in++ & (MAX_WAKEUP_SRQ - 1)] = lnxtsk; \ hal_pend_uncond(wake_up_srq[cpuid].srq, cpuid); \ } while (0)
Definition at line 670 of file sched.c.
Referenced by force_current_soft(), and give_back_to_linux().
#define REDO_TIMER_HANDLER | ( | ) | do { if (timer_shot_fired < 0) goto redo_timer_handler; } while (0) |
#define RELEASE_RECOVER_JIFFIES | ( | timer | ) | rt_free_linux_irq(TIMER_8254_IRQ, recover_jiffies) |
#define RELEASE_SCHEDULE_HEAD | ( | ) | do { } while (0) |
#define REQUEST_RECOVER_JIFFIES | ( | ) | rt_request_linux_irq(TIMER_8254_IRQ, recover_jiffies, "rtai_jif_chk", recover_jiffies) |
#define RESTORE_UNLOCK_LINUX | ( | cpuid | ) | do { rt_restore_switch_to_linux(sflags, cpuid); } while (0) |
#define RESTORE_UNLOCK_LINUX_IN_IRQ | ( | cpuid | ) |
#define RR_INTR_TIME | ( | fire_shot | ) |
#define RR_YIELD | ( | ) |
Value:
if (CONFIG_RTAI_ALLOW_RR && rt_current->policy > 0) { \ if (rt_current->yield_time <= rt_times.tick_time) { \ rt_current->rr_remaining = rt_current->rr_quantum; \ if (rt_current->state == RT_SCHED_READY) { \ RT_TASK *task; \ task = rt_current->rnext; \ while (rt_current->priority == task->priority) { \ task = task->rnext; \ } \ if (task != rt_current->rnext) { \ (rt_current->rprev)->rnext = rt_current->rnext; \ (rt_current->rnext)->rprev = rt_current->rprev; \ task->rprev = (rt_current->rprev = task->rprev)->rnext = rt_current; \ rt_current->rnext = task; \ } \ } \ } else { \ rt_current->rr_remaining = rt_current->yield_time - rt_times.tick_time; \ } \ }
Definition at line 543 of file sched.c.
Referenced by rt_schedule(), and rt_timer_handler().
#define RST_EXEC_TIME | ( | ) |
Definition at line 639 of file sched.c.
Referenced by rt_schedule(), rt_timer_handler(), and switch_rtai_tasks().
#define rt_free_sched_ipi | ( | ) |
#define rt_half_tick (rt_smp_half_tick[cpuid]) |
Definition at line 129 of file sched.c.
Referenced by rt_schedule(), rt_timer_handler(), and start_rt_timer().
#define rt_kstack_alloc | ( | sz | ) | rtheap_alloc(&rtai_kstack_heap, sz, 0) |
#define rt_kstack_free | ( | p | ) | rtheap_free(&rtai_kstack_heap, p) |
#define rt_request_sched_ipi | ( | ) | 0 |
#define rt_times (rt_smp_times[cpuid]) |
#define rt_times (rt_smp_times[cpuid]) |
#define RTAI_TASK_SWITCH_SIGNAL | ( | ) |
#define SAVE_LOCK_LINUX | ( | cpuid | ) | do { sflags = rt_save_switch_to_real_time(cpuid); } while (0) |
#define SAVE_LOCK_LINUX_IN_IRQ | ( | cpuid | ) |
#define SAVE_PREV_TASK | ( | ) | do { } while (0) |
#define sched_get_global_lock | ( | cpuid | ) |
#define sched_release_global_lock | ( | cpuid | ) |
Definition at line 193 of file sched.c.
Referenced by fast_schedule(), rt_schedule(), and rt_timer_handler().
#define SCHED_UNLOCK_SCHEDULE | ( | cpuid | ) |
Value:
do { \ rt_scheduling[cpuid].rqsted = 0; \ sched_get_global_lock(cpuid); \ rt_schedule(); \ sched_release_global_lock(cpuid); \ } while (0)
Definition at line 1120 of file sched.c.
Referenced by rt_sched_unlock(), and rtai_handle_isched_lock().
#define SET_EXEC_TIME | ( | ) |
Definition at line 638 of file sched.c.
Referenced by fast_schedule(), rt_schedule(), rt_timer_handler(), and switch_rtai_tasks().
#define SET_NEXT_TIMER_SHOT | ( | fire_shot | ) |
Value:
do { \ fire_shot = 0; \ prio = new_task->priority; \ if (CONFIG_RTAI_ALLOW_RR && new_task->policy > 0) { \ if (new_task->yield_time < rt_times.intr_time) { \ rt_times.intr_time = new_task->yield_time; \ fire_shot = 1; \ } \ } \ task = &rt_linux_task; \ while ((task = task->tnext) != &rt_linux_task && task->resume_time < rt_times.intr_time) { \ if (task->priority <= prio) { \ rt_times.intr_time = task->resume_time; \ fire_shot = 1; \ break; \ } \ } \ } while (0)
Definition at line 797 of file sched.c.
Referenced by rt_schedule(), and rt_timer_handler().
#define SET_PEND_LINUX_TIMER_SHOT | ( | ) |
Value:
do { \ if (rt_times.tick_time >= rt_times.linux_time) { \ if (rt_times.linux_tick > 0) { \ rt_times.linux_time += rt_times.linux_tick; \ } else { \ rt_times.linux_time = RT_TIME_END; \ } \ update_linux_timer(cpuid); \ } \ } while (0)
Definition at line 776 of file sched.c.
Referenced by rt_timer_handler().
#define SYSW_DIAG_MSG | ( | x | ) |
Definition at line 1919 of file sched.c.
Referenced by check_to_soften_harden(), lxrt_handle_trap(), lxrt_intercept_syscall_epilogue(), and lxrt_intercept_syscall_prologue().
#define TASK_TO_SCHEDULE | ( | ) |
Value:
do { \ new_task = rt_linux_task.rnext; \ if (CONFIG_RTAI_ALLOW_RR && new_task->policy > 0) { \ new_task->yield_time = rt_times.tick_time + new_task->rr_remaining; \ } \ } while (0)
Definition at line 565 of file sched.c.
Referenced by rt_schedule(), and rt_timer_handler().
#define timer_shot_fired (rt_smp_timer_shot_fired[cpuid]) |
Definition at line 135 of file sched.c.
Referenced by rt_schedule(), rt_timer_handler(), and start_rt_timer().
#define UNLOCK_LINUX | ( | cpuid | ) | do { rt_switch_to_linux(cpuid); } while (0) |
Definition at line 587 of file sched.c.
Referenced by _rt_schedule_soft_tail(), fast_schedule(), and rt_schedule().
#define WAKE_UP_TASKs | ( | klist | ) |
Value:
do { \ struct klist_t *p = &klist[cpuid]; \ struct task_struct *task; \ while (p->out != p->in) { \ task = p->task[p->out++ & (MAX_WAKEUP_SRQ - 1)]; \ set_task_state(task, TASK_UNINTERRUPTIBLE); \ wake_up_process(task); \ } \ } while (0)
Definition at line 2125 of file sched.c.
Referenced by kthread_m(), and wake_up_srq_handler().
#define WAKE_UP_THREADM | ( | thread | ) |
Value:
do { \ set_task_state(thread, TASK_UNINTERRUPTIBLE); \ wake_up_process(thread); \ } while (0)
Definition at line 2136 of file sched.c.
Referenced by lxrt_exit(), lxrt_init(), and wake_up_srq_handler().
static struct task_struct* __get_kthread | ( | int | cpuid | ) | [static] |
static void __rtai_lxrt_exit | ( | void | ) | [static] |
Definition at line 3104 of file sched.c.
References CLEAR_8254_TSC_EMULATION, current, frstk_srq, krtai_objects_release(), lxrt_exit(), lxrt_killall(), lxrt_reboot_notifier, printk(), rt_free_sched_ipi, rt_free_srq(), rt_registry_free(), rt_set_ihook(), rtai_domain, and rtheap_destroy().
Here is the call graph for this function:
static int __rtai_lxrt_init | ( | void | ) | [static] |
Definition at line 2965 of file sched.c.
References current, frstk_srq, frstk_srq_handler(), imuldiv(), Latency, linux_cr0, lxrt_init(), lxrt_reboot_notifier, OneShot, oneshot_running, ONESHOT_SPAN, printk(), rt_free_sched_ipi, rt_free_srq(), rt_registry_alloc(), rt_registry_free(), rt_request_sched_ipi, rt_request_srq(), RT_SCHED_LINUX_PRIORITY, RT_SCHED_READY, rt_set_ihook(), rt_smp_current, rt_smp_fpu_task, RT_TIME_END, rtai_handle_isched_lock(), rtheap_destroy(), rtheap_init(), SETUP_8254_TSC_EMULATION, SetupTimeTIMER, TIMER_FREQ, TIMER_NAME, and tuned.
Here is the call graph for this function:
static void _rt_schedule_soft_tail | ( | RT_TASK * | rt_task, | |
int | cpuid | |||
) | [inline, static] |
Definition at line 1924 of file sched.c.
References RT_SCHED_READY, RT_SCHED_SFTRDY, rt_schedule(), rt_smp_current, rtai_set_linux_task_priority(), and UNLOCK_LINUX.
Referenced by rt_schedule_soft(), and rt_schedule_soft_tail().
Here is the call graph for this function:
int clr_rtext | ( | RT_TASK * | task | ) |
Definition at line 1158 of file sched.c.
References frstk_srq, MAX_FRESTK_SRQ, rt_pend_linux_srq(), RT_SCHED_DELAYED, RT_SCHED_LINUX_PRIORITY, RT_SCHED_MBXSUSP, RT_SCHED_READY, RT_SCHED_RETURN, RT_SCHED_RPC, RT_SCHED_SEMAPHORE, RT_SCHED_SEND, rt_schedule(), rt_smp_fpu_task, rt_smp_linux_task, RTP_OBJREM, sched_sem_signal(), and task.
Here is the call graph for this function:
Definition at line 1761 of file sched.c.
References llimd(), oneshot_timer_cpuid, TIMER_FREQ, and tuned.
Here is the call graph for this function:
Definition at line 1794 of file sched.c.
References llimd(), TIMER_FREQ, and tuned.
Here is the call graph for this function:
EXPORT_SYMBOL | ( | lxrt_prev_task | ) |
EXPORT_SYMBOL | ( | rtai_handle_isched_lock | ) |
EXPORT_SYMBOL | ( | rt_sched_timed | ) |
EXPORT_SYMBOL | ( | rt_schedule_soft_tail | ) |
EXPORT_SYMBOL | ( | rt_do_force_soft | ) |
EXPORT_SYMBOL | ( | rt_schedule_soft | ) |
EXPORT_SYMBOL | ( | put_current_on_cpu | ) |
EXPORT_SYMBOL | ( | get_min_tasks_cpuid | ) |
EXPORT_SYMBOL | ( | set_rtext | ) |
EXPORT_SYMBOL | ( | clr_rtext | ) |
EXPORT_SYMBOL | ( | rt_fun_lxrt | ) |
static void fast_schedule | ( | RT_TASK * | new_task, | |
struct task_struct * | lnxtsk, | |||
int | cpuid | |||
) | [inline, static] |
Definition at line 1983 of file sched.c.
References CALL_TIMER_HANDLER, enq_soft_ready_task, LOCK_LINUX, lxrt_context_switch, RT_SCHED_READY, rt_smp_current, rtai_sti, sched_release_global_lock, SET_EXEC_TIME, and UNLOCK_LINUX.
Referenced by lxrt_intercept_schedule_tail().
static void force_current_soft | ( | RT_TASK * | rt_current, | |
int | cpuid | |||
) | [inline, static] |
Definition at line 677 of file sched.c.
References enq_soft_ready_task, hal_schedule_back_root, LOCK_LINUX, pend_wake_up_hts, RT_SCHED_READY, rt_schedule(), and rt_smp_current.
Referenced by rt_schedule().
Here is the call graph for this function:
static void frstk_srq_handler | ( | void | ) | [static] |
Definition at line 1686 of file sched.c.
References frstk_srq, MAX_FRESTK_SRQ, and rt_kstack_free.
Referenced by __rtai_lxrt_init().
static struct task_struct* get_kthread | ( | int | get, | |
int | cpuid, | |||
void * | lnxtsk | |||
) | [static] |
Definition at line 2298 of file sched.c.
References __get_kthread(), klistm, kthreadm, resem, rt_smp_current, and rt_task_suspend().
Referenced by start_stop_kthread().
Here is the call graph for this function:
void give_back_to_linux | ( | RT_TASK * | rt_task, | |
int | keeprio | |||
) |
Definition at line 2246 of file sched.c.
References hal_schedule_back_root, pend_wake_up_hts, rt_schedule(), and rtai_set_linux_task_priority().
Referenced by __task_delete(), check_to_soften_harden(), handle_lxrt_request(), kthread_fun(), lxrt_handle_trap(), lxrt_intercept_exit(), lxrt_intercept_syscall_prologue(), and rt_make_soft_real_time().
Here is the call graph for this function:
void krtai_objects_release | ( | void | ) |
Definition at line 1866 of file api.c.
References rt_registry_entry::adr, IS_MBX, IS_PRX, IS_RWL, IS_SEM, IS_SPL, IS_TASK, rt_registry_entry::name, NAMED_MBX_DELETE, NAMED_RWL_DELETE, NAMED_SEM_DELETE, NAMED_SPL_DELETE, PROXY_DETACH, rt_drg_on_adr(), rt_get_registry_slot(), rt_named_task_delete(), rt_printk(), and rt_registry_entry::type.
Referenced by __rtai_lxrt_exit().
Here is the call graph for this function:
static void kthread_fun | ( | int | cpuid | ) | [static] |
Definition at line 2080 of file sched.c.
References clr_rtext(), current, menu::flags, give_back_to_linux(), HARD_KTHREAD_IN_USE, init_hard_fpu, KTHREAD_F_PRIO, put_current_on_cpu(), rdtsc, rt_daemonize(), rt_task_suspend(), rtai_cli, rtai_set_linux_task_priority(), rtai_sti, steal_from_linux(), task, thread_task, TSKEXT0, and TSKEXT1.
Referenced by kthread_m().
Here is the call graph for this function:
static void kthread_m | ( | int | cpuid | ) | [static] |
Definition at line 2142 of file sched.c.
References current, endkthread, klistm, kthread_fun(), KTHREAD_M_PRIO, kthreadm, put_current_on_cpu(), resem, rt_daemonize(), RT_SCHED_READY, RT_SCHED_SUSPENDED, rt_task_resume(), rtai_set_linux_task_priority(), task, thread_task, TSKEXT1, TSKEXT2, wake_up_hts, and WAKE_UP_TASKs.
Referenced by lxrt_init().
Here is the call graph for this function:
static void lxrt_exit | ( | void | ) | [static] |
Definition at line 2896 of file sched.c.
References __get_kthread(), current, DROP_ALL_PENDING_MM2DROP, endkthread, HAL_EXIT_PROCESS, HAL_KICK_PROCESS, hal_root_domain, HAL_SCHEDULE_TAIL, HAL_SYSCALL_EPILOGUE, HAL_SYSCALL_PROLOGUE, kthreadm, RELEASE_SCHEDULE_HEAD, reset_rt_fun_entries(), rt_task_resume(), rtai_catch_event(), set_rtext(), TSKEXT2, and WAKE_UP_THREADM.
Referenced by __rtai_lxrt_exit().
Here is the call graph for this function:
static int lxrt_handle_trap | ( | int | vec, | |
int | signo, | |||
struct pt_regs * | regs, | |||
void * | dummy_data | |||
) | [static] |
Definition at line 2365 of file sched.c.
References give_back_to_linux(), HARD_KTHREAD_IN_USE, rt_printk(), rt_smp_current, rt_task_suspend(), and SYSW_DIAG_MSG.
Referenced by lxrt_init().
Here is the call graph for this function:
static int lxrt_init | ( | void | ) | [static] |
Definition at line 2844 of file sched.c.
References HAL_EXIT_PROCESS, HAL_KICK_PROCESS, hal_root_domain, HAL_SCHEDULE_TAIL, HAL_SYSCALL_EPILOGUE, HAL_SYSCALL_PROLOGUE, init_fun_ext(), INTERCEPT_SCHEDULE_HEAD, klistm, kthread_m(), kthreadm, lxrt_handle_trap(), lxrt_intercept_exit(), lxrt_intercept_schedule_tail(), lxrt_intercept_sig_wakeup(), lxrt_intercept_syscall_epilogue(), lxrt_intercept_syscall_prologue(), MAX_LXRT_FUN, nihil(), resem, rt_fun_lxrt, rtai_catch_event(), rtai_lxrt_invoke(), set_rt_fun_entries(), and WAKE_UP_THREADM.
Referenced by __rtai_lxrt_init().
Here is the call graph for this function:
static int lxrt_intercept_exit | ( | unsigned long | event, | |
struct task_struct * | lnx_task | |||
) | [static] |
Definition at line 2503 of file sched.c.
References give_back_to_linux(), linux_process_termination(), task, and TSKEXT0.
Referenced by lxrt_init().
Here is the call graph for this function:
static int lxrt_intercept_schedule_tail | ( | unsigned | event, | |
void * | nothing | |||
) | [static] |
Definition at line 2471 of file sched.c.
References current, DROP_MM2DROP, fast_schedule(), and wake_up_sth.
Referenced by lxrt_init().
Here is the call graph for this function:
static int lxrt_intercept_sig_wakeup | ( | long | event, | |
void * | data | |||
) | [static] |
Definition at line 2493 of file sched.c.
References INTERCEPT_WAKE_UP_TASK, rt_signal_wake_up(), task, and TSKEXT0.
Referenced by lxrt_init().
Here is the call graph for this function:
static int lxrt_intercept_syscall_epilogue | ( | unsigned long | event, | |
void * | nothing | |||
) | [static] |
Definition at line 2613 of file sched.c.
References current, rt_printk(), RTAI_SYSCALL_NR, steal_from_linux(), SYSW_DIAG_MSG, task, and TSKEXT0.
Referenced by lxrt_init().
Here is the call graph for this function:
static int lxrt_intercept_syscall_prologue | ( | struct pt_regs * | regs | ) | [static] |
Definition at line 2585 of file sched.c.
References current, give_back_to_linux(), LXRT_DO_IMMEDIATE_LINUX_SYSCALL, NR_syscalls, rt_exec_linux_syscall(), rt_printk(), steal_from_linux(), SYSW_DIAG_MSG, task, and TSKEXT0.
Referenced by lxrt_init().
Here is the call graph for this function:
static void lxrt_killall | ( | void | ) | [static] |
Definition at line 1734 of file sched.c.
References rt_task_delete, and stop_rt_timer().
Referenced by __rtai_lxrt_exit(), and lxrt_notify_reboot().
Here is the call graph for this function:
static int lxrt_notify_reboot | ( | struct notifier_block * | nb, | |
unsigned long | event, | |||
void * | ptr | |||
) | [static] |
Definition at line 1746 of file sched.c.
References lxrt_killall(), and printk().
Here is the call graph for this function:
module_exit | ( | __rtai_lxrt_exit | ) |
module_init | ( | __rtai_lxrt_init | ) |
MODULE_LICENSE | ( | "GPL" | ) |
Definition at line 1778 of file sched.c.
References llimd(), oneshot_timer_cpuid, TIMER_FREQ, and tuned.
Here is the call graph for this function:
Definition at line 1811 of file sched.c.
References llimd(), TIMER_FREQ, and tuned.
Here is the call graph for this function:
static void nihil | ( | void | ) | [static] |
Definition at line 1693 of file sched.c.
Referenced by lxrt_init(), reset_rt_fun_entries(), and set_rt_fun_entries().
void put_current_on_cpu | ( | int | cpuid | ) |
Definition at line 226 of file sched.c.
References current, task, and TSKEXT0.
Referenced by __task_init(), kthread_fun(), kthread_m(), and set_rtext().
static irqreturn_t recover_jiffies | ( | int | irq, | |
void * | dev_id, | |||
struct pt_regs * | regs | |||
) | [static] |
Definition at line 1324 of file sched.c.
References rt_times::linux_tick, rt_times::linux_time, linux_times, rt_times::tick_time, and update_linux_timer.
RT_TASK* rt_alloc_dynamic_task | ( | void | ) |
Definition at line 1881 of file sched.c.
References rt_malloc().
Here is the call graph for this function:
int rt_check_current_stack | ( | void | ) |
Definition at line 528 of file sched.c.
References get_stack_pointer(), and RT_RESEM_SUSPDEL.
Here is the call graph for this function:
void rt_daemonize | ( | void | ) |
void rt_deregister_watchdog | ( | RT_TASK * | wd, | |
int | cpuid | |||
) |
Definition at line 1907 of file sched.c.
References lxrt_wdog_task.
Referenced by __rtai_wd_exit(), and __rtai_wd_init().
void rt_do_force_soft | ( | RT_TASK * | rt_task | ) |
Definition at line 650 of file sched.c.
References RT_SCHED_READY.
Referenced by handle_lxrt_request().
Definition at line 1872 of file sched.c.
References rt_smp_linux_task.
Referenced by __rtai_wd_init().
RTIME rt_get_cpu_time_ns | ( | void | ) |
void * rt_get_lxrt_fun_entry | ( | int | index | ) |
Definition at line 1730 of file sched.c.
Referenced by GENERIC_DELETE(), lxrt_Proxy_detach(), lxrt_spl_init(), lxrt_typed_mbx_init(), lxrt_typed_rwl_init(), lxrt_typed_sem_init(), and sched_sem_signal().
RTIME rt_get_real_time | ( | void | ) |
RTIME rt_get_real_time_ns | ( | void | ) |
Definition at line 1865 of file sched.c.
References llimd(), rtai_rdtsc, and tuned.
Here is the call graph for this function:
RTIME rt_get_time | ( | void | ) |
Definition at line 1829 of file sched.c.
References rdtsc, rt_smp_oneshot_timer, rt_smp_times, and rt_times::tick_time.
RTAI_SYSCALL_MODE RTIME rt_get_time_cpuid | ( | unsigned int | cpuid | ) |
RTIME rt_get_time_ns | ( | void | ) |
RTAI_SYSCALL_MODE RTIME rt_get_time_ns_cpuid | ( | unsigned int | cpuid | ) |
RTAI_SYSCALL_MODE int rt_hard_timer_tick_count | ( | void | ) |
Definition at line 1644 of file sched.c.
References rt_times::periodic_tick, rt_sched_timed, and rt_smp_times.
RTAI_SYSCALL_MODE int rt_hard_timer_tick_count_cpuid | ( | int | cpuid | ) |
Definition at line 1654 of file sched.c.
References rt_times::periodic_tick, rt_sched_timed, and rt_smp_times.
int rt_is_hard_timer_running | ( | void | ) |
int rt_kthread_init | ( | RT_TASK * | task, | |
void(*)(long) | rt_thread, | |||
long | data, | |||
int | stack_size, | |||
int | priority, | |||
int | uses_fpu, | |||
void(*)(void) | signal | |||
) |
Definition at line 331 of file sched.c.
References get_min_tasks_cpuid(), rt_kthread_init_cpuid(), and task.
Referenced by __rt_proxy_attach(), and rt_task_init().
Here is the call graph for this function:
int rt_kthread_init_cpuid | ( | RT_TASK * | task, | |
void(*)(long) | rt_thread, | |||
long | data, | |||
int | stack_size, | |||
int | priority, | |||
int | uses_fpu, | |||
void(*)(void) | signal, | |||
unsigned int | cpuid | |||
) |
Definition at line 322 of file sched.c.
References start_stop_kthread(), and task.
Referenced by rt_kthread_init(), rt_task_init_cpuid(), and user_srq().
Here is the call graph for this function:
Definition at line 1892 of file sched.c.
References lxrt_wdog_task, RT_SCHED_HIGHEST_PRIORITY, and task.
Referenced by __rtai_wd_init().
int rt_registry_alloc | ( | void | ) |
Definition at line 1534 of file api.c.
References lxrt_list, MAX_SLOTS, PRIMES_TAB_GRANULARITY, and printk().
Referenced by __rtai_lxrt_init().
Here is the call graph for this function:
void rt_registry_free | ( | void | ) |
Definition at line 1549 of file api.c.
References lxrt_list.
Referenced by __rtai_lxrt_exit(), and __rtai_lxrt_init().
void rt_release_rtc | ( | void | ) |
Definition at line 248 of file hal.c.
References rt_printk().
Here is the call graph for this function:
void rt_sched_lock | ( | void | ) |
Definition at line 1108 of file sched.c.
References locked, rt_scheduling, rtai_restore_flags, and rtai_save_flags_and_cli.
int rt_sched_type | ( | void | ) |
void rt_sched_unlock | ( | void | ) |
Definition at line 1129 of file sched.c.
References locked, rqsted, rt_scheduling, rtai_restore_flags, rtai_save_flags_and_cli, and SCHED_UNLOCK_SCHEDULE.
void rt_schedule | ( | void | ) |
Definition at line 968 of file sched.c.
References CALL_TIMER_HANDLER, current, enq_soft_ready_task, FIRE_NEXT_TIMER_SHOT, force_current_soft(), IF_GOING_TO_LINUX_CHECK_TIMER_SHOT, lnxtsk_uses_fpu, LOCK_LINUX, locked, lxrt_context_switch, NON_RTAI_SCHEDULE, oneshot_running, rdtsc, restore_fpu, RESTORE_UNLOCK_LINUX, RR_YIELD, RST_EXEC_TIME, rt_half_tick, RT_SCHED_READY, RT_SCHED_SFTRDY, rt_scheduling, rt_smp_current, rtai_linux_context, rtai_set_linux_task_priority(), rtai_sti, SAVE_LOCK_LINUX, sched_get_global_lock, sched_release_global_lock, SET_EXEC_TIME, SET_NEXT_TIMER_SHOT, switch_rtai_tasks(), task, TASK_TO_SCHEDULE, timer_shot_fired, TSKEXT0, and UNLOCK_LINUX.
Referenced by _rt_bits_wait(), _rt_bits_wait_until(), _rt_schedule_soft_tail(), clr_rtext(), force_current_soft(), give_back_to_linux(), mbx_wait(), mbx_wait_until(), rt_change_prio(), rt_cndmtx_signal(), rt_insert_timer(), rt_receive(), rt_receive_until(), rt_return(), rt_sem_delete(), rt_sem_signal(), rt_send(), rt_send_until(), rt_set_timer_firing_time(), rt_sleep(), rt_sleep_until(), rt_task_set_resume_end_times(), rt_task_suspend(), rt_task_suspend_until(), rt_task_wait_period(), rt_task_yield(), and rt_wait_signal().
Here is the call graph for this function:
void rt_schedule_soft | ( | RT_TASK * | rt_task | ) |
Definition at line 1955 of file sched.c.
References _rt_schedule_soft_tail(), current, enq_soft_ready_task, LOCK_LINUX, RT_SCHED_READY, and rt_smp_current.
Here is the call graph for this function:
void rt_schedule_soft_tail | ( | RT_TASK * | rt_task, | |
int | cpuid | |||
) |
Definition at line 1978 of file sched.c.
References _rt_schedule_soft_tail().
Referenced by lxrt_fun_call().
Here is the call graph for this function:
void rt_set_oneshot_mode | ( | void | ) |
Definition at line 1364 of file sched.c.
References NR_RT_CPUS, and stop_rt_timer().
Here is the call graph for this function:
void rt_set_periodic_mode | ( | void | ) |
Definition at line 1354 of file sched.c.
References NR_RT_CPUS, oneshot_running, and stop_rt_timer().
Here is the call graph for this function:
RTAI_SYSCALL_MODE void rt_set_runnable_on_cpuid | ( | RT_TASK * | task, | |
unsigned int | cpuid | |||
) |
Definition at line 461 of file sched.c.
References get_min_tasks_cpuid(), llimd(), NR_RT_CPUS, RT_SCHED_DELAYED, rt_smp_linux_task, rt_smp_oneshot_timer, task, TIMER_FREQ, and tuned.
Here is the call graph for this function:
RTAI_SYSCALL_MODE void rt_set_runnable_on_cpus | ( | RT_TASK * | task, | |
unsigned long | run_on_cpus | |||
) |
Definition at line 507 of file sched.c.
References ffnz(), get_min_tasks_cpuid(), rt_set_runnable_on_cpuid(), and task.
Here is the call graph for this function:
RT_TRAP_HANDLER rt_set_task_trap_handler | ( | RT_TASK * | task, | |
unsigned int | vec, | |||
RT_TRAP_HANDLER | handler | |||
) |
static void rt_signal_wake_up | ( | RT_TASK * | task | ) | [inline, static] |
Definition at line 2391 of file sched.c.
References RT_SCHED_READY, rt_task_masked_unblock(), and task.
Referenced by lxrt_intercept_sig_wakeup().
Here is the call graph for this function:
RTAI_SYSCALL_MODE void rt_spv_RMS | ( | int | cpuid | ) |
int rt_task_delete | ( | RT_TASK * | task | ) |
Definition at line 1232 of file sched.c.
References clr_rtext(), start_stop_kthread(), and task.
Here is the call graph for this function:
int rt_task_init | ( | RT_TASK * | task, | |
void(*)(long) | rt_thread, | |||
long | data, | |||
int | stack_size, | |||
int | priority, | |||
int | uses_fpu, | |||
void(*)(void) | signal | |||
) |
Definition at line 454 of file sched.c.
References rt_kthread_init(), and task.
Here is the call graph for this function:
int rt_task_init_cpuid | ( | RT_TASK * | task, | |
void(*)(long) | rt_thread, | |||
long | data, | |||
int | stack_size, | |||
int | priority, | |||
int | uses_fpu, | |||
void(*)(void) | signal, | |||
unsigned int | cpuid | |||
) |
Definition at line 449 of file sched.c.
References rt_kthread_init_cpuid(), and task.
Referenced by __rtai_tasklets_init(), __rtai_wd_init(), rt_named_task_init_cpuid(), rt_request_signal(), rt_request_signal_mq(), and user_srq().
Here is the call graph for this function:
static void rt_timer_handler | ( | void | ) | [static] |
Definition at line 1249 of file sched.c.
References current, DO_TIMER_PROPER_OP, FIRE_NEXT_TIMER_SHOT, IF_GOING_TO_LINUX_CHECK_TIMER_SHOT, lnxtsk_uses_fpu, locked, lxrt_context_switch, rdtsc, REDO_TIMER_HANDLER, restore_fpu, RESTORE_UNLOCK_LINUX_IN_IRQ, RR_YIELD, RST_EXEC_TIME, rt_half_tick, rt_scheduling, rt_set_timer_delay, rt_smp_current, RT_TIME_END, rtai_linux_context, SAVE_LOCK_LINUX_IN_IRQ, sched_get_global_lock, sched_release_global_lock, SET_EXEC_TIME, SET_NEXT_TIMER_SHOT, SET_PEND_LINUX_TIMER_SHOT, switch_rtai_tasks(), task, TASK_TO_SCHEDULE, and timer_shot_fired.
Referenced by start_rt_timer().
Here is the call graph for this function:
void rtai_handle_isched_lock | ( | int | cpuid | ) |
Definition at line 1146 of file sched.c.
References SCHED_UNLOCK_SCHEDULE.
Referenced by __rtai_lxrt_init().
long long rtai_lxrt_invoke | ( | unsigned | long, | |
void * | , | |||
void * | ||||
) |
Referenced by lxrt_init().
RTAI_MODULE_PARM | ( | SpareKthreads | , | |
int | ||||
) |
RTAI_MODULE_PARM | ( | Reservoir | , | |
int | ||||
) |
RTAI_MODULE_PARM | ( | SetupTimeTIMER | , | |
int | ||||
) |
RTAI_MODULE_PARM | ( | Latency | , | |
int | ||||
) |
RTAI_MODULE_PARM | ( | OneShot | , | |
int | ||||
) |
RTAI_MODULE_PARM | ( | rtai_kstack_heap_size | , | |
int | ||||
) |
static void sched_sem_signal | ( | SEM * | sem | ) | [inline, static] |
Definition at line 1153 of file sched.c.
References rt_get_lxrt_fun_entry(), RTAI_SYSCALL_MODE, and SEM_SIGNAL.
Referenced by clr_rtext().
Here is the call graph for this function:
int set_rtext | ( | RT_TASK * | task, | |
int | priority, | |||
int | uses_fpu, | |||
void(*)(void) | signal, | |||
unsigned int | cpuid, | |||
struct task_struct * | relink | |||
) |
Definition at line 244 of file sched.c.
References atomic_inc, current, flags, lxrt_wdog_task, NR_RT_CPUS, put_current_on_cpu(), rt_printk(), RT_SCHED_HIGHEST_PRIORITY, RT_SCHED_READY, RT_SCHED_SUSPENDED, RT_TIME_END, RTAI_NR_TRAPS, task, TSKEXT0, and TSKEXT1.
Here is the call graph for this function:
RTAI_SYSCALL_MODE void start_rt_apic_timers | ( | struct apic_timer_setup_data * | setup_mode, | |
unsigned int | rcvr_jiffies_cpuid | |||
) |
Definition at line 1600 of file sched.c.
References count, nano2count(), rt_set_oneshot_mode(), and start_rt_timer().
Here is the call graph for this function:
RTAI_SYSCALL_MODE RTIME start_rt_timer | ( | int | period | ) |
Definition at line 1563 of file sched.c.
References rt_times::intr_time, rt_times::linux_tick, rt_times::linux_time, linux_times, oneshot_running, rt_times::periodic_tick, REQUEST_RECOVER_JIFFIES, rt_gettimeorig(), rt_half_tick, rt_request_timer(), rt_sched_timed, rt_set_oneshot_mode(), rt_smp_times, rt_timer_handler(), rt_times::tick_time, timer_shot_fired, TIMER_TYPE, and tuned.
Here is the call graph for this function:
static void start_stop_kthread | ( | RT_TASK * | , | |
void(*)(long) | , | |||
long | , | |||
int | , | |||
int | , | |||
void(*)(void) | , | |||
int | ||||
) | [static] |
Definition at line 2333 of file sched.c.
References get_kthread(), set_rtext(), and task.
Referenced by rt_kthread_init_cpuid(), and rt_task_delete().
Here is the call graph for this function:
void steal_from_linux | ( | RT_TASK * | rt_task | ) |
Definition at line 2205 of file sched.c.
References lnxtsk_uses_fpu, rdtsc, restore_fpu, RT_SCHED_READY, rtai_cli, rtai_sti, and wake_up_sth.
Referenced by check_to_soften_harden(), handle_lxrt_request(), kthread_fun(), lxrt_intercept_syscall_epilogue(), lxrt_intercept_syscall_prologue(), and rt_make_hard_real_time().
void stop_rt_timer | ( | void | ) |
Definition at line 1623 of file sched.c.
References RELEASE_RECOVER_JIFFIES, rt_free_timer(), rt_sched_timed, rt_smp_oneshot_timer, and RT_TIME_END.
Here is the call graph for this function:
Definition at line 711 of file sched.c.
References fpu_task, linux_cr0, restore_fpcr, restore_fpenv, RESTORE_UNLOCK_LINUX, RST_EXEC_TIME, rt_exchange_tasks, rt_smp_current, rtai_domain, RTAI_TASK_SWITCH_SIGNAL, save_fpcr_and_enable_fpu, save_fpenv, SAVE_LOCK_LINUX, SAVE_PREV_TASK, and SET_EXEC_TIME.
Referenced by rt_schedule(), and rt_timer_handler().
static void timer_fun | ( | unsigned long | none | ) | [static] |
void usp_request_rtc | ( | int | , | |
void * | ||||
) |
static void wake_up_srq_handler | ( | unsigned | srq | ) | [static] |
Definition at line 2347 of file sched.c.
References kthreadm, wake_up_hts, wake_up_srq, WAKE_UP_TASKs, and WAKE_UP_THREADM.
int endkthread [static] |
struct { ... } frstk_srq [static] |
Referenced by __rtai_lxrt_exit(), __rtai_lxrt_init(), clr_rtext(), and frstk_srq_handler().
struct klist_t klistm[NR_RT_CPUS] [static] |
struct task_struct* kthreadm[NR_RT_CPUS] [static] |
Definition at line 121 of file sched.c.
Referenced by get_kthread(), kthread_m(), lxrt_exit(), lxrt_init(), and wake_up_srq_handler().
int Latency = TIMER_LATENCY [static] |
struct rt_times* linux_times [static] |
RT_TRAP_HANDLER lxrt_old_trap_handler [static] |
RT_TASK* lxrt_prev_task[NR_RT_CPUS] |
struct notifier_block lxrt_reboot_notifier [static] |
Initial value:
{ .notifier_call = &lxrt_notify_reboot, .next = NULL, .priority = 0 }
Definition at line 113 of file sched.c.
Referenced by __rtai_lxrt_exit(), and __rtai_lxrt_init().
RT_TASK* lxrt_wdog_task[NR_RT_CPUS] [static] |
Definition at line 105 of file sched.c.
Referenced by rt_deregister_watchdog(), rt_register_watchdog(), and set_rtext().
int OneShot = CONFIG_RTAI_ONE_SHOT [static] |
int oneshot_span [static] |
struct semaphore resem[NR_RT_CPUS] [static] |
struct rt_fun_entry rt_fun_lxrt[MAX_LXRT_FUN] |
Definition at line 1694 of file sched.c.
Referenced by __rtai_netrpc_init(), init_fun_ext(), and lxrt_init().
struct rt_native_fun_entry rt_sched_entries[] [static] |
volatile int rt_sched_timed |
Definition at line 83 of file sched.c.
Referenced by rt_hard_timer_tick_count(), rt_hard_timer_tick_count_cpuid(), rt_is_hard_timer_running(), start_rt_timer(), and stop_rt_timer().
struct { ... } rt_scheduling[] |
RT_TASK* rt_smp_current[NR_RT_CPUS] |
Definition at line 77 of file sched.c.
Referenced by __rtai_lxrt_init(), _rt_schedule_soft_tail(), fast_schedule(), force_current_soft(), get_kthread(), lxrt_handle_trap(), rt_schedule(), rt_schedule_soft(), rt_timer_handler(), and switch_rtai_tasks().
RT_TASK* rt_smp_fpu_task[NR_RT_CPUS] [static] |
int rt_smp_half_tick[NR_RT_CPUS] [static] |
unsigned long rt_smp_linux_cr0[NR_RT_CPUS] [static] |
RT_TASK rt_smp_linux_task[NR_RT_CPUS] |
Definition at line 75 of file sched.c.
Referenced by __rtai_shm_init(), clr_rtext(), rt_change_prio(), rt_get_base_linux_task(), rt_Name_locate(), rt_set_runnable_on_cpuid(), rt_task_yield(), and watch_looper().
int rt_smp_oneshot_running[NR_RT_CPUS] [static] |
int rt_smp_oneshot_timer[NR_RT_CPUS] |
Definition at line 81 of file sched.c.
Referenced by rt_get_time(), rt_set_runnable_on_cpuid(), and stop_rt_timer().
RTIME rt_smp_time_h[NR_RT_CPUS] |
volatile int rt_smp_timer_shot_fired[NR_RT_CPUS] [static] |
rtheap_t rtai_kstack_heap [static] |
int rtai_kstack_heap_size = (CONFIG_RTAI_KSTACK_HEAPSZ*1024) |
int SetupTimeTIMER = TIMER_SETUP_TIME [static] |
int SpareKthreads = 100 [static] |
int(*[]) sys_call_table(struct pt_regs) |
int tasks_per_cpu[NR_RT_CPUS] = { 0, } [static] |
RT_TASK thread_task[NR_RT_CPUS] [static] |
struct klist_t wake_up_hts[NR_RT_CPUS] |
struct klist_t wake_up_srq[NR_RT_CPUS] |
struct klist_t wake_up_sth[NR_RT_CPUS] [static] |
Definition at line 85 of file sched.c.
Referenced by lxrt_intercept_schedule_tail(), and steal_from_linux().