base/tasklets/signal.c File Reference

#include <linux/kernel.h>
#include <linux/module.h>
#include <rtai_schedcore.h>
#include <rtai_signal.h>

Include dependency graph for signal.c:

Include dependency graph

Go to the source code of this file.

Data Structures

struct  rt_signal_t

Defines

#define MODULE_NAME   "RTAI_SIGNALS"
#define RT_SCHED_SIGSUSP   (1 << 15)
#define RT_SIGNALS   ((struct rt_signal_t *)task->rt_signals)

Functions

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

Variables

rt_fun_entry rtai_signals_fun []


Define Documentation

#define MODULE_NAME   "RTAI_SIGNALS"
 

Definition at line 27 of file signal.c.

Referenced by cleanup_module(), and init_module().

#define RT_SCHED_SIGSUSP   (1 << 15)
 

Definition at line 29 of file signal.c.

Referenced by rt_exec_signal(), and rt_wait_signal().

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

Definition at line 31 of file signal.c.

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


Function Documentation

void cleanup_module void   ) 
 

Definition at line 279 of file signal.c.

References MODULE_NAME, printk(), reset_rt_fun_ext_index(), rtai_signals_fun, and RTAI_SIGNALS_IDX.

Here is the call graph for this function:

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_   ) 
 

int init_module void   ) 
 

Definition at line 269 of file signal.c.

References MODULE_NAME, printk(), rtai_signals_fun, RTAI_SIGNALS_IDX, and set_rt_fun_ext_index().

Here is the call graph for this function:

MODULE_LICENSE "GPL"   ) 
 

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 172 of file signal.c.

References flags, RT_SIGNALS, RT_TASK, and task.

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 149 of file signal.c.

References flags, RT_SIGNALS, RT_TASK, and task.

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

Definition at line 54 of file signal.c.

References flags, RT_SCHED_SIGSUSP, RT_TASK, and task.

Referenced by rt_release_signal(), and rt_trigger_signal().

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 90 of file signal.c.

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

Here is the call graph for this function:

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

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 243 of file signal.c.

References rt_malloc(), RT_TASK, rt_task_init_cpuid(), rt_task_resume(), rt_task_suspend(), signal_suprt_fun(), SIGNAL_TASK_STACK_SIZE, and task.

Here is the call graph for this function:

int rt_request_signal_ RT_TASK sigtask,
RT_TASK task,
long  signal
[static]
 

Definition at line 34 of file signal.c.

References rt_malloc(), RT_SIGNALS, RT_TASK, rt_task_resume(), and task.

Referenced by signal_suprt_fun().

Here is the call graph for this function:

int rt_signal_helper RT_TASK task  )  [static]
 

Definition at line 183 of file signal.c.

References RT_TASK, rt_task_suspend(), and task.

Here is the call graph for this function:

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 118 of file signal.c.

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

Here is the call graph for this function:

int rt_wait_signal RT_TASK sigtask,
RT_TASK task
 

Definition at line 192 of file signal.c.

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

Referenced by signal_suprt_fun().

Here is the call graph for this function:

void signal_suprt_fun struct sigsuprt_t funarg  )  [static]
 

Definition at line 210 of file signal.c.

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

Referenced by rt_request_signal().

Here is the call graph for this function:


Variable Documentation

struct rt_fun_entry rtai_signals_fun[] [static]
 

Initial value:

{ [SIGNAL_HELPER] = { 1, rt_signal_helper }, [SIGNAL_WAITSIG] = { 1, rt_wait_signal }, [SIGNAL_REQUEST] = { 1, rt_request_signal_ }, [SIGNAL_RELEASE] = { 1, rt_release_signal }, [SIGNAL_ENABLE] = { 1, rt_enable_signal }, [SIGNAL_DISABLE] = { 1, rt_disable_signal }, [SIGNAL_TRIGGER] = { 1, rt_trigger_signal } }
Definition at line 259 of file signal.c.

Referenced by cleanup_module(), and init_module().


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