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 fifos.c.
Include dependency graph for fifos.c:
Go to the source code of this file.
Data Structures | |
struct | lx_queue |
struct | lx_semaphore |
struct | lx_task_struct |
struct | lx_mailbox |
struct | rt_fifo_struct |
Defines | |
#define | rtf_save_flags_and_cli(x) do{x=rt_spin_lock_irqsave(&rtf_lock);}while(0) |
#define | rtf_restore_flags(x) rt_spin_unlock_irqrestore((x),&rtf_lock) |
#define | rtf_spin_lock_irqsave(x, y) do{x=rt_spin_lock_irqsave(&(y));}while(0) |
#define | rtf_spin_unlock_irqrestore(x, y) rt_spin_unlock_irqrestore((x),&(y)) |
#define | rtf_request_srq(x) rt_request_srq(0, (x), 0) |
#define | rtf_free_srq(x) rt_free_srq((x)) |
#define | rtf_pend_srq(x) rt_pend_linux_srq((x)) |
#define | MAX_FIFOS 64 |
#define | MAXREQS 64 |
#define | MOD_SIZE(indx) ((indx) < mbx->size ? (indx) : (indx) - mbx->size) |
#define | VALID_FIFO |
#define | DEFAULT_SIZE 1000 |
#define | DELAY(x) (((x)*HZ + 500)/1000) |
#define | LXRTEXT |
#define | USE_UDEV_CLASS 1 |
Typedefs | |
typedef lx_queue | F_QUEUE |
typedef lx_semaphore | F_SEM |
typedef lx_task_struct | LX_TASK |
typedef lx_mailbox | F_MBX |
typedef rt_fifo_struct | FIFO |
Functions | |
MODULE_LICENSE ("GPL") | |
static int | do_nothing (unsigned int arg, int rw) |
static void | enqueue_blocked (LX_TASK *task, F_QUEUE *queue, int qtype, int priority) |
static void | dequeue_blocked (LX_TASK *task) |
static void | mbx_sem_signal (F_SEM *sem, FIFO *fifop) |
static void | mbx_signal (F_MBX *mbx) |
static int | mbx_sem_wait_if (F_SEM *sem) |
static int | mbx_sem_wait (F_SEM *sem) |
static int | mbx_wait (F_MBX *mbx, int *fravbs) |
static int | mbx_sem_wait_timed (F_SEM *sem, int delay) |
static int | mbx_wait_timed (F_MBX *mbx, int *fravbs, int delay) |
static int | mbx_put (F_MBX *mbx, char **msg, int msg_size, int lnx) |
static int | mbx_ovrwr_put (F_MBX *mbx, char **msg, int msg_size, int lnx) |
static int | mbx_get (F_MBX *mbx, char **msg, int msg_size, int lnx) |
static int | mbx_evdrp (F_MBX *mbx, char **msg, int msg_size, int lnx) |
static void | mbx_sem_init (F_SEM *sem, int value) |
static int | mbx_sem_delete (F_SEM *sem) |
static void | mbx_init (F_MBX *mbx, int size, char *bufadr) |
static int | mbx_delete (F_MBX *mbx) |
static int | mbx_send (F_MBX *mbx, const char *msg, int msg_size, int lnx) |
static int | mbx_send_wp (F_MBX *mbx, const char *msg, int msg_size, int lnx) |
static int | mbx_send_if (F_MBX *mbx, const char *msg, int msg_size, int lnx) |
static int | mbx_send_timed (F_MBX *mbx, const char *msg, int msg_size, int delay, int lnx) |
static int | mbx_receive (F_MBX *mbx, void *msg, int msg_size, int lnx) |
static int | mbx_receive_wjo (F_MBX *mbx, void *msg, int msg_size, int lnx) |
static int | mbx_receive_wp (F_MBX *mbx, void *msg, int msg_size, int lnx) |
static int | mbx_receive_if (F_MBX *mbx, void *msg, int msg_size, int lnx) |
static int | mbx_receive_timed (F_MBX *mbx, void *msg, int msg_size, int delay, int lnx) |
static int | mbx_ovrwr_send (F_MBX *mbx, void *msg, int msg_size, int lnx) |
static void | rtf_sysrq_handler (void) |
RTAI_SYSCALL_MODE int | rtf_reset (unsigned int minor) |
Reset a real-time FIFO. | |
RTAI_SYSCALL_MODE int | rtf_resize (unsigned int minor, int size) |
Resize a real-time FIFO. | |
RTAI_SYSCALL_MODE int | rtf_create (unsigned int minor, int size) |
Create a real-time FIFO. | |
RTAI_SYSCALL_MODE int | rtf_destroy (unsigned int minor) |
Close a real-time FIFO. | |
int | rtf_create_handler (unsigned int minor, void *handler) |
Install a FIFO handler function. | |
RTAI_SYSCALL_MODE int | rtf_put (unsigned int minor, void *buf, int count) |
Write data to FIFO. | |
RTAI_SYSCALL_MODE int | rtf_ovrwr_put (unsigned int minor, void *buf, int count) |
RTAI_SYSCALL_MODE int | rtf_put_if (unsigned int minor, void *buf, int count) |
RTAI_SYSCALL_MODE int | rtf_get_avbs (unsigned int minor) |
RTAI_SYSCALL_MODE int | rtf_get_frbs (unsigned int minor) |
RTAI_SYSCALL_MODE int | rtf_get (unsigned int minor, void *buf, int count) |
Read data from FIFO. | |
int | rtf_evdrp (unsigned int minor, void *msg, int msg_size) |
RTAI_SYSCALL_MODE int | rtf_get_if (unsigned int minor, void *buf, int count) |
RTAI_SYSCALL_MODE int | rtf_sem_init (unsigned int minor, int value) |
Initialize a binary semaphore. | |
RTAI_SYSCALL_MODE int | rtf_sem_post (unsigned int minor) |
Posting (signaling) a semaphore. | |
RTAI_SYSCALL_MODE int | rtf_sem_trywait (unsigned int minor) |
Take a semaphore, only if the calling task is not blocked. | |
RTAI_SYSCALL_MODE int | rtf_sem_destroy (unsigned int minor) |
Delete a semaphore. | |
static int | rtf_open (struct inode *inode, struct file *filp) |
static int | rtf_fasync (int fd, struct file *filp, int mode) |
static int | rtf_release (struct inode *inode, struct file *filp) |
static ssize_t | rtf_read (struct file *filp, char *buf, size_t count, loff_t *ppos) |
static ssize_t | rtf_write (struct file *filp, const char *buf, size_t count, loff_t *ppos) |
static int | rtf_ioctl (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) |
static unsigned int | rtf_poll (struct file *filp, poll_table *wait) |
static loff_t | rtf_llseek (struct file *filp, loff_t offset, int origin) |
RTAI_MODULE_PARM (MaxFifos, int) | |
static int | register_lxrt_fifos_support (void) |
static void | unregister_lxrt_fifos_support (void) |
int | __rtai_fifos_init (void) |
void | __rtai_fifos_exit (void) |
module_init (__rtai_fifos_init) | |
module_exit (__rtai_fifos_exit) | |
int | rtf_named_create (const char *name, int size) |
RTAI_SYSCALL_MODE int | rtf_create_named (const char *name) |
RTAI_SYSCALL_MODE int | rtf_getfifobyname (const char *name) |
EXPORT_SYMBOL (rtf_create) | |
EXPORT_SYMBOL (rtf_create_handler) | |
EXPORT_SYMBOL (rtf_create_named) | |
EXPORT_SYMBOL (rtf_destroy) | |
EXPORT_SYMBOL (rtf_evdrp) | |
EXPORT_SYMBOL (rtf_get) | |
EXPORT_SYMBOL (rtf_get_if) | |
EXPORT_SYMBOL (rtf_getfifobyname) | |
EXPORT_SYMBOL (rtf_ovrwr_put) | |
EXPORT_SYMBOL (rtf_put) | |
EXPORT_SYMBOL (rtf_put_if) | |
EXPORT_SYMBOL (rtf_get_avbs) | |
EXPORT_SYMBOL (rtf_get_frbs) | |
EXPORT_SYMBOL (rtf_reset) | |
EXPORT_SYMBOL (rtf_resize) | |
EXPORT_SYMBOL (rtf_sem_destroy) | |
EXPORT_SYMBOL (rtf_sem_init) | |
EXPORT_SYMBOL (rtf_sem_post) | |
EXPORT_SYMBOL (rtf_sem_trywait) | |
EXPORT_SYMBOL (rtf_named_create) | |
Variables | |
static int | fifo_srq |
static int | async_sig |
static spinlock_t | rtf_lock = SPIN_LOCK_UNLOCKED |
static spinlock_t | rtf_name_lock = SPIN_LOCK_UNLOCKED |
static FIFO * | fifo |
struct { | |
int in | |
int out | |
task_struct * task [MAXREQS] | |
} | taskq |
struct { | |
int in | |
int out | |
FIFO * fifo [MAXREQS] | |
} | pol_asyn_q |
static struct file_operations | rtf_fops |
static int | MaxFifos = MAX_FIFOS |
static struct rt_fun_entry | rtai_fifos_fun [] |
static class_t * | fifo_class = NULL |
#define DEFAULT_SIZE 1000 |
Referenced by rtf_create_named(), and rtf_open().
#define DELAY | ( | x | ) | (((x)*HZ + 500)/1000) |
#define MAXREQS 64 |
Definition at line 227 of file fifos.c.
Referenced by mbx_sem_delete(), mbx_sem_signal(), mbx_signal(), and rtf_sysrq_handler().
#define MOD_SIZE | ( | indx | ) | ((indx) < mbx->size ? (indx) : (indx) - mbx->size) |
Definition at line 426 of file fifos.c.
Referenced by mbx_evdrp(), mbx_get(), mbx_ovrwr_put(), mbx_put(), mbxevdrp(), mbxget(), mbxovrwrput(), and mbxput().
#define rtf_free_srq | ( | x | ) | rt_free_srq((x)) |
#define rtf_pend_srq | ( | x | ) | rt_pend_linux_srq((x)) |
Definition at line 169 of file fifos.c.
Referenced by mbx_sem_delete(), mbx_sem_signal(), and mbx_signal().
#define rtf_request_srq | ( | x | ) | rt_request_srq(0, (x), 0) |
#define rtf_restore_flags | ( | x | ) | rt_spin_unlock_irqrestore((x),&rtf_lock) |
Definition at line 164 of file fifos.c.
Referenced by mbx_ovrwr_send(), mbx_receive_if(), mbx_receive_wp(), mbx_sem_delete(), mbx_sem_signal(), mbx_sem_wait(), mbx_sem_wait_if(), mbx_sem_wait_timed(), mbx_send_if(), mbx_send_wp(), mbx_signal(), mbx_wait(), and mbx_wait_timed().
#define rtf_save_flags_and_cli | ( | x | ) | do{x=rt_spin_lock_irqsave(&rtf_lock);}while(0) |
Definition at line 163 of file fifos.c.
Referenced by mbx_ovrwr_send(), mbx_receive_if(), mbx_receive_wp(), mbx_sem_delete(), mbx_sem_signal(), mbx_sem_wait(), mbx_sem_wait_if(), mbx_sem_wait_timed(), mbx_send_if(), mbx_send_wp(), mbx_signal(), mbx_wait(), and mbx_wait_timed().
#define rtf_spin_lock_irqsave | ( | x, | |||
y | ) | do{x=rt_spin_lock_irqsave(&(y));}while(0) |
Definition at line 165 of file fifos.c.
Referenced by mbx_get(), mbx_ovrwr_put(), mbx_put(), and rtf_named_create().
#define rtf_spin_unlock_irqrestore | ( | x, | |||
y | ) | rt_spin_unlock_irqrestore((x),&(y)) |
Definition at line 166 of file fifos.c.
Referenced by mbx_get(), mbx_ovrwr_put(), mbx_put(), and rtf_named_create().
#define VALID_FIFO |
Value:
Definition at line 802 of file fifos.c.
Referenced by rtf_destroy(), rtf_evdrp(), rtf_get(), rtf_get_avbs(), rtf_get_frbs(), rtf_get_if(), rtf_ovrwr_put(), rtf_put(), rtf_put_if(), rtf_reset(), rtf_resize(), rtf_sem_destroy(), rtf_sem_init(), rtf_sem_post(), and rtf_sem_trywait().
typedef struct lx_mailbox F_MBX |
typedef struct lx_semaphore F_SEM |
typedef struct rt_fifo_struct FIFO |
typedef struct lx_task_struct LX_TASK |
void __rtai_fifos_exit | ( | void | ) |
Definition at line 1779 of file fifos.c.
References fifo, fifo_class, fifo_srq, MAX_FIFOS, printk(), RTAI_FIFOS_MAJOR, rtf_free_srq, and unregister_lxrt_fifos_support().
Here is the call graph for this function:
int __rtai_fifos_init | ( | void | ) |
Definition at line 1731 of file fifos.c.
References async_sig, rt_fifo_struct::asynq, fifo, fifo_class, fifo_srq, MAX_FIFOS, MaxFifos, mbx_sem_init(), pol_asyn_q, printk(), register_lxrt_fifos_support(), RTAI_FIFOS_MAJOR, rtf_fops, rtf_request_srq, rtf_sysrq_handler(), and taskq.
Here is the call graph for this function:
static void dequeue_blocked | ( | LX_TASK * | task | ) | [inline, static] |
Definition at line 246 of file fifos.c.
References task.
Referenced by _rt_bits_wait(), _rt_bits_wait_until(), mbx_sem_signal(), mbx_sem_wait(), mbx_sem_wait_timed(), rt_bits_reset(), rt_bits_signal(), rt_cndmtx_signal(), rt_cond_signal(), rt_cond_wait(), rt_cond_wait_until(), rt_dequeue_blocked(), rt_receive(), rt_receive_if(), rt_receive_until(), rt_return(), rt_sem_broadcast(), rt_sem_signal(), rt_sem_wait(), and rt_sem_wait_until().
static int do_nothing | ( | unsigned int | arg, | |
int | rw | |||
) | [static] |
static void enqueue_blocked | ( | LX_TASK * | task, | |
F_QUEUE * | queue, | |||
int | qtype, | |||
int | priority | |||
) | [inline, static] |
Definition at line 233 of file fifos.c.
References lx_queue::next, lx_queue::prev, lx_queue::task, and task.
Referenced by _rt_bits_wait(), _rt_bits_wait_until(), mbx_sem_wait(), mbx_sem_wait_timed(), rt_cond_wait(), rt_cond_wait_until(), rt_enqueue_blocked(), rt_receive(), rt_receive_if(), rt_receive_until(), rt_rpc(), rt_rpc_if(), rt_rpc_until(), rt_sem_wait(), rt_sem_wait_until(), rt_send(), and rt_send_until().
EXPORT_SYMBOL | ( | rtf_named_create | ) |
EXPORT_SYMBOL | ( | rtf_sem_trywait | ) |
EXPORT_SYMBOL | ( | rtf_sem_post | ) |
EXPORT_SYMBOL | ( | rtf_sem_init | ) |
EXPORT_SYMBOL | ( | rtf_sem_destroy | ) |
EXPORT_SYMBOL | ( | rtf_resize | ) |
EXPORT_SYMBOL | ( | rtf_reset | ) |
EXPORT_SYMBOL | ( | rtf_get_frbs | ) |
EXPORT_SYMBOL | ( | rtf_get_avbs | ) |
EXPORT_SYMBOL | ( | rtf_put_if | ) |
EXPORT_SYMBOL | ( | rtf_put | ) |
EXPORT_SYMBOL | ( | rtf_ovrwr_put | ) |
EXPORT_SYMBOL | ( | rtf_getfifobyname | ) |
EXPORT_SYMBOL | ( | rtf_get_if | ) |
EXPORT_SYMBOL | ( | rtf_get | ) |
EXPORT_SYMBOL | ( | rtf_evdrp | ) |
EXPORT_SYMBOL | ( | rtf_destroy | ) |
EXPORT_SYMBOL | ( | rtf_create_named | ) |
EXPORT_SYMBOL | ( | rtf_create_handler | ) |
EXPORT_SYMBOL | ( | rtf_create | ) |
static int mbx_delete | ( | F_MBX * | mbx | ) | [inline, static] |
Definition at line 599 of file fifos.c.
References mbx_sem_delete(), mbx_signal(), lx_mailbox::rcvsem, and lx_mailbox::sndsem.
Referenced by rtf_destroy().
Here is the call graph for this function:
static int mbx_evdrp | ( | F_MBX * | mbx, | |
char ** | msg, | |||
int | msg_size, | |||
int | lnx | |||
) | [inline, static] |
Definition at line 533 of file fifos.c.
References lx_mailbox::avbs, lx_mailbox::bufadr, lx_mailbox::fbyte, MOD_SIZE, and lx_mailbox::size.
Referenced by rtf_evdrp(), and rtf_ioctl().
static int mbx_get | ( | F_MBX * | mbx, | |
char ** | msg, | |||
int | msg_size, | |||
int | lnx | |||
) | [inline, static] |
Definition at line 505 of file fifos.c.
References lx_mailbox::avbs, lx_mailbox::bufadr, lx_mailbox::buflock, lx_mailbox::fbyte, flags, lx_mailbox::frbs, MOD_SIZE, rtf_spin_lock_irqsave, rtf_spin_unlock_irqrestore, and lx_mailbox::size.
Referenced by mbx_receive(), mbx_receive_if(), mbx_receive_timed(), mbx_receive_wjo(), mbx_receive_wp(), and rtf_resize().
static void mbx_init | ( | F_MBX * | mbx, | |
int | size, | |||
char * | bufadr | |||
) | [inline, static] |
Definition at line 585 of file fifos.c.
References lx_mailbox::avbs, lx_mailbox::bufadr, lx_mailbox::buflock, lx_mailbox::fbyte, lx_mailbox::frbs, lx_mailbox::lbyte, mbx_sem_init(), lx_mailbox::rcvsem, lx_mailbox::size, lx_mailbox::sndsem, and lx_mailbox::waiting_task.
Referenced by rtf_create().
Here is the call graph for this function:
static int mbx_ovrwr_put | ( | F_MBX * | mbx, | |
char ** | msg, | |||
int | msg_size, | |||
int | lnx | |||
) | [inline, static] |
Definition at line 456 of file fifos.c.
References lx_mailbox::avbs, lx_mailbox::bufadr, lx_mailbox::buflock, lx_mailbox::fbyte, flags, lx_mailbox::frbs, lx_mailbox::lbyte, MOD_SIZE, rtf_spin_lock_irqsave, rtf_spin_unlock_irqrestore, and lx_mailbox::size.
Referenced by mbx_ovrwr_send().
static int mbx_ovrwr_send | ( | F_MBX * | mbx, | |
void * | msg, | |||
int | msg_size, | |||
int | lnx | |||
) | [inline, static] |
Definition at line 761 of file fifos.c.
References flags, lx_semaphore::free, mbx_ovrwr_put(), mbx_sem_signal(), mbx_signal(), rtf_restore_flags, rtf_save_flags_and_cli, and lx_mailbox::sndsem.
Referenced by rtf_ioctl(), and rtf_ovrwr_put().
Here is the call graph for this function:
static int mbx_put | ( | F_MBX * | mbx, | |
char ** | msg, | |||
int | msg_size, | |||
int | lnx | |||
) | [inline, static] |
Definition at line 428 of file fifos.c.
References lx_mailbox::avbs, lx_mailbox::bufadr, lx_mailbox::buflock, flags, lx_mailbox::frbs, lx_mailbox::lbyte, MOD_SIZE, rtf_spin_lock_irqsave, rtf_spin_unlock_irqrestore, and lx_mailbox::size.
Referenced by mbx_send(), mbx_send_if(), mbx_send_timed(), and mbx_send_wp().
static int mbx_receive | ( | F_MBX * | mbx, | |
void * | msg, | |||
int | msg_size, | |||
int | lnx | |||
) | [inline, static] |
Definition at line 676 of file fifos.c.
References lx_mailbox::avbs, mbx_get(), mbx_sem_signal(), mbx_sem_wait(), mbx_signal(), mbx_wait(), and lx_mailbox::rcvsem.
Referenced by rtf_ioctl().
Here is the call graph for this function:
static int mbx_receive_if | ( | F_MBX * | mbx, | |
void * | msg, | |||
int | msg_size, | |||
int | lnx | |||
) | [inline, static] |
Definition at line 727 of file fifos.c.
References lx_mailbox::avbs, flags, lx_semaphore::free, mbx_get(), mbx_sem_signal(), mbx_signal(), lx_mailbox::rcvsem, rtf_restore_flags, and rtf_save_flags_and_cli.
Referenced by rtf_get_if(), and rtf_ioctl().
Here is the call graph for this function:
static int mbx_receive_timed | ( | F_MBX * | mbx, | |
void * | msg, | |||
int | msg_size, | |||
int | delay, | |||
int | lnx | |||
) | [static] |
Definition at line 744 of file fifos.c.
References mbx_get(), mbx_sem_signal(), mbx_sem_wait_timed(), mbx_signal(), mbx_wait_timed(), and lx_mailbox::rcvsem.
Referenced by rtf_ioctl().
Here is the call graph for this function:
static int mbx_receive_wjo | ( | F_MBX * | mbx, | |
void * | msg, | |||
int | msg_size, | |||
int | lnx | |||
) | [inline, static] |
Definition at line 693 of file fifos.c.
References lx_mailbox::avbs, mbx_get(), mbx_sem_signal(), mbx_sem_wait(), mbx_signal(), mbx_wait(), and lx_mailbox::rcvsem.
Referenced by rtf_read().
Here is the call graph for this function:
static int mbx_receive_wp | ( | F_MBX * | mbx, | |
void * | msg, | |||
int | msg_size, | |||
int | lnx | |||
) | [inline, static] |
Definition at line 710 of file fifos.c.
References lx_mailbox::avbs, flags, lx_semaphore::free, mbx_get(), mbx_sem_signal(), mbx_signal(), lx_mailbox::rcvsem, rtf_restore_flags, and rtf_save_flags_and_cli.
Referenced by rtf_get(), rtf_ioctl(), and rtf_read().
Here is the call graph for this function:
static int mbx_sem_delete | ( | F_SEM * | sem | ) | [inline, static] |
Definition at line 568 of file fifos.c.
References fifo_srq, flags, MAXREQS, lx_queue::next, lx_semaphore::queue, rtf_pend_srq, rtf_restore_flags, rtf_save_flags_and_cli, task, and taskq.
Referenced by mbx_delete(), rtf_ioctl(), and rtf_sem_destroy().
static void mbx_sem_init | ( | F_SEM * | sem, | |
int | value | |||
) | [inline, static] |
Definition at line 559 of file fifos.c.
References lx_semaphore::free, lx_queue::next, lx_queue::prev, lx_semaphore::qtype, lx_semaphore::queue, and lx_queue::task.
Referenced by __rtai_fifos_init(), mbx_init(), rtf_create(), rtf_ioctl(), and rtf_sem_init().
Definition at line 253 of file fifos.c.
References dequeue_blocked(), fifo_srq, flags, lx_semaphore::free, MAXREQS, lx_queue::next, rt_fifo_struct::pol_asyn_pended, pol_asyn_q, lx_semaphore::queue, rtf_pend_srq, rtf_restore_flags, rtf_save_flags_and_cli, task, and taskq.
Referenced by mbx_ovrwr_send(), mbx_receive(), mbx_receive_if(), mbx_receive_timed(), mbx_receive_wjo(), mbx_receive_wp(), mbx_send(), mbx_send_if(), mbx_send_timed(), mbx_send_wp(), rtf_ioctl(), rtf_reset(), rtf_resize(), and rtf_sem_post().
Here is the call graph for this function:
static int mbx_sem_wait | ( | F_SEM * | sem | ) | [inline, static] |
Definition at line 309 of file fifos.c.
References current, dequeue_blocked(), enqueue_blocked(), flags, lx_semaphore::free, lx_queue::next, lx_semaphore::qtype, lx_semaphore::queue, rtf_restore_flags, rtf_save_flags_and_cli, and task.
Referenced by mbx_receive(), mbx_receive_wjo(), mbx_send(), rtf_ioctl(), rtf_reset(), and rtf_resize().
Here is the call graph for this function:
static int mbx_sem_wait_if | ( | F_SEM * | sem | ) | [inline, static] |
Definition at line 295 of file fifos.c.
References flags, lx_semaphore::free, rtf_restore_flags, and rtf_save_flags_and_cli.
Referenced by rtf_ioctl(), rtf_reset(), rtf_resize(), and rtf_sem_trywait().
static int mbx_sem_wait_timed | ( | F_SEM * | sem, | |
int | delay | |||
) | [inline, static] |
Definition at line 369 of file fifos.c.
References current, dequeue_blocked(), enqueue_blocked(), flags, lx_semaphore::free, lx_queue::next, lx_semaphore::qtype, lx_semaphore::queue, rtf_restore_flags, rtf_save_flags_and_cli, and task.
Referenced by mbx_receive_timed(), mbx_send_timed(), and rtf_ioctl().
Here is the call graph for this function:
static int mbx_send | ( | F_MBX * | mbx, | |
const char * | msg, | |||
int | msg_size, | |||
int | lnx | |||
) | [inline, static] |
Definition at line 608 of file fifos.c.
References lx_mailbox::frbs, mbx_put(), mbx_sem_signal(), mbx_sem_wait(), mbx_signal(), mbx_wait(), and lx_mailbox::sndsem.
Referenced by rtf_write().
Here is the call graph for this function:
static int mbx_send_if | ( | F_MBX * | mbx, | |
const char * | msg, | |||
int | msg_size, | |||
int | lnx | |||
) | [inline, static] |
Definition at line 642 of file fifos.c.
References flags, lx_mailbox::frbs, lx_semaphore::free, mbx_put(), mbx_sem_signal(), mbx_signal(), rtf_restore_flags, rtf_save_flags_and_cli, and lx_mailbox::sndsem.
Referenced by _rt_net_rpc(), and rtf_put_if().
Here is the call graph for this function:
static int mbx_send_timed | ( | F_MBX * | mbx, | |
const char * | msg, | |||
int | msg_size, | |||
int | delay, | |||
int | lnx | |||
) | [static] |
Definition at line 659 of file fifos.c.
References mbx_put(), mbx_sem_signal(), mbx_sem_wait_timed(), mbx_signal(), mbx_wait_timed(), and lx_mailbox::sndsem.
Referenced by rtf_ioctl().
Here is the call graph for this function:
static int mbx_send_wp | ( | F_MBX * | mbx, | |
const char * | msg, | |||
int | msg_size, | |||
int | lnx | |||
) | [inline, static] |
Definition at line 625 of file fifos.c.
References flags, lx_mailbox::frbs, lx_semaphore::free, mbx_put(), mbx_sem_signal(), mbx_signal(), rtf_restore_flags, rtf_save_flags_and_cli, and lx_mailbox::sndsem.
Referenced by rtf_ioctl(), rtf_put(), and rtf_write().
Here is the call graph for this function:
static void mbx_signal | ( | F_MBX * | mbx | ) | [inline, static] |
Definition at line 279 of file fifos.c.
References fifo_srq, flags, MAXREQS, rtf_pend_srq, rtf_restore_flags, rtf_save_flags_and_cli, task, taskq, and lx_mailbox::waiting_task.
Referenced by _rt_mbx_ovrwr_send(), _rt_mbx_receive(), _rt_mbx_receive_if(), _rt_mbx_receive_until(), _rt_mbx_receive_wp(), _rt_mbx_send(), _rt_mbx_send_if(), _rt_mbx_send_until(), _rt_mbx_send_wp(), mbx_delete(), mbx_ovrwr_send(), mbx_receive(), mbx_receive_if(), mbx_receive_timed(), mbx_receive_wjo(), mbx_receive_wp(), mbx_send(), mbx_send_if(), mbx_send_timed(), mbx_send_wp(), rtf_reset(), and rtf_resize().
static int mbx_wait | ( | F_MBX * | mbx, | |
int * | fravbs | |||
) | [inline, static] |
Definition at line 345 of file fifos.c.
References current, flags, rtf_restore_flags, rtf_save_flags_and_cli, and lx_mailbox::waiting_task.
Referenced by _rt_mbx_receive(), _rt_mbx_send(), mbx_receive(), mbx_receive_wjo(), and mbx_send().
static int mbx_wait_timed | ( | F_MBX * | mbx, | |
int * | fravbs, | |||
int | delay | |||
) | [inline, static] |
Definition at line 402 of file fifos.c.
References current, flags, rtf_restore_flags, rtf_save_flags_and_cli, and lx_mailbox::waiting_task.
Referenced by mbx_receive_timed(), and mbx_send_timed().
module_exit | ( | __rtai_fifos_exit | ) |
module_init | ( | __rtai_fifos_init | ) |
MODULE_LICENSE | ( | "GPL" | ) |
static int register_lxrt_fifos_support | ( | void | ) | [static] |
Definition at line 1704 of file fifos.c.
References FUN_FIFOS_LXRT_INDX, printk(), rtai_fifos_fun, and set_rt_fun_ext_index().
Referenced by __rtai_fifos_init().
Here is the call graph for this function:
RTAI_MODULE_PARM | ( | MaxFifos | , | |
int | ||||
) |
RTAI_SYSCALL_MODE int rtf_create_named | ( | const char * | name | ) |
Definition at line 1911 of file fifos.c.
References DEFAULT_SIZE, and rtf_named_create().
Here is the call graph for this function:
int rtf_evdrp | ( | unsigned int | minor, | |
void * | msg, | |||
int | msg_size | |||
) |
Definition at line 1194 of file fifos.c.
References fifo, mbx_evdrp(), and VALID_FIFO.
Here is the call graph for this function:
static int rtf_fasync | ( | int | fd, | |
struct file * | filp, | |||
int | mode | |||
) | [static] |
Definition at line 1330 of file fifos.c.
References rt_fifo_struct::asynq, fifo, and TRACE_RTAI_FIFO.
Referenced by rtf_release().
RTAI_SYSCALL_MODE int rtf_get_avbs | ( | unsigned int | minor | ) |
Definition at line 1140 of file fifos.c.
References lx_mailbox::avbs, fifo, rt_fifo_struct::mbx, and VALID_FIFO.
RTAI_SYSCALL_MODE int rtf_get_frbs | ( | unsigned int | minor | ) |
Definition at line 1146 of file fifos.c.
References fifo, lx_mailbox::frbs, rt_fifo_struct::mbx, and VALID_FIFO.
RTAI_SYSCALL_MODE int rtf_get_if | ( | unsigned int | minor, | |
void * | buf, | |||
int | count | |||
) |
Definition at line 1201 of file fifos.c.
References fifo, mbx_receive_if(), and VALID_FIFO.
Here is the call graph for this function:
RTAI_SYSCALL_MODE int rtf_getfifobyname | ( | const char * | name | ) |
static int rtf_ioctl | ( | struct inode * | inode, | |
struct file * | filp, | |||
unsigned int | cmd, | |||
unsigned long | arg | |||
) | [static] |
Definition at line 1412 of file fifos.c.
References args, async_sig, lx_mailbox::avbs, rt_fifo_info_struct::avbs, buf, count, current, DELAY, EAVESDROP, fifo, rt_fifo_info_struct::fifo_number, lx_mailbox::frbs, rt_fifo_info_struct::frbs, rt_fifo_struct::handler, MAX_FIFOS, rt_fifo_struct::mbx, mbx_evdrp(), mbx_ovrwr_send(), mbx_receive(), mbx_receive_if(), mbx_receive_timed(), mbx_receive_wp(), mbx_sem_delete(), mbx_sem_init(), mbx_sem_signal(), mbx_sem_wait(), mbx_sem_wait_if(), mbx_sem_wait_timed(), mbx_send_timed(), mbx_send_wp(), rt_fifo_get_info_struct::n, rt_fifo_struct::name, rt_fifo_info_struct::name, OPEN_SIZED, rt_fifo_struct::opncnt, rt_fifo_info_struct::opncnt, OVRWRITE, printk(), READ_ALL_AT_ONCE, READ_IF, READ_TIMED, RESET, RESIZE, rtf_create(), rtf_create_named(), RTF_CREATE_NAMED, RTF_GET_FIFO_INFO, RTF_GET_N_FIFOS, rtf_getfifobyname(), RTF_NAME_LOOKUP, rtf_named_create(), RTF_NAMED_CREATE, RTF_NAMELEN, rtf_reset(), rtf_resize(), RTF_SEM_DESTROY, RTF_SEM_INIT, RTF_SEM_POST, RTF_SEM_TIMED_WAIT, RTF_SEM_TRYWAIT, RTF_SEM_WAIT, rt_fifo_struct::sem, SET_ASYNC_SIG, lx_mailbox::size, rt_fifo_info_struct::size, SUSPEND_TIMED, TRACE_RTAI_FIFO, WRITE_IF, and WRITE_TIMED.
Here is the call graph for this function:
static loff_t rtf_llseek | ( | struct file * | filp, | |
loff_t | offset, | |||
int | origin | |||
) | [static] |
Definition at line 1650 of file fifos.c.
References rtf_reset(), and TRACE_RTAI_FIFO.
Here is the call graph for this function:
int rtf_named_create | ( | const char * | name, | |
int | size | |||
) |
Definition at line 1885 of file fifos.c.
References fifo, flags, rt_fifo_struct::name, rtf_create(), rtf_name_lock, RTF_NAMELEN, rtf_spin_lock_irqsave, and rtf_spin_unlock_irqrestore.
Here is the call graph for this function:
static int rtf_open | ( | struct inode * | inode, | |
struct file * | filp | |||
) | [static] |
Definition at line 1322 of file fifos.c.
References DEFAULT_SIZE, rtf_create(), and TRACE_RTAI_FIFO.
Here is the call graph for this function:
RTAI_SYSCALL_MODE int rtf_ovrwr_put | ( | unsigned int | minor, | |
void * | buf, | |||
int | count | |||
) |
Definition at line 1126 of file fifos.c.
References fifo, mbx_ovrwr_send(), and VALID_FIFO.
Here is the call graph for this function:
static unsigned int rtf_poll | ( | struct file * | filp, | |
poll_table * | wait | |||
) | [static] |
Definition at line 1633 of file fifos.c.
References fifo, poll_wait(), and TRACE_RTAI_FIFO.
Here is the call graph for this function:
RTAI_SYSCALL_MODE int rtf_put_if | ( | unsigned int | minor, | |
void * | buf, | |||
int | count | |||
) |
Definition at line 1132 of file fifos.c.
References fifo, mbx_send_if(), and VALID_FIFO.
Here is the call graph for this function:
static ssize_t rtf_read | ( | struct file * | filp, | |
char * | buf, | |||
size_t | count, | |||
loff_t * | ppos | |||
) | [static] |
Definition at line 1358 of file fifos.c.
References fifo, mbx_receive_wjo(), mbx_receive_wp(), and TRACE_RTAI_FIFO.
Here is the call graph for this function:
static int rtf_release | ( | struct inode * | inode, | |
struct file * | filp | |||
) | [static] |
Definition at line 1343 of file fifos.c.
References current, fifo, rtf_destroy(), rtf_fasync(), and TRACE_RTAI_FIFO.
Here is the call graph for this function:
static void rtf_sysrq_handler | ( | void | ) | [static] |
Definition at line 778 of file fifos.c.
References async_sig, rt_fifo_struct::asynq, current, MAXREQS, rt_fifo_struct::pol_asyn_pended, pol_asyn_q, rt_fifo_struct::pollq, and taskq.
Referenced by __rtai_fifos_init().
static ssize_t rtf_write | ( | struct file * | filp, | |
const char * | buf, | |||
size_t | count, | |||
loff_t * | ppos | |||
) | [static] |
Definition at line 1385 of file fifos.c.
References fifo, mbx_send(), mbx_send_wp(), and TRACE_RTAI_FIFO.
Here is the call graph for this function:
static void unregister_lxrt_fifos_support | ( | void | ) | [static] |
Definition at line 1713 of file fifos.c.
References FUN_FIFOS_LXRT_INDX, reset_rt_fun_ext_index(), and rtai_fifos_fun.
Referenced by __rtai_fifos_exit().
Here is the call graph for this function:
int async_sig [static] |
Definition at line 219 of file fifos.c.
Referenced by __rtai_fifos_init(), rtf_ioctl(), and rtf_sysrq_handler().
Definition at line 225 of file fifos.c.
Referenced by __rtai_fifos_exit(), __rtai_fifos_init(), main(), rtf_create(), rtf_create_handler(), rtf_destroy(), rtf_evdrp(), rtf_fasync(), rtf_get(), rtf_get_avbs(), rtf_get_frbs(), rtf_get_if(), rtf_getfifobyname(), rtf_ioctl(), rtf_named_create(), rtf_ovrwr_put(), rtf_poll(), rtf_put(), rtf_put_if(), rtf_read(), rtf_release(), rtf_reset(), rtf_resize(), rtf_sem_destroy(), rtf_sem_init(), rtf_sem_post(), rtf_sem_trywait(), and rtf_write().
class_t* fifo_class = NULL [static] |
Definition at line 1728 of file fifos.c.
Referenced by __rtai_fifos_exit(), and __rtai_fifos_init().
int fifo_srq [static] |
Definition at line 219 of file fifos.c.
Referenced by __rtai_fifos_exit(), __rtai_fifos_init(), mbx_sem_delete(), mbx_sem_signal(), and mbx_signal().
int in |
Definition at line 228 of file fifos.c.
Referenced by argconv(), conf_read(), and rt_exec_linux_syscall().
int MaxFifos = MAX_FIFOS [static] |
int out |
Definition at line 228 of file fifos.c.
Referenced by argconv(), conf_write(), rt_exec_linux_syscall(), and sym_check_deps().
struct { ... } pol_asyn_q [static] |
Referenced by __rtai_fifos_init(), mbx_sem_signal(), and rtf_sysrq_handler().
struct rt_fun_entry rtai_fifos_fun[] [static] |
Initial value:
{ [_CREATE] = { 0, rtf_create }, [_DESTROY] = { 0, rtf_destroy }, [_PUT] = { 0, rtf_put }, [_GET] = { 0, rtf_get }, [_RESET] = { 0, rtf_reset }, [_RESIZE] = { 0, rtf_resize }, [_SEM_INIT] = { 0, rtf_sem_init }, [_SEM_DESTRY] = { 0, rtf_sem_destroy }, [_SEM_POST] = { 0, rtf_sem_post }, [_SEM_TRY] = { 0, rtf_sem_trywait }, [_CREATE_NAMED] = { 0, rtf_create_named }, [_GETBY_NAME] = { 0, rtf_getfifobyname }, [_OVERWRITE] = { 0, rtf_ovrwr_put }, [_PUT_IF] = { 0, rtf_put_if }, [_GET_IF] = { 0, rtf_get_if }, [_AVBS] = { 0, rtf_get_avbs }, [_FRBS] = { 0, rtf_get_frbs } }
Definition at line 1684 of file fifos.c.
Referenced by register_lxrt_fifos_support(), and unregister_lxrt_fifos_support().
struct file_operations rtf_fops [static] |
Initial value:
{ owner: THIS_MODULE, llseek: rtf_llseek, read: rtf_read, write: rtf_write, poll: rtf_poll, ioctl: rtf_ioctl, open: rtf_open, release: rtf_release, fasync: rtf_fasync, }
Definition at line 1657 of file fifos.c.
Referenced by __rtai_fifos_init().
spinlock_t rtf_name_lock = SPIN_LOCK_UNLOCKED [static] |
struct task_struct* task[MAXREQS] |
Definition at line 228 of file fifos.c.
Referenced by __rt_proxy_attach(), __rtai_netrpc_exit(), _mq_notify(), _rt_net_rpc(), check_to_soften_harden(), clr_rtext(), dequeue_blocked(), enqueue_blocked(), gvb_stub(), handle_lxrt_request(), hard_stub_fun(), kthread_fun(), kthread_m(), lxrt_fun_call(), lxrt_intercept_exit(), lxrt_intercept_sig_wakeup(), lxrt_intercept_syscall_epilogue(), lxrt_intercept_syscall_prologue(), main(), mbx_sem_delete(), mbx_sem_signal(), mbx_sem_wait(), mbx_sem_wait_timed(), mbx_signal(), mq_notify(), mq_reg_usp_notifier(), port_server_fun(), pthread_make_periodic_np(), pthread_setschedparam_np(), put_current_on_cpu(), rt_bits_delete(), rt_bits_reset(), rt_bits_signal(), rt_buddy_task_use_fpu(), rt_change_prio(), rt_cndmtx_signal(), rt_cond_signal(), rt_create_linux_syscall_server(), rt_Creceive(), rt_dequeue_blocked(), rt_disable_signal(), rt_enable_signal(), rt_enqueue_blocked(), RT_evdrp(), rt_evdrp(), RT_evdrpx(), rt_evdrpx(), rt_exec_signal(), rt_find_asgn_stub(), rt_get_errno(), rt_get_exectime(), rt_get_inher_prio(), rt_get_linux_signal(), rt_get_prio(), rt_get_priorities(), rt_get_task_state(), rt_get_usp_flags(), rt_get_usp_flags_mask(), rt_halloc_typed(), rt_hfree_typed(), rt_is_hard_real_time(), RT_isrpc(), rt_isrpc(), rt_kthread_init(), rt_kthread_init_cpuid(), rt_make_hard_real_time(), rt_make_soft_real_time(), rt_Name_attach(), rt_Name_locate(), rt_named_halloc_typed(), rt_named_hfree_typed(), rt_named_task_delete(), rt_named_task_init(), rt_named_task_init_cpuid(), rt_Proxy_attach(), rt_proxy_attach(), rt_Receive(), RT_receive(), rt_receive(), RT_receive_if(), rt_receive_if(), RT_receive_timed(), rt_receive_timed(), RT_receive_until(), rt_receive_until(), RT_receivex(), rt_receivex(), RT_receivex_if(), rt_receivex_if(), RT_receivex_timed(), rt_receivex_timed(), RT_receivex_until(), rt_receivex_until(), rt_register_task(), rt_register_watchdog(), rt_release_signal(), rt_rem_ready_task(), rt_rem_timed_task(), rt_Reply(), rt_request_signal_(), RT_return(), rt_return(), RT_returnx(), rt_returnx(), RT_rpc(), rt_rpc(), RT_rpc_if(), rt_rpc_if(), RT_rpc_timed(), rt_rpc_timed(), RT_rpc_until(), rt_rpc_until(), RT_rpcx(), rt_rpcx(), RT_rpcx_if(), rt_rpcx_if(), RT_rpcx_timed(), rt_rpcx_timed(), RT_rpcx_until(), rt_rpcx_until(), rt_rwl_unlock(), rt_schedule(), rt_sem_broadcast(), rt_sem_delete(), rt_sem_signal(), rt_Send(), RT_send(), rt_send(), RT_send_if(), rt_send_if(), rt_send_req_rel_port(), RT_send_timed(), rt_send_timed(), RT_send_until(), rt_send_until(), RT_sendx(), rt_sendx(), RT_sendx_if(), rt_sendx_if(), RT_sendx_timed(), rt_sendx_timed(), RT_sendx_until(), rt_sendx_until(), rt_set_heap(), rt_set_linux_signal_handler(), rt_set_period(), rt_set_resume_time(), rt_set_runnable_on_cpuid(), rt_set_runnable_on_cpus(), rt_set_sched_policy(), rt_set_task_trap_handler(), rt_set_usp_flags(), rt_signal_helper(), rt_signal_wake_up(), rt_spv_RMS(), rt_task_delete(), rt_task_get_info(), rt_task_init(), rt_task_init_cpuid(), rt_task_make_periodic(), rt_task_make_periodic_relative_ns(), rt_task_masked_unblock(), RT_task_resume(), rt_task_resume(), rt_task_signal_handler(), RT_task_suspend(), rt_task_suspend(), rt_task_suspend_if(), rt_task_suspend_timed(), rt_task_suspend_until(), rt_task_use_fpu(), rt_task_yield(), rt_tasklet_use_fpu(), rt_thread_delete(), rt_timer_handler(), rt_trigger_signal(), rt_wait_signal(), rtai_lxrt_invoke(), set_rtext(), signal_suprt_fun(), signal_suprt_fun_mq(), soft_kthread_delete(), soft_kthread_init(), soft_rt_fun_call(), soft_rt_genfun_call(), soft_stub_fun(), start_stop_kthread(), support_posix_timer(), support_tasklet(), thread_fun(), and watchdog().
struct { ... } taskq [static] |
Referenced by __rtai_fifos_init(), mbx_sem_delete(), mbx_sem_signal(), mbx_signal(), and rtf_sysrq_handler().