base/tasklets/tasklets.c File Reference


Detailed Description

Implementation of the RTAI tasklets module.

Author:
Paolo Mantegazza
Note:
Copyright © 1999-2006 Paolo Mantegazza <mantegazza@aero.polimi.it>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file tasklets.c.

Include dependency graph for tasklets.c:

Go to the source code of this file.

Data Structures

struct  ptimer_list

Defines

#define NUM_CPUS   1
#define TIMED_TIMER_CPUID   (0)
#define TIMER_CPUID   (0)
#define LIST_CPUID   (0)
#define rb_erase_timer(timer)
#define POLLS_PER_SEC   100

Functions

 MODULE_LICENSE ("GPL")
static struct rt_fun_entry
rt_tasklet_fun[] 
__attribute__ ((__unused__))
static void enq_timer (struct rt_tasklet_struct *timed_timer)
static void rem_timer (struct rt_tasklet_struct *timer)
RTAI_SYSCALL_MODE int rt_insert_tasklet (struct rt_tasklet_struct *tasklet, int priority, void(*handler)(unsigned long), unsigned long data, unsigned long id, int pid)
 Insert a tasklet in the list of tasklets to be processed.
RTAI_SYSCALL_MODE void rt_remove_tasklet (struct rt_tasklet_struct *tasklet)
 Remove a tasklet in the list of tasklets to be processed.
rt_tasklet_struct * rt_find_tasklet_by_id (unsigned long id)
 Find a tasklet identified by its id.
RTAI_SYSCALL_MODE int rt_exec_tasklet (struct rt_tasklet_struct *tasklet)
 Exec a tasklet.
RTAI_SYSCALL_MODE void rt_set_tasklet_priority (struct rt_tasklet_struct *tasklet, int priority)
RTAI_SYSCALL_MODE int rt_set_tasklet_handler (struct rt_tasklet_struct *tasklet, void(*handler)(unsigned long))
RTAI_SYSCALL_MODE void rt_set_tasklet_data (struct rt_tasklet_struct *tasklet, unsigned long data)
RTAI_SYSCALL_MODE RT_TASKrt_tasklet_use_fpu (struct rt_tasklet_struct *tasklet, int use_fpu)
static void asgn_min_prio (int cpuid)
static void set_timer_firing_time (struct rt_tasklet_struct *timer, RTIME firing_time)
RTAI_SYSCALL_MODE int rt_insert_timer (struct rt_tasklet_struct *timer, int priority, RTIME firing_time, RTIME period, void(*handler)(unsigned long), unsigned long data, int pid)
 Insert a timer in the list of timers to be processed.
RTAI_SYSCALL_MODE void rt_remove_timer (struct rt_tasklet_struct *timer)
 Remove a timer in the list of timers to be processed.
RTAI_SYSCALL_MODE void rt_set_timer_priority (struct rt_tasklet_struct *timer, int priority)
 Change the priority of an existing timer.
RTAI_SYSCALL_MODE void rt_set_timer_firing_time (struct rt_tasklet_struct *timer, RTIME firing_time)
 Change the firing time of a timer.
RTAI_SYSCALL_MODE void rt_set_timer_period (struct rt_tasklet_struct *timer, RTIME period)
 Change the period of a timer.
RTAI_SYSCALL_MODE void rt_get_timer_times (struct rt_tasklet_struct *timer, RTIME timer_times[])
RTAI_SYSCALL_MODE RTIME rt_get_timer_overrun (struct rt_tasklet_struct *timer)
 RTAI_MODULE_PARM (TimersManagerPrio, int)
static void rt_timers_manager (long cpuid)
static struct rt_usp_tasklet_structrt_init_tasklet (void)
 Init, in kernel space, a tasklet structure to be used in user space.
RTAI_SYSCALL_MODE void rt_register_task (struct rt_tasklet_struct *tasklet, struct rt_tasklet_struct *usptasklet, RT_TASK *task)
RTAI_SYSCALL_MODE int rt_wait_tasklet_is_hard (struct rt_tasklet_struct *tasklet, long thread)
RTAI_SYSCALL_MODE int rt_delete_tasklet (struct rt_tasklet_struct *tasklet)
 Delete, in kernel space, a tasklet structure to be used in user space.
 RTAI_MODULE_PARM (PosixTimers, int)
static int init_ptimers (void)
static void cleanup_ptimers (void)
static int get_ptimer_indx (struct rt_tasklet_struct *timer)
static int gvb_ptimer_indx (int itimer)
RTAI_SYSCALL_MODE timer_t rt_ptimer_create (struct rt_tasklet_struct *timer, void(*handler)(unsigned long), unsigned long data, long pid, long thread)
 EXPORT_SYMBOL (rt_ptimer_create)
RTAI_SYSCALL_MODE void rt_ptimer_settime (timer_t timer, const struct itimerspec *value, unsigned long data, long flags)
 EXPORT_SYMBOL (rt_ptimer_settime)
RTAI_SYSCALL_MODE int rt_ptimer_overrun (timer_t timer)
 EXPORT_SYMBOL (rt_ptimer_overrun)
RTAI_SYSCALL_MODE void rt_ptimer_gettime (timer_t timer, RTIME timer_times[])
 EXPORT_SYMBOL (rt_ptimer_gettime)
RTAI_SYSCALL_MODE int rt_ptimer_delete (timer_t timer, long space)
 EXPORT_SYMBOL (rt_ptimer_delete)
 RTAI_MODULE_PARM (TaskletsStacksize, int)
int __rtai_tasklets_init (void)
void __rtai_tasklets_exit (void)
 module_init (__rtai_tasklets_init)
 module_exit (__rtai_tasklets_exit)
 EXPORT_SYMBOL (rt_insert_tasklet)
 EXPORT_SYMBOL (rt_remove_tasklet)
 EXPORT_SYMBOL (rt_find_tasklet_by_id)
 EXPORT_SYMBOL (rt_exec_tasklet)
 EXPORT_SYMBOL (rt_set_tasklet_priority)
 EXPORT_SYMBOL (rt_set_tasklet_handler)
 EXPORT_SYMBOL (rt_set_tasklet_data)
 EXPORT_SYMBOL (rt_tasklet_use_fpu)
 EXPORT_SYMBOL (rt_insert_timer)
 EXPORT_SYMBOL (rt_remove_timer)
 EXPORT_SYMBOL (rt_set_timer_priority)
 EXPORT_SYMBOL (rt_set_timer_firing_time)
 EXPORT_SYMBOL (rt_set_timer_period)
 EXPORT_SYMBOL (rt_init_tasklet)
 EXPORT_SYMBOL (rt_register_task)
 EXPORT_SYMBOL (rt_wait_tasklet_is_hard)
 EXPORT_SYMBOL (rt_delete_tasklet)
 EXPORT_SYMBOL (rt_get_timer_times)
 EXPORT_SYMBOL (rt_get_timer_overrun)

Variables

epoch_struct boot_epoch
static struct rt_tasklet_struct timers_list [NUM_CPUS]
static struct rt_tasklet_struct tasklets_list
static spinlock_t timers_lock [NUM_CPUS] = { SPIN_LOCK_UNLOCKED, }
static spinlock_t tasklets_lock = SPIN_LOCK_UNLOCKED
static struct rt_fun_entry rt_tasklet_fun []
static RT_TASK timers_manager [NUM_CPUS]
static int TimersManagerPrio = 0
static int PosixTimers = POSIX_TIMERS
static spinlock_t ptimer_lock = SPIN_LOCK_UNLOCKED
static volatile int ptimer_index
ptimer_listposix_timer
static int TaskletsStacksize = TASKLET_STACK_SIZE


Define Documentation

#define POLLS_PER_SEC   100


Function Documentation

EXPORT_SYMBOL ( rt_get_timer_overrun   ) 

EXPORT_SYMBOL ( rt_get_timer_times   ) 

EXPORT_SYMBOL ( rt_delete_tasklet   ) 

EXPORT_SYMBOL ( rt_wait_tasklet_is_hard   ) 

EXPORT_SYMBOL ( rt_register_task   ) 

EXPORT_SYMBOL ( rt_init_tasklet   ) 

EXPORT_SYMBOL ( rt_set_timer_period   ) 

EXPORT_SYMBOL ( rt_set_timer_firing_time   ) 

EXPORT_SYMBOL ( rt_set_timer_priority   ) 

EXPORT_SYMBOL ( rt_remove_timer   ) 

EXPORT_SYMBOL ( rt_insert_timer   ) 

EXPORT_SYMBOL ( rt_tasklet_use_fpu   ) 

EXPORT_SYMBOL ( rt_set_tasklet_data   ) 

EXPORT_SYMBOL ( rt_set_tasklet_handler   ) 

EXPORT_SYMBOL ( rt_set_tasklet_priority   ) 

EXPORT_SYMBOL ( rt_exec_tasklet   ) 

EXPORT_SYMBOL ( rt_find_tasklet_by_id   ) 

EXPORT_SYMBOL ( rt_remove_tasklet   ) 

EXPORT_SYMBOL ( rt_insert_tasklet   ) 

module_exit ( __rtai_tasklets_exit   ) 

module_init ( __rtai_tasklets_init   ) 


Generated on Tue Feb 2 17:48:15 2010 for RTAI API by  doxygen 1.4.7