base/sched/signal.c File Reference

Include dependency graph for signal.c:

Go to the source code of this file.

Defines

#define MODULE_NAME   "RTAI_SIGNALS"
#define RT_SIGNALS   ((struct rt_signal_t *)task->rt_signals)

Functions

 MODULE_LICENSE ("GPL")
RTAI_SYSCALL_MODE int rt_request_signal_ (RT_TASK *sigtask, RT_TASK *task, long signal)
 EXPORT_SYMBOL (rt_request_signal_)
static void rt_exec_signal (RT_TASK *sigtask, RT_TASK *task)
RTAI_SYSCALL_MODE int rt_release_signal (long signal, RT_TASK *task)
 Release a signal previously requested for a task.
 EXPORT_SYMBOL (rt_release_signal)
RTAI_SYSCALL_MODE void rt_trigger_signal (long signal, RT_TASK *task)
 Trigger a signal for a task (i.e.
 EXPORT_SYMBOL (rt_trigger_signal)
RTAI_SYSCALL_MODE void rt_enable_signal (long signal, RT_TASK *task)
 Enable a signal for a task.
 EXPORT_SYMBOL (rt_enable_signal)
RTAI_SYSCALL_MODE void rt_disable_signal (long signal, RT_TASK *task)
 disable a signal for a task.
 EXPORT_SYMBOL (rt_disable_signal)
RTAI_SYSCALL_MODE int rt_signal_helper (RT_TASK *task)
RTAI_SYSCALL_MODE int rt_wait_signal (RT_TASK *sigtask, RT_TASK *task)
 EXPORT_SYMBOL (rt_wait_signal)
static void signal_suprt_fun (long args)
int rt_request_signal (long signal, void(*sighdl)(long, RT_TASK *))
 Install a handler for catching RTAI real time async signals.
 EXPORT_SYMBOL (rt_request_signal)


Define Documentation

#define MODULE_NAME   "RTAI_SIGNALS"

Definition at line 28 of file signal.c.

#define RT_SIGNALS   ((struct rt_signal_t *)task->rt_signals)

Definition at line 30 of file signal.c.

Referenced by rt_disable_signal(), rt_enable_signal(), rt_release_signal(), rt_request_signal_(), and rt_trigger_signal().


Function Documentation

EXPORT_SYMBOL ( rt_request_signal   ) 

EXPORT_SYMBOL ( rt_wait_signal   ) 

EXPORT_SYMBOL ( rt_disable_signal   ) 

EXPORT_SYMBOL ( rt_enable_signal   ) 

EXPORT_SYMBOL ( rt_trigger_signal   ) 

EXPORT_SYMBOL ( rt_release_signal   ) 

EXPORT_SYMBOL ( rt_request_signal_   ) 

MODULE_LICENSE ( "GPL"   ) 

RTAI_SYSCALL_MODE void rt_disable_signal ( long  signal,
RT_TASK task 
)

disable a signal for a task.

Parameters:
signal,>= 0, is the signal.
task is the task which signal is enabled.
A call of this function will disable reception of the related signal by task.

Definition at line 179 of file signal.c.

References flags, RT_SIGNALS, and task.

RTAI_SYSCALL_MODE void rt_enable_signal ( long  signal,
RT_TASK task 
)

Enable a signal for a task.

Parameters:
signal,>= 0, is the signal.
task is the task which signal is enabled.
A call of this function will enable reception of the related signal by task.

Definition at line 156 of file signal.c.

References flags, RT_SIGNALS, and task.

static void rt_exec_signal ( RT_TASK sigtask,
RT_TASK task 
) [inline, static]

Definition at line 59 of file signal.c.

References flags, RT_SCHED_SIGSUSP, and task.

Referenced by rt_release_signal(), and rt_trigger_signal().

RTAI_SYSCALL_MODE int rt_release_signal ( long  signal,
RT_TASK task 
)

Release a signal previously requested for a task.

Parameters:
signal,>= 0, is the signal.
task is the task for which the signal was previously requested.
A call of this function will release a signal previously requested for a task.

Return values:
0 on success.
Returns:
-EINVAL in case of error.

Definition at line 95 of file signal.c.

References rt_exec_signal(), RT_SIGNALS, and task.

Here is the call graph for this function:

int rt_request_signal ( long  signal,
void(*)(long, RT_TASK *)  sighdl 
)

Install a handler for catching RTAI real time async signals.

Parameters:
signal,>= 0, is the signal.
sighdl is the handler that will execute upon signal reception.
RTAI real time signal handlers are executed within a host hard real time thread, assigned to the same CPU of the receiving task, while the task receiving the signal is kept stopped. No difference between kernel and user space, the usual symmetric usage. If the request is succesfull the function will return with signal reception enabled.

Return values:
0 on success.
Returns:
-EINVAL in case of error.

Definition at line 251 of file signal.c.

References rt_free(), rt_malloc(), rt_task_init_cpuid(), rt_task_resume(), rt_task_suspend(), signal_suprt_fun(), SIGNAL_TASK_STACK_SIZE, and sigsuprt_t::sigtask.

Here is the call graph for this function:

RTAI_SYSCALL_MODE int rt_request_signal_ ( RT_TASK sigtask,
RT_TASK task,
long  signal 
)

Definition at line 32 of file signal.c.

References MAX_PQUEUES, MAXSIGNALS, rt_malloc(), RT_SIGNALS, rt_task_resume(), and task.

Referenced by signal_suprt_fun(), and signal_suprt_fun_mq().

Here is the call graph for this function:

RTAI_SYSCALL_MODE int rt_signal_helper ( RT_TASK task  ) 

Definition at line 190 of file signal.c.

References rt_task_suspend(), and task.

Here is the call graph for this function:

RTAI_SYSCALL_MODE void rt_trigger_signal ( long  signal,
RT_TASK task 
)

Trigger a signal for a task (i.e.

send a signal to the task), executing the related handler.

Parameters:
signal,>= 0, is the signal.
task is the task to which the signal is sent.
A call of this function will stop the task served by signal, if executing, till the triggered handler has finished its execution, carried out at the same priority and on the same CPU of the task it is serving.

Definition at line 125 of file signal.c.

References flags, rt_exec_signal(), RT_SIGNALS, and task.

Here is the call graph for this function:

RTAI_SYSCALL_MODE int rt_wait_signal ( RT_TASK sigtask,
RT_TASK task 
)

Definition at line 199 of file signal.c.

References flags, RT_SCHED_READY, RT_SCHED_SIGSUSP, rt_schedule(), and task.

Referenced by signal_suprt_fun(), and signal_suprt_fun_mq().

Here is the call graph for this function:

static void signal_suprt_fun ( long  args  )  [static]

Definition at line 220 of file signal.c.

References rt_free(), rt_request_signal_(), rt_wait_signal(), sigsuprt_t::sighdl, sigsuprt_t::signal, sigsuprt_t::sigtask, and sigsuprt_t::task.

Here is the call graph for this function:


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