base/sched/sched.c File Reference

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/timex.h>
#include <linux/sched.h>
#include <linux/irq.h>
#include <linux/reboot.h>
#include <linux/sys.h>
#include <asm/param.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/segment.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <linux/unistd.h>
#include <rtai.h>
#include <asm/rtai_sched.h>
#include <rtai_lxrt.h>
#include <rtai_registry.h>
#include <rtai_nam2num.h>
#include <rtai_schedcore.h>

Include dependency graph for sched.c:

Include dependency graph

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 shot_fired   (rt_smp_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 RR_YIELD()
#define TASK_TO_SCHEDULE()
#define RR_INTR_TIME()
#define LOCK_LINUX_NOTSKPRI(cpuid)   do { rt_switch_to_real_time(cpuid); } while (0)
#define UNLOCK_LINUX_NOTSKPRI(cpuid)   do { rt_switch_to_linux(cpuid); } while (0)
#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 LOCK_LINUX_IN_IRQ(cpuid)
#define UNLOCK_LINUX_IN_IRQ(cpuid)
#define KEXECTIME()
#define UEXECTIME()
#define enq_soft_ready_task(ready_task)
#define pend_wake_up_hts(lnxtsk, cpuid)
#define lxrt_context_switch(prev, next, cpuid)   do { _lxrt_context_switch(prev, next, cpuid); barrier(); } while (0)
#define TIMER_TYPE   0
#define cpuid   0
#define rt_times   (rt_smp_times[cpuid])
#define SYSW_DIAG_MSG(x)
#define RESERVOIR   4
#define WAKE_UP_TASKs(klist)

Functions

 MODULE_LICENSE ("GPL")
int lxrt_notify_reboot (struct notifier_block *nb, unsigned long event, void *ptr)
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)
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))
void rt_set_runnable_on_cpuid (RT_TASK *task, unsigned int cpuid)
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)
void make_current_soft (RT_TASK *rt_current, int cpuid)
RT_TASKswitch_rtai_tasks (RT_TASK *rt_current, RT_TASK *new_task, int cpuid)
void rt_schedule (void)
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)
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)
void rt_timer_handler (void)
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)
RTIME start_rt_timer (int period)
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)
int rt_hard_timer_tick_count (void)
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)
 MODULE_PARM (OneShot,"i")
 MODULE_PARM (Latency,"i")
 MODULE_PARM (SetupTimeTIMER,"i")
void krtai_objects_release (void)
void frstk_srq_handler (void)
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)
void lxrt_killall (void)
RTIME count2nano (RTIME counts)
RTIME nano2count (RTIME ns)
RTIME count2nano_cpuid (RTIME counts, unsigned int cpuid)
RTIME nano2count_cpuid (RTIME ns, unsigned int cpuid)
RTIME rt_get_time (void)
RTIME rt_get_time_cpuid (unsigned int cpuid)
RTIME rt_get_time_ns (void)
RTIME rt_get_time_ns_cpuid (unsigned int cpuid)
RTIME rt_get_cpu_time_ns (void)
RT_TASKrt_get_base_linux_task (RT_TASK **base_linux_tasks)
RT_TASKrt_alloc_dynamic_task (void)
RT_TASK ** rt_register_watchdog (RT_TASK *wd, int cpuid)
void rt_deregister_watchdog (RT_TASK *wd, int cpuid)
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)
void fast_schedule (RT_TASK *new_task, struct task_struct *lnxtsk, int cpuid)
 MODULE_PARM (Reservoir,"i")
 MODULE_PARM (SpareKthreads,"i")
task_struct * __get_kthread (int cpuid)
void detach_kthread (void)
void lxrt_sigfillset (void)
void kthread_fun (int cpuid)
void kthread_m (int cpuid)
void steal_from_linux (RT_TASK *rt_task)
void give_back_to_linux (RT_TASK *rt_task, int keeprio)
task_struct * get_kthread (int get, int cpuid, void *lnxtsk)
void wake_up_srq_handler (unsigned srq)
int lxrt_handle_trap (int vec, int signo, struct pt_regs *regs, void *dummy_data)
void rt_signal_wake_up (RT_TASK *task)
int lxrt_intercept_schedule_tail (unsigned event, void *nothing)
int lxrt_intercept_sig_wakeup (long event, void *data)
int lxrt_intercept_exit (unsigned long event, struct task_struct *lnx_task)
long long rtai_lxrt_invoke (unsigned long, void *, void *)
int lxrt_intercept_syscall_prologue (unsigned long event, struct pt_regs *regs)
int lxrt_intercept_syscall_epilogue (unsigned long event, void *nothing)
void usp_request_rtc (int, void *)
void rt_release_rtc (void)
int lxrt_init (void)
void lxrt_exit (void)
void timer_fun (unsigned long none)
int rt_registry_alloc (void)
void rt_registry_free (void)
int __rtai_lxrt_init (void)
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 (rt_schedule_soft)
 EXPORT_SYMBOL (rt_do_force_soft)
 EXPORT_SYMBOL (rt_sched_timed)
 EXPORT_SYMBOL (rtai_handle_isched_lock)

Variables

RT_TASK rt_smp_linux_task [NR_RT_CPUS]
RT_TASKrt_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
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 []
int rt_smp_linux_cr0 [NR_RT_CPUS]
RT_TASKrt_smp_fpu_task [NR_RT_CPUS]
int rt_smp_half_tick [NR_RT_CPUS]
int rt_smp_oneshot_running [NR_RT_CPUS]
volatile int rt_smp_shot_fired [NR_RT_CPUS]
rt_timeslinux_times
RT_TASKlxrt_wdog_task [NR_RT_CPUS]
notifier_block lxrt_notifier_reboot
klist_t klistb [NR_RT_CPUS]
klist_t klistm [NR_RT_CPUS]
task_struct * kthreadm [NR_RT_CPUS]
semaphore resem [NR_RT_CPUS]
int endkthread
struct {
   int   srq
   volatile unsigned long   in
   volatile unsigned long   out
   void *   mp [MAX_FRESTK_SRQ]
frstk_srq
int tasks_per_cpu [NR_RT_CPUS] = { 0, }
RTIME switch_time [NR_RT_CPUS]
int OneShot = CONFIG_RTAI_ONE_SHOT
int Latency = TIMER_LATENCY
int SetupTimeTIMER = TIMER_SETUP_TIME
rt_fun_entry rt_fun_lxrt [MAX_LXRT_FUN]
RT_TRAP_HANDLER lxrt_old_trap_handler
RT_TASK thread_task [NR_RT_CPUS]
int rsvr_cnt [NR_RT_CPUS]
int Reservoir = RESERVOIR
int SpareKthreads = 100
int taskidx [NR_RT_CPUS]
task_struct ** taskav [NR_RT_CPUS]
unsigned long traptrans
unsigned long systrans
int(* sys_call_table [])(struct pt_regs)
rt_native_fun_entry rt_sched_entries []
void * rtai_lxrt_dispatcher
 DECLARE_FUSION_WAKE_UP_STUFF
 DECLR_8254_TSC_EMULATION


Define Documentation

#define __KERNEL_SYSCALLS__
 

Definition at line 57 of file sched.c.

#define cpuid   0
 

Referenced by __get_kthread(), __rtai_lxrt_init(), _rt_enable_irq(), _rt_end_irq(), _rt_schedule_soft_tail(), count2nano_cpuid(), fast_schedule(), get_kthread(), get_min_tasks_cpuid(), kthread_fun(), kthread_m(), lxrt_exit(), lxrt_init(), lxrt_intercept_schedule_tail(), lxrt_intercept_syscall_prologue(), lxrt_killall(), lxrt_resume(), make_current_soft(), mbx_signal(), nano2count_cpuid(), put_current_on_cpu(), rt_deregister_watchdog(), rt_disable_irq(), rt_get_base_linux_task(), rt_get_time(), rt_get_time_cpuid(), rt_get_time_ns(), RT_get_time_ns_cpuid(), rt_get_time_ns_cpuid(), rt_hard_timer_tick_count(), rt_hard_timer_tick_count_cpuid(), rt_hard_timer_tick_cpuid(), rt_kthread_init_cpuid(), rt_linux_use_fpu(), rt_Name_locate(), rt_pend_linux_srq(), rt_receive(), rt_receive_if(), rt_receive_until(), rt_register_watchdog(), rt_return(), rt_rpc(), rt_rpc_if(), rt_rpc_until(), rt_sched_lock(), rt_sched_unlock(), rt_schedule(), rt_schedule_soft(), rt_schedule_soft_tail(), rt_sem_signal(), rt_send(), rt_send_if(), rt_send_until(), rt_set_oneshot_mode(), rt_set_periodic_mode(), rt_set_runnable_on_cpuid(), rt_set_runnable_on_cpus(), rt_shutdown_irq(), rt_spv_RMS(), rt_task_init_cpuid(), rt_task_suspend_until(), rt_task_wait_period(), rt_timer_handler(), rt_wake_up_timed_tasks(), rtai_handle_isched_lock(), rtai_irq_trampoline(), rtai_save_and_lock_preempt_count(), rtai_trap_fault(), set_rtext(), smpproof_task_delete(), smpproof_task_suspend(), start_rt_apic_timers(), start_rt_timer(), start_slipping_badtask(), stretch_badtask(), switch_rtai_tasks(), wake_up_srq_handler(), and which_cpu().

#define enq_soft_ready_task ready_task   ) 
 

Value:

do { \ RT_TASK *task = rt_smp_linux_task[cpuid].rnext; \ while (ready_task->priority >= task->priority) { \ if ((task = task->rnext)->priority < 0) break; \ } \ task->rprev = (ready_task->rprev = task->rprev)->rnext = ready_task; \ ready_task->rnext = task; \ } while (0)
Definition at line 647 of file sched.c.

Referenced by fast_schedule(), make_current_soft(), rt_schedule(), and rt_schedule_soft().

#define fpu_task   (rt_smp_fpu_task[cpuid])
 

Definition at line 132 of file sched.c.

Referenced by switch_rtai_tasks().

 
#define KEXECTIME  ) 
 

Value:

do { \ RTIME now; \ now = rdtsc(); \ if (!rt_current->lnxtsk) { \ rt_current->exectime[0] += (now - switch_time[cpuid]); \ } \ switch_time[cpuid] = now; \ } while (0)
Definition at line 611 of file sched.c.

Referenced by switch_rtai_tasks().

#define KTHREAD_F_PRIO   MAX_LINUX_RTPRIO
 

Definition at line 150 of file sched.c.

Referenced by kthread_fun().

#define KTHREAD_M_PRIO   MAX_LINUX_RTPRIO
 

Definition at line 149 of file sched.c.

Referenced by kthread_m().

#define linux_cr0   (rt_smp_linux_cr0[cpuid])
 

Definition at line 144 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 598 of file sched.c.

Referenced by fast_schedule(), rt_schedule(), and switch_rtai_tasks().

#define LOCK_LINUX_IN_IRQ cpuid   ) 
 

Definition at line 602 of file sched.c.

Referenced by rt_timer_handler().

#define LOCK_LINUX_NOTSKPRI cpuid   )     do { rt_switch_to_real_time(cpuid); } while (0)
 

Definition at line 592 of file sched.c.

Referenced by fast_schedule(), make_current_soft(), rt_schedule(), and rt_schedule_soft().

#define lxrt_context_switch prev,
next,
cpuid   )     do { _lxrt_context_switch(prev, next, cpuid); barrier(); } while (0)
 

Definition at line 731 of file sched.c.

Referenced by fast_schedule(), rt_schedule(), and rt_timer_handler().

#define MAX_FRESTK_SRQ   (2 << 6)
 

Definition at line 146 of file sched.c.

Referenced by clr_rtext(), and frstk_srq_handler().

#define oneshot_running   (rt_smp_oneshot_running[cpuid])
 

Definition at line 136 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()])
 

Definition at line 138 of file sched.c.

Referenced by count2nano(), and nano2count().

#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 658 of file sched.c.

Referenced by give_back_to_linux(), and make_current_soft().

#define RESERVOIR   4
 

Definition at line 1831 of file sched.c.

 
#define RR_INTR_TIME  ) 
 

Value:

do { \ if (CONFIG_RTAI_ALLOW_RR && new_task->policy > 0) { \ preempt = 1; \ if (new_task->yield_time < rt_times.intr_time) { \ rt_times.intr_time = new_task->yield_time; \ } \ } else { \ preempt = 0; \ } \ } while (0)
Definition at line 574 of file sched.c.

Referenced by rt_schedule(), and rt_timer_handler().

 
#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 544 of file sched.c.

Referenced by rt_schedule(), and rt_timer_handler().

 
#define rt_free_sched_ipi  ) 
 

Definition at line 212 of file sched.c.

Referenced by __rtai_lxrt_exit(), and __rtai_lxrt_init().

#define rt_half_tick   (rt_smp_half_tick[cpuid])
 

Definition at line 134 of file sched.c.

Referenced by rt_schedule(), rt_timer_handler(), and start_rt_timer().

 
#define rt_request_sched_ipi  )     0
 

Definition at line 210 of file sched.c.

Referenced by __rtai_lxrt_init().

#define rt_times   (rt_smp_times[cpuid])
 

Definition at line 142 of file sched.c.

#define rt_times   (rt_smp_times[cpuid])
 

Definition at line 142 of file sched.c.

Referenced by rt_request_timer().

#define sched_get_global_lock cpuid   ) 
 

Definition at line 214 of file sched.c.

Referenced by rt_sched_unlock(), rt_schedule(), rt_timer_handler(), and rtai_handle_isched_lock().

#define sched_release_global_lock cpuid   ) 
 

Definition at line 216 of file sched.c.

Referenced by fast_schedule(), rt_sched_unlock(), rt_schedule(), rt_timer_handler(), and rtai_handle_isched_lock().

#define shot_fired   (rt_smp_shot_fired[cpuid])
 

Definition at line 140 of file sched.c.

Referenced by rt_schedule(), rt_timer_handler(), and start_rt_timer().

#define SYSW_DIAG_MSG  ) 
 

Definition at line 1757 of file sched.c.

Referenced by handle_lxrt_request(), lxrt_handle_trap(), lxrt_intercept_syscall_epilogue(), and lxrt_intercept_syscall_prologue().

 
#define TASK_TO_SCHEDULE  ) 
 

Value:

do { \ prio = (new_task = rt_linux_task.rnext)->priority; \ 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 566 of file sched.c.

Referenced by rt_schedule(), and rt_timer_handler().

#define TIMER_TYPE   0
 

Definition at line 1398 of file sched.c.

Referenced by start_rt_timer().

 
#define UEXECTIME  ) 
 

Value:

do { \ RTIME now; \ now = rdtsc(); \ if (rt_current->is_hard) { \ rt_current->exectime[0] += (now - switch_time[cpuid]); \ } \ switch_time[cpuid] = now; \ } while (0)
Definition at line 621 of file sched.c.

Referenced by fast_schedule(), rt_schedule(), and rt_timer_handler().

#define UNLOCK_LINUX cpuid   )     do { rt_switch_to_linux(cpuid); } while (0)
 

Definition at line 599 of file sched.c.

Referenced by fast_schedule(), rt_schedule(), and switch_rtai_tasks().

#define UNLOCK_LINUX_IN_IRQ cpuid   ) 
 

Definition at line 603 of file sched.c.

Referenced by rt_timer_handler().

#define UNLOCK_LINUX_NOTSKPRI cpuid   )     do { rt_switch_to_linux(cpuid); } while (0)
 

Definition at line 594 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]; \ while (p->out != p->in) { \ wake_up_process(p->task[p->out++ & (MAX_WAKEUP_SRQ - 1)]); \ } \ } while (0)
Definition at line 1923 of file sched.c.

Referenced by kthread_m(), and wake_up_srq_handler().


Function Documentation

struct task_struct* __get_kthread int  cpuid  )  [static]
 

Definition at line 1841 of file sched.c.

References cpuid, flags, taskav, and taskidx.

Referenced by get_kthread(), and lxrt_exit().

void __rtai_lxrt_exit void   )  [static]
 

Definition at line 3045 of file sched.c.

References CLEAR_8254_TSC_EMULATION, frstk_srq, krtai_objects_release(), lxrt_exit(), lxrt_killall(), lxrt_notifier_reboot, printk(), rt_free_sched_ipi, rt_free_srq(), rt_registry_free(), rt_set_ihook(), systrans, and traptrans.

Here is the call graph for this function:

int __rtai_lxrt_init void   )  [static]
 

Definition at line 2932 of file sched.c.

References cpuid, frstk_srq, frstk_srq_handler(), imuldiv(), Latency, linux_cr0, lxrt_init(), lxrt_notifier_reboot, NR_RT_CPUS, OneShot, oneshot_running, 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(), SETUP_8254_TSC_EMULATION, SetupTimeTIMER, TIMER_FREQ, TIMER_NAME, and tuned.

Here is the call graph for this function:

void _rt_schedule_soft_tail RT_TASK rt_task,
int  cpuid
[inline, static]
 

Definition at line 1762 of file sched.c.

References cpuid, RT_SCHED_READY, RT_SCHED_SFTRDY, rt_schedule(), rt_smp_current, RT_TASK, and UNLOCK_LINUX_NOTSKPRI.

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 1014 of file sched.c.

References flags, frstk_srq, MAX_FRESTK_SRQ, MBX, 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, RT_TASK, sched_sem_signal(), SEM, task, and tasks_per_cpu.

Referenced by __task_delete(), __task_init(), kthread_fun(), linux_process_termination(), rt_task_delete(), and soft_kthread_delete().

Here is the call graph for this function:

RTIME count2nano RTIME  counts  ) 
 

Definition at line 1611 of file sched.c.

References llimd(), oneshot_timer_cpuid, RTIME, TIMER_FREQ, and tuned.

Referenced by count2timespec(), main(), and spv().

Here is the call graph for this function:

RTIME count2nano_cpuid RTIME  counts,
unsigned int  cpuid
 

Definition at line 1644 of file sched.c.

References llimd(), RTIME, TIMER_FREQ, and tuned.

Referenced by start_slipping_badtask(), and stretch_badtask().

Here is the call graph for this function:

void detach_kthread void   )  [inline, static]
 

Definition at line 1860 of file sched.c.

Referenced by kthread_fun(), and kthread_m().

EXPORT_SYMBOL rtai_handle_isched_lock   ) 
 

EXPORT_SYMBOL rt_sched_timed   ) 
 

EXPORT_SYMBOL rt_do_force_soft   ) 
 

EXPORT_SYMBOL rt_schedule_soft   ) 
 

EXPORT_SYMBOL get_min_tasks_cpuid   ) 
 

EXPORT_SYMBOL set_rtext   ) 
 

EXPORT_SYMBOL clr_rtext   ) 
 

EXPORT_SYMBOL rt_fun_lxrt   ) 
 

void fast_schedule RT_TASK new_task,
struct task_struct *  lnxtsk,
int  cpuid
[inline, static]
 

Definition at line 1801 of file sched.c.

References cpuid, enq_soft_ready_task, LOCK_LINUX, LOCK_LINUX_NOTSKPRI, lxrt_context_switch, RT_SCHED_READY, rt_smp_current, RT_TASK, sched_release_global_lock, UEXECTIME, UNLOCK_LINUX, and UNLOCK_LINUX_NOTSKPRI.

Referenced by lxrt_intercept_schedule_tail().

void frstk_srq_handler void   )  [static]
 

Definition at line 1533 of file sched.c.

References frstk_srq, MAX_FRESTK_SRQ, and sched_free.

Referenced by __rtai_lxrt_init().

struct task_struct* get_kthread int  get,
int  cpuid,
void *  lnxtsk
[static]
 

Definition at line 2051 of file sched.c.

References __get_kthread(), cpuid, klistm, kthreadm, resem, rt_smp_current, RT_TASK, and rt_task_suspend().

Referenced by start_stop_kthread().

Here is the call graph for this function:

int get_min_tasks_cpuid void   ) 
 

Definition at line 224 of file sched.c.

References cpuid, NR_RT_CPUS, and tasks_per_cpu.

void give_back_to_linux RT_TASK rt_task,
int  keeprio
 

Definition at line 2029 of file sched.c.

References hal_schedule_back_root, pend_wake_up_hts, rt_schedule(), and RT_TASK.

Referenced by __task_delete(), force_soft(), handle_lxrt_request(), kthread_fun(), lxrt_handle_trap(), lxrt_intercept_exit(), lxrt_intercept_syscall_prologue(), and rt_do_signal().

Here is the call graph for this function:

void krtai_objects_release void   ) 
 

Definition at line 1701 of file api.c.

References rt_registry_entry::adr, IS_MBX, IS_PRX, IS_RWL, IS_SEM, IS_SPL, IS_TASK, max_slots, rt_registry_entry::name, NAMED_MBX_DELETE, NAMED_RWL_DELETE, NAMED_SEM_DELETE, NAMED_SPL_DELETE, num2nam(), PROXY_DETACH, rt_drg_on_adr(), rt_fun_lxrt, 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:

void kthread_fun int  cpuid  )  [static]
 

Definition at line 1888 of file sched.c.

References clr_rtext(), cpuid, detach_kthread(), give_back_to_linux(), init_hard_fpu, KTHREAD_F_PRIO, lxrt_sigfillset(), put_current_on_cpu(), rdtsc, rsvr_cnt, RT_TASK, rt_task_suspend(), rtai_cli, rtai_sti, SpareKthreads, steal_from_linux(), task, taskav, taskidx, thread_task, TSKEXT0, and TSKEXT1.

Referenced by kthread_m().

Here is the call graph for this function:

void kthread_m int  cpuid  )  [static]
 

Definition at line 1931 of file sched.c.

References cpuid, detach_kthread(), endkthread, flags, klistm, kthread_fun(), KTHREAD_M_PRIO, kthreadm, lxrt_sigfillset(), put_current_on_cpu(), resem, Reservoir, RT_SCHED_READY, RT_SCHED_SUSPENDED, RT_TASK, rt_task_resume(), SpareKthreads, task, taskav, taskidx, thread_task, TSKEXT1, TSKEXT2, wake_up_hts, and WAKE_UP_TASKs.

Referenced by lxrt_init().

Here is the call graph for this function:

void lxrt_exit void   )  [static]
 

Definition at line 2847 of file sched.c.

References __get_kthread(), cpuid, endkthread, flags, HAL_EXIT_PROCESS, HAL_KICK_PROCESS, hal_root_domain, HAL_SCHEDULE_HEAD, HAL_SCHEDULE_TAIL, HAL_SYSCALL_EPILOGUE, HAL_SYSCALL_PROLOGUE, kthreadm, lxrt_old_trap_handler, reset_rt_fun_entries(), rt_sched_entries, RT_TASK, rt_task_resume(), rtai_critical_enter(), rtai_critical_exit(), rtai_lxrt_dispatcher, set_rtext(), taskav, and TSKEXT2.

Referenced by __rtai_lxrt_exit().

Here is the call graph for this function:

int lxrt_handle_trap int  vec,
int  signo,
struct pt_regs *  regs,
void *  dummy_data
[static]
 

Definition at line 2124 of file sched.c.

References give_back_to_linux(), rt_printk(), rt_smp_current, RT_TASK, rt_task_suspend(), SYSW_DIAG_MSG, and traptrans.

Referenced by lxrt_init().

Here is the call graph for this function:

int lxrt_init void   )  [static]
 

Definition at line 2791 of file sched.c.

References cpuid, HAL_EXIT_PROCESS, HAL_KICK_PROCESS, hal_root_domain, HAL_SCHEDULE_HEAD, HAL_SCHEDULE_TAIL, HAL_SYSCALL_EPILOGUE, HAL_SYSCALL_PROLOGUE, init_fun_ext(), 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(), lxrt_old_trap_handler, MAX_LXRT_FUN, nihil(), NR_RT_CPUS, resem, Reservoir, rt_fun_lxrt, rt_sched_entries, rtai_lxrt_dispatcher, rtai_lxrt_invoke(), set_rt_fun_entries(), SpareKthreads, and taskav.

Referenced by __rtai_lxrt_init().

Here is the call graph for this function:

int lxrt_intercept_exit unsigned long  event,
struct task_struct *  lnx_task
[static]
 

Definition at line 2272 of file sched.c.

References give_back_to_linux(), IN_INTERCEPT_IRQ_ENABLE, linux_process_termination(), RT_TASK, task, and TSKEXT0.

Referenced by lxrt_init().

Here is the call graph for this function:

int lxrt_intercept_schedule_tail unsigned  event,
void *  nothing
[static]
 

Definition at line 2205 of file sched.c.

References cpuid, fast_schedule(), IN_INTERCEPT_IRQ_ENABLE, and klistb.

Referenced by lxrt_init().

Here is the call graph for this function:

int lxrt_intercept_sig_wakeup long  event,
void *  data
[static]
 

Definition at line 2261 of file sched.c.

References IN_INTERCEPT_IRQ_ENABLE, INTERCEPT_WAKE_UP_TASK, rt_signal_wake_up(), RT_TASK, task, and TSKEXT0.

Referenced by lxrt_init().

Here is the call graph for this function:

int lxrt_intercept_syscall_epilogue unsigned long  event,
void *  nothing
[static]
 

Definition at line 2408 of file sched.c.

References IN_INTERCEPT_IRQ_ENABLE, rt_printk(), RT_TASK, RTAI_SYSCALL_NR, steal_from_linux(), SYSW_DIAG_MSG, task, and TSKEXT0.

Referenced by lxrt_init().

Here is the call graph for this function:

int lxrt_intercept_syscall_prologue unsigned long  event,
struct pt_regs *  regs
[static]
 

Definition at line 2356 of file sched.c.

References cpuid, give_back_to_linux(), IN_INTERCEPT_IRQ_ENABLE, likely, RT_EINTR, rt_exec_linux_syscall(), rt_printk(), rt_smp_current, RT_TASK, RTAI_FAKE_LINUX_SYSCALL, rtai_lxrt_invoke(), RTAI_SYSCALL_NR, SET_LXRT_RETVAL_IN_SYSCALL, SKIP_IMMEDIATE_LINUX_SYSCALL, steal_from_linux(), sys_call_table, systrans, SYSW_DIAG_MSG, task, and unlikely.

Referenced by lxrt_init().

Here is the call graph for this function:

void lxrt_killall void   )  [static]
 

Definition at line 1581 of file sched.c.

References cpuid, NR_RT_CPUS, rt_task_delete(), and stop_rt_timer().

Referenced by __rtai_lxrt_exit(), and lxrt_notify_reboot().

Here is the call graph for this function:

int lxrt_notify_reboot struct notifier_block *  nb,
unsigned long  event,
void *  ptr
[static]
 

Definition at line 1592 of file sched.c.

References lxrt_killall(), and printk().

Here is the call graph for this function:

void lxrt_sigfillset void   )  [inline, static]
 

Definition at line 1873 of file sched.c.

Referenced by kthread_fun(), and kthread_m().

void make_current_soft RT_TASK rt_current,
int  cpuid
[inline, static]
 

Definition at line 665 of file sched.c.

References cpuid, enq_soft_ready_task, hal_schedule_back_root, LOCK_LINUX_NOTSKPRI, pend_wake_up_hts, RT_SCHED_READY, rt_schedule(), rt_smp_current, and RT_TASK.

Referenced by rt_schedule().

Here is the call graph for this function:

module_exit __rtai_lxrt_exit   ) 
 

module_init __rtai_lxrt_init   ) 
 

MODULE_LICENSE "GPL"   ) 
 

MODULE_PARM SpareKthreads  ,
"i" 
 

MODULE_PARM Reservoir  ,
"i" 
 

MODULE_PARM SetupTimeTIMER  ,
"i" 
 

MODULE_PARM Latency  ,
"i" 
 

MODULE_PARM OneShot  ,
"i" 
 

RTIME nano2count RTIME  ns  ) 
 

Definition at line 1628 of file sched.c.

References llimd(), oneshot_timer_cpuid, RTIME, TIMER_FREQ, and tuned.

Referenced by __rtai_wd_init(), hard_stub_fun(), main(), RT_mbx_receive_timed(), RT_mbx_receive_until(), RT_mbx_send_timed(), RT_mbx_send_until(), RT_receive_timed(), RT_receive_until(), RT_receivex_timed(), RT_receivex_until(), RT_rpc_timed(), RT_rpc_until(), RT_rpcx_timed(), RT_rpcx_until(), RT_sem_wait_timed(), RT_sem_wait_until(), RT_send_timed(), RT_send_until(), RT_sendx_timed(), RT_sendx_until(), RT_sleep(), RT_sleep_until(), soft_stub_fun(), start_rt_apic_timers(), timespec2count(), and user_srq().

Here is the call graph for this function:

RTIME nano2count_cpuid RTIME  ns,
unsigned int  cpuid
 

Definition at line 1661 of file sched.c.

References llimd(), RTIME, TIMER_FREQ, and tuned.

Referenced by __rtai_wd_init(), rt_set_sched_policy(), and rt_task_make_periodic_relative_ns().

Here is the call graph for this function:

void nihil void   )  [static]
 

Definition at line 1540 of file sched.c.

Referenced by lxrt_init(), reset_rt_fun_entries(), and set_rt_fun_entries().

void put_current_on_cpu int  cpuid  )  [static]
 

Definition at line 236 of file sched.c.

References cpuid, RT_TASK, task, and TSKEXT0.

Referenced by kthread_fun(), kthread_m(), and set_rtext().

irqreturn_t recover_jiffies int  irq,
void *  dev_id,
struct pt_regs *  regs
[static]
 

Definition at line 1210 of file sched.c.

References rt_times::linux_tick, rt_times::linux_time, linux_times, rt_times::tick_time, and update_linux_timer.

Referenced by start_rt_timer(), and stop_rt_timer().

RT_TASK* rt_alloc_dynamic_task void   ) 
 

Definition at line 1719 of file sched.c.

References rt_malloc(), and RT_TASK.

Here is the call graph for this function:

int rt_check_current_stack void   ) 
 

Definition at line 529 of file sched.c.

References get_stack_pointer().

Here is the call graph for this function:

void rt_deregister_watchdog RT_TASK wd,
int  cpuid
 

Definition at line 1745 of file sched.c.

References cpuid, lxrt_wdog_task, and RT_TASK.

Referenced by __rtai_wd_exit(), and __rtai_wd_init().

void rt_do_force_soft RT_TASK rt_task  ) 
 

Definition at line 636 of file sched.c.

References RT_SCHED_READY, and RT_TASK.

Referenced by handle_lxrt_request().

RT_TASK* rt_get_base_linux_task RT_TASK **  base_linux_tasks  ) 
 

Definition at line 1710 of file sched.c.

References cpuid, rt_smp_linux_task, and RT_TASK.

Referenced by __rtai_tasklets_init(), __rtai_wd_init(), init_fun_ext(), and register_lxrt_fifos_support().

RTIME rt_get_cpu_time_ns void   ) 
 

Definition at line 1703 of file sched.c.

References llimd(), rdtsc, RTIME, and tuned.

Here is the call graph for this function:

void * rt_get_lxrt_fun_entry int  index  ) 
 

Definition at line 1577 of file sched.c.

References rt_fun_lxrt.

RTIME rt_get_time void   ) 
 

Definition at line 1679 of file sched.c.

References cpuid, rdtsc, rt_smp_oneshot_timer, rt_smp_times, RTIME, and rt_times::tick_time.

RTIME rt_get_time_cpuid unsigned int  cpuid  ) 
 

Definition at line 1685 of file sched.c.

References rdtsc, and RTIME.

Referenced by __rtai_wd_init(), rt_task_make_periodic_relative_ns(), and watchdog().

RTIME rt_get_time_ns void   ) 
 

Definition at line 1690 of file sched.c.

References cpuid, llimd(), rdtsc, RTIME, TIMER_FREQ, and tuned.

Here is the call graph for this function:

RTIME rt_get_time_ns_cpuid unsigned int  cpuid  ) 
 

Definition at line 1697 of file sched.c.

References llimd(), rdtsc, RTIME, TIMER_FREQ, and tuned.

Referenced by RT_get_time_ns_cpuid().

Here is the call graph for this function:

int rt_get_timer_cpu void   ) 
 

Definition at line 1099 of file sched.c.

int rt_hard_timer_tick_count void   ) 
 

Definition at line 1491 of file sched.c.

References cpuid, rt_times::periodic_tick, rt_sched_timed, and rt_smp_times.

int rt_hard_timer_tick_count_cpuid int  cpuid  ) 
 

Definition at line 1501 of file sched.c.

References cpuid, rt_times::periodic_tick, rt_sched_timed, and rt_smp_times.

int rt_is_hard_timer_running void   ) 
 

Definition at line 1223 of file sched.c.

References rt_sched_timed.

int rt_kthread_init RT_TASK task,
void(*  rt_thread)(long),
long  data,
int  stack_size,
int  priority,
int  uses_fpu,
void(*  signal)(void)
 

Definition at line 338 of file sched.c.

References get_min_tasks_cpuid(), rt_kthread_init_cpuid(), RT_TASK, 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(*  rt_thread)(long),
long  data,
int  stack_size,
int  priority,
int  uses_fpu,
void(*  signal)(void),
unsigned int  cpuid
 

Definition at line 329 of file sched.c.

References cpuid, RT_TASK, start_stop_kthread(), and task.

Referenced by rt_kthread_init(), and rt_task_init_cpuid().

Here is the call graph for this function:

RT_TASK** rt_register_watchdog RT_TASK wd,
int  cpuid
 

Definition at line 1730 of file sched.c.

References cpuid, lxrt_wdog_task, RT_SCHED_HIGHEST_PRIORITY, RT_TASK, and task.

Referenced by __rtai_wd_init().

int rt_registry_alloc void   ) 
 

Definition at line 1369 of file api.c.

References lxrt_list, MAX_SLOTS, max_slots, primes, 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 1384 of file api.c.

References lxrt_list.

Referenced by __rtai_lxrt_exit(), and __rtai_lxrt_init().

void rt_sched_lock void   ) 
 

Definition at line 966 of file sched.c.

References cpuid, flags, rt_scheduling, rtai_restore_flags, and rtai_save_flags_and_cli.

int rt_sched_type void   ) 
 

Definition at line 1485 of file sched.c.

References RT_SCHED_MUP.

Referenced by __rtai_tasklets_init(), and __rtai_wd_init().

void rt_sched_unlock void   ) 
 

Definition at line 979 of file sched.c.

References cpuid, flags, rt_schedule(), rt_scheduling, rtai_restore_flags, rtai_save_flags_and_cli, sched_get_global_lock, and sched_release_global_lock.

Here is the call graph for this function:

void rt_schedule void   ) 
 

Definition at line 818 of file sched.c.

References cpuid, enq_soft_ready_task, imuldiv(), lnxtsk_uses_fpu, LOCK_LINUX, LOCK_LINUX_NOTSKPRI, lxrt_context_switch, make_current_soft(), NON_RTAI_SCHEDULE, oneshot_running, rdtsc, restore_fpu, RR_INTR_TIME, RR_YIELD, rt_half_tick, RT_SCHED_LINUX_PRIORITY, RT_SCHED_READY, RT_SCHED_SFTRDY, rt_scheduling, rt_set_timer_delay, rt_smp_current, RT_TASK, rtai_cli, RTIME, sched_get_global_lock, sched_release_global_lock, shot_fired, switch_rtai_tasks(), task, TASK_TO_SCHEDULE, TIMER_FREQ, tuned, UEXECTIME, UNLOCK_LINUX, and UNLOCK_LINUX_NOTSKPRI.

Referenced by _rt_bits_wait(), _rt_bits_wait_until(), _rt_schedule_soft_tail(), clr_rtext(), give_back_to_linux(), make_current_soft(), mbx_signal(), rt_change_prio(), rt_cndmtx_signal(), rt_exec_linux_syscall(), rt_receive(), rt_receive_linux_syscall(), rt_receive_until(), rt_return(), rt_sched_unlock(), rt_sem_delete(), rt_sem_signal(), rt_send(), rt_send_until(), 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(), rt_wait_signal(), rtai_handle_isched_lock(), and stop_rt_timer().

Here is the call graph for this function:

void rt_schedule_soft RT_TASK rt_task  ) 
 

Definition at line 1774 of file sched.c.

References _rt_schedule_soft_tail(), cpuid, enq_soft_ready_task, LOCK_LINUX_NOTSKPRI, RT_SCHED_READY, rt_smp_current, and RT_TASK.

Referenced by lxrt_resume(), soft_rt_fun_call(), and soft_rt_genfun_call().

Here is the call graph for this function:

void rt_schedule_soft_tail RT_TASK rt_task,
int  cpuid
 

Definition at line 1796 of file sched.c.

References _rt_schedule_soft_tail(), cpuid, and RT_TASK.

Referenced by lxrt_resume().

Here is the call graph for this function:

void rt_set_oneshot_mode void   ) 
 

Definition at line 1239 of file sched.c.

References cpuid, NR_RT_CPUS, and stop_rt_timer().

Here is the call graph for this function:

void rt_set_periodic_mode void   ) 
 

Definition at line 1229 of file sched.c.

References cpuid, NR_RT_CPUS, oneshot_running, and stop_rt_timer().

Here is the call graph for this function:

void rt_set_runnable_on_cpuid RT_TASK task,
unsigned int  cpuid
 

Definition at line 464 of file sched.c.

References cpuid, flags, get_min_tasks_cpuid(), llimd(), NR_RT_CPUS, RT_SCHED_DELAYED, rt_smp_linux_task, rt_smp_oneshot_timer, RT_TASK, task, TIMER_FREQ, and tuned.

Referenced by rt_set_runnable_on_cpus().

Here is the call graph for this function:

void rt_set_runnable_on_cpus RT_TASK task,
unsigned long  run_on_cpus
 

Definition at line 508 of file sched.c.

References cpuid, ffnz(), get_min_tasks_cpuid(), rt_set_runnable_on_cpuid(), RT_TASK, 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
 

Definition at line 1510 of file sched.c.

References handler, RT_TASK, RT_TRAP_HANDLER, RTAI_NR_TRAPS, and task.

void rt_signal_wake_up RT_TASK task  )  [inline, static]
 

Definition at line 2150 of file sched.c.

References RT_SCHED_READY, RT_TASK, rt_task_masked_unblock(), and task.

Referenced by lxrt_intercept_sig_wakeup().

Here is the call graph for this function:

void rt_spv_RMS int  cpuid  ) 
 

Definition at line 929 of file sched.c.

References cpuid, RT_TASK, RT_TIME_END, RTIME, and task.

int rt_task_delete RT_TASK task  ) 
 

Definition at line 1088 of file sched.c.

References clr_rtext(), RT_TASK, start_stop_kthread(), and task.

Referenced by __rtai_netrpc_exit(), __rtai_tasklets_exit(), __rtai_wd_exit(), lxrt_killall(), main(), mbx_signal(), port_server_fun(), pthread_exit_rt(), pthread_testcancel_rt(), rt_named_task_delete(), rt_named_task_init(), rt_named_task_init_cpuid(), rt_Proxy_detach(), rt_proxy_detach(), rt_sem_delete(), rt_sem_signal(), signal_suprt_fun(), smpproof_task_delete(), support_tasklet(), and user_srq().

Here is the call graph for this function:

int rt_task_init RT_TASK task,
void(*  rt_thread)(long),
long  data,
int  stack_size,
int  priority,
int  uses_fpu,
void(*  signal)(void)
 

Definition at line 457 of file sched.c.

References rt_kthread_init(), RT_TASK, and task.

Referenced by __rtai_tasklets_init(), port_server_fun(), and rt_named_task_init().

Here is the call graph for this function:

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
 

Definition at line 452 of file sched.c.

References cpuid, rt_kthread_init_cpuid(), RT_TASK, and task.

Referenced by __rtai_wd_init(), rt_named_task_init_cpuid(), rt_request_signal(), and user_srq().

Here is the call graph for this function:

void rt_timer_handler void   )  [static]
 

Definition at line 1105 of file sched.c.

References cpuid, DO_TIMER_PROPER_OP, imuldiv(), lnxtsk_uses_fpu, LOCK_LINUX_IN_IRQ, lxrt_context_switch, ONESHOT_SPAN, rdtsc, restore_fpu, RR_INTR_TIME, RR_YIELD, rt_half_tick, RT_SCHED_LINUX_PRIORITY, rt_scheduling, rt_set_timer_delay, rt_smp_current, RT_TASK, rtai_cli, RTIME, sched_get_global_lock, sched_release_global_lock, shot_fired, switch_rtai_tasks(), task, TASK_TO_SCHEDULE, TIMER_FREQ, tuned, UEXECTIME, UNLOCK_LINUX_IN_IRQ, and update_linux_timer.

Referenced by start_rt_timer().

Here is the call graph for this function:

void rtai_handle_isched_lock int  cpuid  ) 
 

Definition at line 999 of file sched.c.

References cpuid, rt_schedule(), sched_get_global_lock, and sched_release_global_lock.

Referenced by __rtai_lxrt_init().

Here is the call graph for this function:

long long rtai_lxrt_invoke unsigned  long,
void *  ,
void * 
 

Referenced by lxrt_init().

void sched_sem_signal SEM sem  )  [inline, static]
 

Definition at line 1009 of file sched.c.

References rt_get_lxrt_fun_entry(), SEM, 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(*  signal)(void),
unsigned int  cpuid,
struct task_struct *  relink
 

Definition at line 255 of file sched.c.

References atomic_inc(), cpuid, flags, lxrt_wdog_task, NR_RT_CPUS, put_current_on_cpu(), rt_printk(), RT_SCHED_HIGHEST_PRIORITY, RT_SCHED_READY, RT_SCHED_SUSPENDED, RT_TASK, RT_TIME_END, RTAI_NR_TRAPS, task, tasks_per_cpu, TSKEXT0, and TSKEXT1.

Referenced by __task_init(), lxrt_exit(), start_stop_kthread(), and thread_fun().

Here is the call graph for this function:

void start_rt_apic_timers struct apic_timer_setup_data *  setup_mode,
unsigned int  rcvr_jiffies_cpuid
 

Definition at line 1440 of file sched.c.

References cpuid, nano2count(), NR_RT_CPUS, rt_set_oneshot_mode(), and start_rt_timer().

Referenced by __rtai_wd_init().

Here is the call graph for this function:

RTIME start_rt_timer int  period  ) 
 

Definition at line 1403 of file sched.c.

References cpuid, flags, rt_times::intr_time, rt_times::linux_tick, rt_times::linux_time, linux_times, oneshot_running, rt_times::periodic_tick, recover_jiffies(), rt_half_tick, rt_request_linux_irq(), rt_request_timer(), rt_sched_timed, rt_set_oneshot_mode(), rt_smp_times, rt_timer_handler(), RTIME, shot_fired, rt_times::tick_time, TIMER_8254_IRQ, TIMER_TYPE, and tuned.

Referenced by __rtai_wd_init(), main(), start_rt_apic_timers(), and user_srq().

Here is the call graph for this function:

void start_stop_kthread RT_TASK ,
void(*  )(long),
long  ,
int  ,
int  ,
void(*  )(void),
int 
[static]
 

Definition at line 2086 of file sched.c.

References get_kthread(), RT_TASK, 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 1993 of file sched.c.

References klistb, lnxtsk_uses_fpu, rdtsc, restore_fpu, RT_SCHED_READY, RT_TASK, rtai_cli, and rtai_sti.

Referenced by handle_lxrt_request(), kthread_fun(), lxrt_intercept_syscall_epilogue(), lxrt_intercept_syscall_prologue(), and rt_do_signal().

void stop_rt_timer void   ) 
 

Definition at line 1463 of file sched.c.

References flags, recover_jiffies(), rt_free_linux_irq(), rt_free_timer(), rt_sched_timed, rt_schedule(), rt_smp_oneshot_timer, RT_TIME_END, and TIMER_8254_IRQ.

Here is the call graph for this function:

RT_TASK* switch_rtai_tasks RT_TASK rt_current,
RT_TASK new_task,
int  cpuid
[static]
 

Definition at line 690 of file sched.c.

References cpuid, fpu_task, KEXECTIME, linux_cr0, LOCK_LINUX, restore_fpcr, restore_fpenv, rt_exchange_tasks, rt_smp_current, RT_TASK, save_fpcr_and_enable_fpu, save_fpenv, and UNLOCK_LINUX.

Referenced by rt_schedule(), and rt_timer_handler().

void timer_fun unsigned long  none  )  [static]
 

Definition at line 2921 of file sched.c.

References TICK_8254_TSC_EMULATION.

void usp_request_rtc int  ,
void * 
 

void wake_up_srq_handler unsigned  srq  )  [static]
 

Definition at line 2100 of file sched.c.

References cpuid, kthreadm, srq, wake_up_hts, wake_up_srq, and WAKE_UP_TASKs.


Variable Documentation

DECLARE_FUSION_WAKE_UP_STUFF
 

Definition at line 2789 of file sched.c.

DECLR_8254_TSC_EMULATION
 

Definition at line 2919 of file sched.c.

int endkthread [static]
 

Definition at line 130 of file sched.c.

Referenced by kthread_m(), and lxrt_exit().

struct { ... } frstk_srq [static]
 

Referenced by __rtai_lxrt_exit(), __rtai_lxrt_init(), clr_rtext(), and frstk_srq_handler().

volatile unsigned long in
 

Definition at line 147 of file sched.c.

struct klist_t klistb[NR_RT_CPUS] [static]
 

Definition at line 122 of file sched.c.

Referenced by lxrt_intercept_schedule_tail(), and steal_from_linux().

struct klist_t klistm[NR_RT_CPUS] [static]
 

Definition at line 124 of file sched.c.

Referenced by get_kthread(), kthread_m(), and lxrt_init().

struct task_struct* kthreadm[NR_RT_CPUS] [static]
 

Definition at line 126 of file sched.c.

Referenced by get_kthread(), kthread_m(), lxrt_exit(), lxrt_init(), and wake_up_srq_handler().

int Latency = TIMER_LATENCY [static]
 

Definition at line 1525 of file sched.c.

Referenced by __rtai_lxrt_init().

struct rt_times* linux_times [static]
 

Definition at line 108 of file sched.c.

Referenced by recover_jiffies(), and start_rt_timer().

volatile int locked
 

Definition at line 96 of file sched.c.

struct notifier_block lxrt_notifier_reboot [static]
 

Initial value:

{ .notifier_call = &lxrt_notify_reboot, .next = NULL, .priority = 0 }
Definition at line 116 of file sched.c.

Referenced by __rtai_lxrt_exit(), and __rtai_lxrt_init().

RT_TRAP_HANDLER lxrt_old_trap_handler [static]
 

Definition at line 1760 of file sched.c.

Referenced by lxrt_exit(), and lxrt_init().

RT_TASK* lxrt_wdog_task[NR_RT_CPUS] [static]
 

Definition at line 110 of file sched.c.

Referenced by rt_deregister_watchdog(), rt_register_watchdog(), and set_rtext().

void* mp[MAX_FRESTK_SRQ]
 

Definition at line 147 of file sched.c.

int OneShot = CONFIG_RTAI_ONE_SHOT [static]
 

Definition at line 1522 of file sched.c.

Referenced by __rtai_lxrt_init().

volatile unsigned long out
 

Definition at line 147 of file sched.c.

struct semaphore resem[NR_RT_CPUS] [static]
 

Definition at line 128 of file sched.c.

Referenced by get_kthread(), kthread_m(), and lxrt_init().

int Reservoir = RESERVOIR [static]
 

Definition at line 1833 of file sched.c.

Referenced by kthread_m(), and lxrt_init().

volatile int rqsted
 

Definition at line 96 of file sched.c.

int rsvr_cnt[NR_RT_CPUS] [static]
 

Definition at line 1826 of file sched.c.

Referenced by kthread_fun().

struct rt_fun_entry rt_fun_lxrt[MAX_LXRT_FUN]
 

Definition at line 1541 of file sched.c.

Referenced by __rtai_netrpc_init(), init_fun_ext(), krtai_objects_release(), lxrt_init(), reset_rt_fun_entries(), rt_get_lxrt_fun_entry(), and set_rt_fun_entries().

struct rt_native_fun_entry rt_sched_entries[] [static]
 

Definition at line 2722 of file sched.c.

Referenced by lxrt_exit(), and lxrt_init().

volatile int rt_sched_timed
 

Definition at line 89 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 83 of file sched.c.

Referenced by __rtai_lxrt_init(), _rt_schedule_soft_tail(), fast_schedule(), get_kthread(), lxrt_handle_trap(), lxrt_intercept_syscall_prologue(), make_current_soft(), rt_receive_linux_syscall(), rt_schedule(), rt_schedule_soft(), rt_timer_handler(), and switch_rtai_tasks().

RT_TASK* rt_smp_fpu_task[NR_RT_CPUS] [static]
 

Definition at line 100 of file sched.c.

Referenced by __rtai_lxrt_init(), and clr_rtext().

int rt_smp_half_tick[NR_RT_CPUS] [static]
 

Definition at line 102 of file sched.c.

int rt_smp_linux_cr0[NR_RT_CPUS] [static]
 

Definition at line 98 of file sched.c.

RT_TASK rt_smp_linux_task[NR_RT_CPUS]
 

Definition at line 81 of file sched.c.

Referenced by __rtai_shm_init(), clr_rtext(), rt_get_base_linux_task(), rt_Name_locate(), and rt_set_runnable_on_cpuid().

int rt_smp_oneshot_running[NR_RT_CPUS] [static]
 

Definition at line 104 of file sched.c.

int rt_smp_oneshot_timer[NR_RT_CPUS]
 

Definition at line 87 of file sched.c.

Referenced by rt_get_time(), rt_set_runnable_on_cpuid(), and stop_rt_timer().

volatile int rt_smp_shot_fired[NR_RT_CPUS] [static]
 

Definition at line 106 of file sched.c.

RTIME rt_smp_time_h[NR_RT_CPUS]
 

Definition at line 85 of file sched.c.

Referenced by mbx_wait_until().

void* rtai_lxrt_dispatcher
 

Referenced by lxrt_exit(), and lxrt_init().

int SetupTimeTIMER = TIMER_SETUP_TIME [static]
 

Definition at line 1528 of file sched.c.

Referenced by __rtai_lxrt_init().

int SpareKthreads = 100 [static]
 

Definition at line 1835 of file sched.c.

Referenced by kthread_fun(), kthread_m(), and lxrt_init().

int srq
 

Definition at line 147 of file sched.c.

RTIME switch_time[NR_RT_CPUS] [static]
 

Definition at line 610 of file sched.c.

int(* sys_call_table[])(struct pt_regs)
 

unsigned long systrans [static]
 

Definition at line 2122 of file sched.c.

Referenced by __rtai_lxrt_exit(), and lxrt_intercept_syscall_prologue().

struct task_struct** taskav[NR_RT_CPUS] [static]
 

Definition at line 1839 of file sched.c.

Referenced by __get_kthread(), kthread_fun(), kthread_m(), lxrt_exit(), and lxrt_init().

int taskidx[NR_RT_CPUS] [static]
 

Definition at line 1838 of file sched.c.

Referenced by __get_kthread(), kthread_fun(), and kthread_m().

int tasks_per_cpu[NR_RT_CPUS] = { 0, } [static]
 

Definition at line 222 of file sched.c.

Referenced by clr_rtext(), get_min_tasks_cpuid(), and set_rtext().

RT_TASK thread_task[NR_RT_CPUS] [static]
 

Definition at line 1825 of file sched.c.

Referenced by kthread_fun(), and kthread_m().

unsigned long traptrans [static]
 

Definition at line 2122 of file sched.c.

Referenced by __rtai_lxrt_exit(), and lxrt_handle_trap().

struct klist_t wake_up_hts[NR_RT_CPUS]
 

Definition at line 91 of file sched.c.

Referenced by kthread_m(), and wake_up_srq_handler().

struct klist_t wake_up_srq[NR_RT_CPUS]
 

Definition at line 92 of file sched.c.

Referenced by wake_up_srq_handler().


Generated on Thu Nov 20 11:57:15 2008 for RTAI API by doxygen 1.3.8