Include dependency graph for netrpc.c:

Go to the source code of this file.
Data Structures | |
| struct | portslot_t |
| struct | recovery_msg |
| struct | req_rel_msg |
| struct | par_t |
| struct | reply_t |
Defines | |
| #define | COMPILE_ANYHOW |
| #define | SOFT_RTNET 1 |
| #define | HARD_RTNET 0 |
| #define | MSG_SOFT 0 |
| #define | MSG_HARD 0 |
| #define | hard_rt_socket(a, b, c) portslot[i].socket[0] |
| #define | hard_rt_bind(a, b, c) |
| #define | hard_rt_close(a) |
| #define | hard_rt_socket_callback soft_rt_socket_callback |
| #define | hard_rt_recvfrom soft_rt_recvfrom |
| #define | hard_rt_sendto soft_rt_sendto |
| #define | LOCALHOST "127.0.0.1" |
| #define | BASEPORT (NETRPC_BASEPORT) |
| #define | NETRPC_STACK_SIZE 6000 |
| #define | MAX_DFUN_EXT 16 |
| #define | PRTSRVNAME 0xFFFFFFFF |
| #define | NETRPC_TIMER_FREQ 50 |
| #define | recv_mach (sizeof(long)) |
| #define | ADRSZ sizeof(struct sockaddr) |
| #define | MOD_SIZE(indx) ((indx) < mbx->size ? (indx) : (indx) - mbx->size) |
| #define | RETURN_ERR(err) |
| #define | SYSCALL_BGN() do { int retval; mm_segment_t svdfs = get_fs(); set_fs(KERNEL_DS) |
| #define | SYSCALL_END() set_fs(svdfs); return retval; } while (0) |
| #define | DECLARE_MUTEX_LOCKED(name) struct semaphore name = __SEMAPHORE_INITIALIZER(name, 0) |
Functions | |
| MODULE_LICENSE ("GPL") | |
| RTAI_MODULE_PARM (MaxStubs, ulong) | |
| RTAI_MODULE_PARM (MaxSocks, ulong) | |
| RTAI_MODULE_PARM (StackSize, int) | |
| RTAI_MODULE_PARM (ThisNode, charp) | |
| RTAI_MODULE_PARM (ThisSoftNode, charp) | |
| RTAI_MODULE_PARM (ThisHardNode, charp) | |
| static struct portslot_t * | get_portslot (void) |
| static int | gvb_portslot (struct portslot_t *portslotp) |
| static void | check_portslot (unsigned long node, int port, struct portslot_t **p) |
| static void | timer_fun (unsigned long none) |
| void | set_netrpc_encoding (void *encode_fun, void *decode_fun, void *ext) |
| static int | argconv (void *ain, void *aout, int send_mach, int argsize, unsigned int partypes) |
| static void | net_resume_task (int sock, struct portslot_t *p) |
| int | get_min_tasks_cpuid (void) |
| int | set_rtext (RT_TASK *, int, int, void(*)(void), unsigned int, void *) |
| int | clr_rtext (RT_TASK *) |
| void | rt_schedule_soft (RT_TASK *) |
| static int | soft_rt_fun_call (RT_TASK *task, void *fun, void *arg) |
| static long long | soft_rt_genfun_call (RT_TASK *task, void *fun, void *args, int argsize) |
| void | rt_daemonize (void) |
| static void | thread_fun (RT_TASK *task) |
| static int | soft_kthread_init (RT_TASK *task, long fun, long arg, int priority) |
| static int | soft_kthread_delete (RT_TASK *task) |
| static int | get_stub (unsigned long long owner) |
| static int | gvb_stub (int slot, unsigned long long owner) |
| static int | find_stub (unsigned long long owner) |
| static void | soft_stub_fun (struct portslot_t *portslotp) |
| static void | hard_stub_fun (struct portslot_t *portslotp) |
| static void | port_server_fun (RT_TASK *port_server) |
| RTAI_SYSCALL_MODE int | rt_send_req_rel_port (unsigned long node, int op, unsigned long id, MBX *mbx, int hard) |
| RTAI_SYSCALL_MODE int | rt_set_netrpc_timeout (int port, RTIME timeout) |
| RTAI_SYSCALL_MODE RT_TASK * | rt_find_asgn_stub (unsigned long long owner, int asgn) |
| RTAI_SYSCALL_MODE int | rt_rel_stub (unsigned long long owner) |
| RTAI_SYSCALL_MODE int | rt_waiting_return (unsigned long node, int port) |
| static void | mbx_signal (MBX *mbx) |
| static void | mbxput (MBX *mbx, char **msg, int msg_size) |
| static void | mbx_send_if (MBX *mbx, void *msg, int msg_size) |
| RTAI_SYSCALL_MODE long long | _rt_net_rpc (long fun_ext_timed, long type, void *args, int argsize, int space, unsigned long partypes) |
| int | rt_get_net_rpc_ret (MBX *mbx, unsigned long long *retval, void *msg1, int *msglen1, void *msg2, int *msglen2, RTIME timeout, int type) |
| RTAI_SYSCALL_MODE unsigned long | ddn2nl (const char *ddn) |
| RTAI_SYSCALL_MODE unsigned long | rt_set_this_node (const char *ddn, unsigned long node, int hard) |
| int | set_rt_fun_entries (struct rt_native_fun_entry *entry) |
| void | reset_rt_fun_entries (struct rt_native_fun_entry *entry) |
| static int | init_softrtnet (void) |
| static void | cleanup_softrtnet (void) |
| void | do_mod_timer (void) |
| int | soft_rt_socket (int domain, int type, int protocol) |
| int | soft_rt_close (int sock) |
| int | soft_rt_bind (int sock, struct sockaddr *addr, int addrlen) |
| int | soft_rt_socket_callback (int sock, int(*func)(int sock, void *arg), void *arg) |
| int | soft_rt_sendto (int sock, const void *msg, int msglen, unsigned int sflags, struct sockaddr *to, int tolen) |
| int | soft_rt_recvfrom (int sock, void *msg, int msglen, unsigned int flags, struct sockaddr *from, long *fromlen) |
| static int | kpoll (struct pollfd *ufds, unsigned int nfds, int timeout) |
| static int | ksocket (int family, int type, int protocol) |
| static int | kbind (int fd, struct sockaddr *umyaddr, int addrlen) |
| static int | kconnect (int fd, struct sockaddr *serv_addr, int addrlen) |
| static int | klisten (int fd, int backlog) |
| static int | kaccept (int fd, struct sockaddr *upeer_sockaddr, int *upeer_addrlen) |
| static int | kgetsockname (int fd, struct sockaddr *usockaddr, int *usockaddr_len) |
| static int | kgetpeername (int fd, struct sockaddr *usockaddr, int *usockaddr_len) |
| static int | ksocketpair (int family, int type, int protocol, int *usockvec) |
| static int | ksendto (int fd, void *buff, size_t len, unsigned flags, struct sockaddr *addr, int addr_len) |
| static int | krecvfrom (int fd, void *ubuf, size_t len, unsigned flags, struct sockaddr *addr, int *addr_len) |
| static int | kshutdown (int fd, int how) |
| static int | ksetsockopt (int fd, int level, int optname, void *optval, int optlen) |
| static int | kgetsockopt (int fd, int level, int optname, char *optval, int *optlen) |
| static int | ksendmsg (int fd, struct msghdr *msg, unsigned flags) |
| static int | krecvmsg (int fd, struct msghdr *msg, unsigned flags) |
| static int | ksend (int fd, void *buff, size_t len, unsigned flags) |
| static int | krecv (int fd, void *ubuf, size_t size, unsigned flags) |
| static | DECLARE_MUTEX_LOCKED (mtx) |
| static void | send_thread (void) |
| static void | recv_thread (void) |
| static void | softrtnet_hdl (void) |
| int | __rtai_netrpc_init (void) |
| void | __rtai_netrpc_exit (void) |
| module_init (__rtai_netrpc_init) | |
| module_exit (__rtai_netrpc_exit) | |
| EXPORT_SYMBOL (set_netrpc_encoding) | |
| EXPORT_SYMBOL (rt_send_req_rel_port) | |
| EXPORT_SYMBOL (rt_find_asgn_stub) | |
| EXPORT_SYMBOL (rt_rel_stub) | |
| EXPORT_SYMBOL (rt_waiting_return) | |
| EXPORT_SYMBOL (_rt_net_rpc) | |
| EXPORT_SYMBOL (rt_get_net_rpc_ret) | |
| EXPORT_SYMBOL (rt_set_this_node) | |
| EXPORT_SYMBOL (rt_set_netrpc_timeout) | |
| EXPORT_SYMBOL (soft_rt_socket) | |
| EXPORT_SYMBOL (soft_rt_close) | |
| EXPORT_SYMBOL (soft_rt_bind) | |
| EXPORT_SYMBOL (soft_rt_socket_callback) | |
| EXPORT_SYMBOL (soft_rt_sendto) | |
| EXPORT_SYMBOL (soft_rt_recvfrom) | |
| EXPORT_SYMBOL (ddn2nl) | |
| EXPORT_SYMBOL (rt_net_rpc_fun_hook) | |
Variables | |
| static unsigned long | MaxStubs = MAX_STUBS |
| static int | MaxStubsMone |
| static unsigned long | MaxSocks = MAX_SOCKS |
| static int | StackSize = NETRPC_STACK_SIZE |
| static char * | ThisNode = LOCALHOST |
| static char * | ThisSoftNode = 0 |
| static char * | ThisHardNode = 0 |
| static struct rt_fun_entry * | rt_net_rpc_fun_ext [MAX_DFUN_EXT] |
| static unsigned long | this_node [2] |
| static spinlock_t | portslot_lock = SPIN_LOCK_UNLOCKED |
| static volatile int | portslotsp |
| static spinlock_t | stub_lock = SPIN_LOCK_UNLOCKED |
| static volatile int | stubssp = 1 |
| static struct portslot_t * | portslot |
| static struct sockaddr_in | SPRT_ADDR |
| struct { | |
| int in | |
| int out | |
| recovery_msg * msg | |
| } | recovery |
| static spinlock_t | recovery_lock = SPIN_LOCK_UNLOCKED |
| static struct timer_list | timer |
| static SEM | timer_sem |
| static int(*) | encode (struct portslot_t *portslotp, void *msg, int size, int where) |
| static int(*) | decode (struct portslot_t *portslotp, void *msg, int size, int where) |
| static int | mod_timer_srq |
| rt_native_fun_entry | rt_netrpc_entries [] |
| static RT_TASK * | port_server |
| static struct sock_t * | socks |
| static int | MaxSockSrq |
| struct { | |
| int srq | |
| int in | |
| int out | |
| int * sockindx | |
| } | sysrq |
| static spinlock_t | sysrq_lock = SPIN_LOCK_UNLOCKED |
| int | errno |
| void * | sys_call_table [] |
| static unsigned long | end_softrtnet |
| static struct pollfd * | pollv |
| static struct task_struct * | recv_handle |
| void ** | rt_net_rpc_fun_hook = (void *)rt_net_rpc_fun_ext |
| #define ADRSZ sizeof(struct sockaddr) |
Definition at line 376 of file netrpc.c.
Referenced by __rtai_netrpc_init(), _rt_net_rpc(), hard_stub_fun(), init_softrtnet(), port_server_fun(), rt_send_req_rel_port(), send_thread(), and soft_stub_fun().
| #define BASEPORT (NETRPC_BASEPORT) |
Definition at line 78 of file netrpc.c.
Referenced by __rtai_netrpc_init(), gvb_stub(), hard_stub_fun(), init_softrtnet(), port_server_fun(), and soft_stub_fun().
| #define DECLARE_MUTEX_LOCKED | ( | name | ) | struct semaphore name = __SEMAPHORE_INITIALIZER(name, 0) |
| #define hard_rt_bind | ( | a, | |||
| b, | |||||
| c | ) |
| #define hard_rt_close | ( | a | ) |
| #define hard_rt_recvfrom soft_rt_recvfrom |
Definition at line 72 of file netrpc.c.
Referenced by _rt_net_rpc(), hard_stub_fun(), and net_resume_task().
| #define hard_rt_sendto soft_rt_sendto |
| #define hard_rt_socket | ( | a, | |||
| b, | |||||
| c | ) | portslot[i].socket[0] |
| #define hard_rt_socket_callback soft_rt_socket_callback |
| #define MOD_SIZE | ( | indx | ) | ((indx) < mbx->size ? (indx) : (indx) - mbx->size) |
| #define MSG_HARD 0 |
Definition at line 67 of file netrpc.c.
Referenced by port_server_fun(), rt_send_req_rel_port(), and rt_set_this_node().
| #define MSG_SOFT 0 |
Definition at line 66 of file netrpc.c.
Referenced by port_server_fun(), rt_send_req_rel_port(), and rt_set_this_node().
| #define NETRPC_TIMER_FREQ 50 |
Definition at line 186 of file netrpc.c.
Referenced by do_mod_timer(), rt_send_req_rel_port(), soft_kthread_delete(), soft_kthread_init(), and timer_fun().
| #define PRTSRVNAME 0xFFFFFFFF |
Definition at line 106 of file netrpc.c.
Referenced by __rtai_netrpc_init(), and rt_send_req_rel_port().
| #define recv_mach (sizeof(long)) |
Referenced by argconv().
| #define RETURN_ERR | ( | err | ) |
Value:
do { \ union { long long ll; long l; } retval; \ retval.l = err; \ return retval.ll; \ } while (0)
Definition at line 965 of file netrpc.c.
Referenced by _rt_net_rpc().
| #define SYSCALL_BGN | ( | ) | do { int retval; mm_segment_t svdfs = get_fs(); set_fs(KERNEL_DS) |
Definition at line 1317 of file netrpc.c.
Referenced by kaccept(), kbind(), kconnect(), kgetpeername(), kgetsockname(), kgetsockopt(), klisten(), kpoll(), krecvfrom(), krecvmsg(), ksendmsg(), ksendto(), ksetsockopt(), kshutdown(), ksocket(), and ksocketpair().
| #define SYSCALL_END | ( | ) | set_fs(svdfs); return retval; } while (0) |
Definition at line 1319 of file netrpc.c.
Referenced by kaccept(), kbind(), kconnect(), kgetpeername(), kgetsockname(), kgetsockopt(), klisten(), kpoll(), krecvfrom(), krecvmsg(), ksendmsg(), ksendto(), ksetsockopt(), kshutdown(), ksocket(), and ksocketpair().
| void __rtai_netrpc_exit | ( | void | ) |
Definition at line 1817 of file netrpc.c.
References cleanup_softrtnet(), hard_rt_close, MaxSocks, MaxStubs, portslot, reset_rt_fun_entries(), rt_free_srq(), rt_sem_delete(), rt_task_delete, soft_kthread_delete(), soft_rt_close(), task, and timer_sem.
Here is the call graph for this function:

| int __rtai_netrpc_init | ( | void | ) |
Definition at line 1752 of file netrpc.c.
References portslot_t::addr, ADRSZ, BASEPORT, BIN_SEM, ddn2nl(), do_mod_timer(), FIFO_Q, portslot_t::hard, hard_rt_bind, hard_rt_socket, hard_rt_socket_callback, portslot_t::indx, init_softrtnet(), MaxSocks, MaxStubs, MaxStubsMone, portslot_t::name, net_resume_task(), NET_RPC_EXT, OWNER, portslot_t::owner, portslot_t::place, port_server, port_server_fun(), portslot, portslotsp, printk(), PRTSRVNAME, recovery, rt_free_srq(), rt_fun_lxrt, rt_net_rpc_fun_ext, rt_request_srq(), RT_SCHED_LOWEST_PRIORITY, rt_task_resume(), rt_typed_sem_init(), set_rt_fun_entries(), portslot_t::socket, soft_kthread_init(), soft_rt_bind(), soft_rt_socket(), soft_rt_socket_callback(), SPRT_ADDR, portslot_t::task, this_node, ThisHardNode, ThisNode, ThisSoftNode, portslot_t::timeout, timer_fun(), and timer_sem.
Here is the call graph for this function:

| RTAI_SYSCALL_MODE long long _rt_net_rpc | ( | long | fun_ext_timed, | |
| long | type, | |||
| void * | args, | |||
| int | argsize, | |||
| int | space, | |||
| unsigned long | partypes | |||
| ) |
Definition at line 972 of file netrpc.c.
References par_t::a, portslot_t::addr, ADRSZ, par_t::argsize, par_t::base_priority, decode, encode, FUN, par_t::fun_ext_timed, portslot_t::hard, hard_rt_recvfrom, hard_rt_sendto, par_t::mach, MAX_MSG_SIZE, portslot_t::mbx, mbx_send_if(), reply_t::msg, portslot_t::msg, reply_t::myport, portslot_t::name, par_t::owner, portslot_t::owner, par_t::partypes, PORT, port, PORT_SHF, portslot, par_t::priority, RETURN_ERR, reply_t::retval, RPC_RCV, RPC_REQ, par_t::rsize, rt_sem_wait(), rt_sem_wait_if(), rt_sem_wait_timed(), RTE_CHGPORTERR, RTE_CHGPORTOK, RTE_NETIMOUT, RTE_TIMOUT, portslot_t::sem, portslot_t::socket, soft_rt_recvfrom(), soft_rt_sendto(), SYNC_NET_RPC, portslot_t::task, task, portslot_t::timeout, par_t::type, reply_t::w2size, and reply_t::wsize.
Here is the call graph for this function:

| static int argconv | ( | void * | ain, | |
| void * | aout, | |||
| int | send_mach, | |||
| int | argsize, | |||
| unsigned int | partypes | |||
| ) | [inline, static] |
Definition at line 215 of file netrpc.c.
References in, out, recv_mach, reset_kadr(), RTIM, SINT, UINT, VADR, WDW, and WDWMSK.
Referenced by hard_stub_fun(), and soft_stub_fun().
Here is the call graph for this function:

| static void check_portslot | ( | unsigned long | node, | |
| int | port, | |||
| struct portslot_t ** | p | |||
| ) | [inline, static] |
Definition at line 165 of file netrpc.c.
References portslot_t::addr, MaxStubs, portslot_t::p, portslot, and portslotsp.
Referenced by rt_send_req_rel_port().
| static void cleanup_softrtnet | ( | void | ) | [static] |
Definition at line 1724 of file netrpc.c.
References current, kshutdown(), MaxSocks, pollv, rt_free_srq(), socks, softrtnet_hdl(), and sysrq.
Referenced by __rtai_netrpc_exit().
Here is the call graph for this function:

| int clr_rtext | ( | RT_TASK * | ) |
Definition at line 1158 of file sched.c.
Referenced by __task_delete(), __task_init(), kthread_fun(), rt_task_delete(), and soft_kthread_delete().
| RTAI_SYSCALL_MODE unsigned long ddn2nl | ( | const char * | ddn | ) |
| static DECLARE_MUTEX_LOCKED | ( | mtx | ) | [static] |
| void do_mod_timer | ( | void | ) |
Definition at line 1231 of file netrpc.c.
References NETRPC_TIMER_FREQ.
Referenced by __rtai_netrpc_init().
| EXPORT_SYMBOL | ( | rt_net_rpc_fun_hook | ) |
| EXPORT_SYMBOL | ( | ddn2nl | ) |
| EXPORT_SYMBOL | ( | soft_rt_recvfrom | ) |
| EXPORT_SYMBOL | ( | soft_rt_sendto | ) |
| EXPORT_SYMBOL | ( | soft_rt_socket_callback | ) |
| EXPORT_SYMBOL | ( | soft_rt_bind | ) |
| EXPORT_SYMBOL | ( | soft_rt_close | ) |
| EXPORT_SYMBOL | ( | soft_rt_socket | ) |
| EXPORT_SYMBOL | ( | rt_set_netrpc_timeout | ) |
| EXPORT_SYMBOL | ( | rt_set_this_node | ) |
| EXPORT_SYMBOL | ( | rt_get_net_rpc_ret | ) |
| EXPORT_SYMBOL | ( | _rt_net_rpc | ) |
| EXPORT_SYMBOL | ( | rt_waiting_return | ) |
| EXPORT_SYMBOL | ( | rt_rel_stub | ) |
| EXPORT_SYMBOL | ( | rt_find_asgn_stub | ) |
| EXPORT_SYMBOL | ( | rt_send_req_rel_port | ) |
| EXPORT_SYMBOL | ( | set_netrpc_encoding | ) |
| static int find_stub | ( | unsigned long long | owner | ) | [inline, static] |
Definition at line 442 of file netrpc.c.
References flags, portslot_t::p, portslot, rt_spin_lock_irqsave(), rt_spin_unlock_irqrestore, stub_lock, and stubssp.
Referenced by rt_find_asgn_stub(), and rt_rel_stub().
Here is the call graph for this function:

| int get_min_tasks_cpuid | ( | void | ) |
Definition at line 214 of file sched.c.
Referenced by __task_init(), rt_kthread_init(), rt_set_runnable_on_cpuid(), rt_set_runnable_on_cpus(), and thread_fun().
| static struct portslot_t* get_portslot | ( | void | ) | [inline, static] |
Definition at line 129 of file netrpc.c.
References flags, MaxSocks, portslot_t::p, portslot, portslot_lock, portslotsp, rt_spin_lock_irqsave(), and rt_spin_unlock_irqrestore.
Referenced by rt_send_req_rel_port().
Here is the call graph for this function:

| static int get_stub | ( | unsigned long long | owner | ) | [inline, static] |
Definition at line 378 of file netrpc.c.
References flags, MaxStubsMone, portslot_t::owner, portslot_t::p, portslot, rt_spin_lock_irqsave(), rt_spin_unlock_irqrestore, stub_lock, and stubssp.
Referenced by port_server_fun(), and rt_find_asgn_stub().
Here is the call graph for this function:

| static int gvb_portslot | ( | struct portslot_t * | portslotp | ) | [inline, static] |
Definition at line 144 of file netrpc.c.
References flags, MaxStubs, portslot_t::p, portslot_t::place, portslot, portslot_lock, portslotsp, rt_spin_lock_irqsave(), and rt_spin_unlock_irqrestore.
Referenced by rt_send_req_rel_port().
Here is the call graph for this function:

| static int gvb_stub | ( | int | slot, | |
| unsigned long long | owner | |||
| ) | [inline, static] |
Definition at line 401 of file netrpc.c.
References BASEPORT, flags, MaxStubs, portslot_t::owner, portslot_t::p, portslot_t::place, portslot, rt_spin_lock_irqsave(), rt_spin_unlock_irqrestore, rt_task_delete, soft_kthread_delete(), stub_lock, stubssp, portslot_t::task, and task.
Referenced by port_server_fun(), and rt_rel_stub().
Here is the call graph for this function:

| static void hard_stub_fun | ( | struct portslot_t * | portslotp | ) | [static] |
Definition at line 558 of file netrpc.c.
References portslot_t::addr, ADRSZ, argconv(), par_t::argsize, par_t::base_priority, BASEPORT, current, decode, encode, EXT, flags, FUN, par_t::fun_ext_timed, hard_rt_recvfrom, hard_rt_sendto, par_t::mach, MAX_MSG_SIZE, MaxStubsMone, reply_t::myport, nano2count(), NETRPC_ALIGN_RTIME, par_t::owner, portslot_t::owner, par_t::partypes, portslot, par_t::priority, portslot_t::recovered, recovery, recovery_lock, reply_t::retval, RPC_RTR, RPC_SRV, par_t::rsize, rt_net_rpc_fun_ext, RT_SCHED_LINUX_PRIORITY, rt_sem_signal(), rt_sem_wait(), rt_spin_lock_irqsave(), rt_spin_unlock_irqrestore, rt_task_suspend(), RTE_LOWERR, portslot_t::sem, portslot_t::socket, portslot_t::task, task, TIMED, and par_t::type.
Referenced by port_server_fun().
Here is the call graph for this function:

| static int init_softrtnet | ( | void | ) | [static] |
Definition at line 1671 of file netrpc.c.
References sock_t::addrlen, ADRSZ, BASEPORT, current, kbind(), ksocket(), MaxSocks, pollv, printk(), recv_thread(), rt_free_srq(), rt_request_srq(), send_thread(), sock_t::sock, socks, softrtnet_hdl(), SPRT_ADDR, and sysrq.
Referenced by __rtai_netrpc_init().
Here is the call graph for this function:

| static int kaccept | ( | int | fd, | |
| struct sockaddr * | upeer_sockaddr, | |||
| int * | upeer_addrlen | |||
| ) | [inline, static] |
| static int kbind | ( | int | fd, | |
| struct sockaddr * | umyaddr, | |||
| int | addrlen | |||
| ) | [inline, static] |
Definition at line 1475 of file netrpc.c.
References SYSCALL_BGN, and SYSCALL_END.
Referenced by init_softrtnet().
| static int kconnect | ( | int | fd, | |
| struct sockaddr * | serv_addr, | |||
| int | addrlen | |||
| ) | [inline, static] |
| static int kgetpeername | ( | int | fd, | |
| struct sockaddr * | usockaddr, | |||
| int * | usockaddr_len | |||
| ) | [inline, static] |
| static int kgetsockname | ( | int | fd, | |
| struct sockaddr * | usockaddr, | |||
| int * | usockaddr_len | |||
| ) | [inline, static] |
| static int kgetsockopt | ( | int | fd, | |
| int | level, | |||
| int | optname, | |||
| char * | optval, | |||
| int * | optlen | |||
| ) | [inline, static] |
| static int klisten | ( | int | fd, | |
| int | backlog | |||
| ) | [inline, static] |
| static int kpoll | ( | struct pollfd * | ufds, | |
| unsigned int | nfds, | |||
| int | timeout | |||
| ) | [inline, static] |
Definition at line 1457 of file netrpc.c.
References SYSCALL_BGN, and SYSCALL_END.
Referenced by recv_thread().
| static int krecv | ( | int | fd, | |
| void * | ubuf, | |||
| size_t | size, | |||
| unsigned | flags | |||
| ) | [inline, static] |
Definition at line 1607 of file netrpc.c.
References krecvfrom().
Here is the call graph for this function:

| static int krecvfrom | ( | int | fd, | |
| void * | ubuf, | |||
| size_t | len, | |||
| unsigned | flags, | |||
| struct sockaddr * | addr, | |||
| int * | addr_len | |||
| ) | [inline, static] |
Definition at line 1547 of file netrpc.c.
References SYSCALL_BGN, and SYSCALL_END.
Referenced by krecv(), and recv_thread().
| static int krecvmsg | ( | int | fd, | |
| struct msghdr * | msg, | |||
| unsigned | flags | |||
| ) | [inline, static] |
| static int ksend | ( | int | fd, | |
| void * | buff, | |||
| size_t | len, | |||
| unsigned | flags | |||
| ) | [inline, static] |
| static int ksendmsg | ( | int | fd, | |
| struct msghdr * | msg, | |||
| unsigned | flags | |||
| ) | [inline, static] |
| static int ksendto | ( | int | fd, | |
| void * | buff, | |||
| size_t | len, | |||
| unsigned | flags, | |||
| struct sockaddr * | addr, | |||
| int | addr_len | |||
| ) | [inline, static] |
Definition at line 1538 of file netrpc.c.
References SYSCALL_BGN, and SYSCALL_END.
Referenced by ksend(), and send_thread().
| static int ksetsockopt | ( | int | fd, | |
| int | level, | |||
| int | optname, | |||
| void * | optval, | |||
| int | optlen | |||
| ) | [inline, static] |
| static int kshutdown | ( | int | fd, | |
| int | how | |||
| ) | [inline, static] |
Definition at line 1556 of file netrpc.c.
References SYSCALL_BGN, and SYSCALL_END.
Referenced by cleanup_softrtnet().
| static int ksocket | ( | int | family, | |
| int | type, | |||
| int | protocol | |||
| ) | [inline, static] |
Definition at line 1466 of file netrpc.c.
References SYSCALL_BGN, and SYSCALL_END.
Referenced by init_softrtnet().
| static int ksocketpair | ( | int | family, | |
| int | type, | |||
| int | protocol, | |||
| int * | usockvec | |||
| ) | [inline, static] |
| static void mbx_send_if | ( | MBX * | mbx, | |
| void * | msg, | |||
| int | msg_size | |||
| ) | [static] |
Definition at line 938 of file netrpc.c.
References portslot_t::mbx, mbx_signal(), mbxput(), RT_MBX_MAGIC, and rt_sem_signal().
Here is the call graph for this function:

| static void mbx_signal | ( | MBX * | mbx | ) | [inline, static] |
Definition at line 895 of file netrpc.c.
References portslot_t::mbx, RT_SCHED_DELAYED, RT_SCHED_MBXSUSP, RT_SCHED_READY, and task.
| static void mbxput | ( | MBX * | mbx, | |
| char ** | msg, | |||
| int | msg_size | |||
| ) | [inline, static] |
Definition at line 915 of file netrpc.c.
References portslot_t::mbx, MOD_SIZE, rt_spin_lock_irqsave(), and rt_spin_unlock_irqrestore.
Here is the call graph for this function:

| module_exit | ( | __rtai_netrpc_exit | ) |
| module_init | ( | __rtai_netrpc_init | ) |
| MODULE_LICENSE | ( | "GPL" | ) |
| static void net_resume_task | ( | int | sock, | |
| struct portslot_t * | p | |||
| ) | [static] |
Definition at line 273 of file netrpc.c.
References portslot_t::addr, flags, portslot_t::hard, hard_rt_recvfrom, portslot_t::indx, MAX_MSG_SIZE, MaxStubs, MaxStubsMone, par_t::owner, portslot, par_t::priority, recovery, recovery_lock, rt_sem_signal(), rt_spin_lock_irqsave(), rt_spin_unlock_irqrestore, portslot_t::sem, portslot_t::socket, soft_rt_recvfrom(), and portslot_t::task.
Referenced by __rtai_netrpc_init().
Here is the call graph for this function:

| static void port_server_fun | ( | RT_TASK * | port_server | ) | [static] |
Definition at line 661 of file netrpc.c.
References portslot_t::addr, ADRSZ, BASEPORT, current, decode, encode, get_stub(), gvb_stub(), portslot_t::hard, recovery_msg::hard, hard_stub_fun(), MAX_MSG_SIZE, MaxStubsMone, msg, MSG_HARD, MSG_SOFT, portslot_t::name, portslot_t::owner, recovery_msg::owner, port_server, portslot, recovery_msg::priority, PRT_RTR, PRT_SRV, portslot_t::recovered, recovery, RT_SCHED_READY, rt_sem_wait(), rt_task_init(), rt_task_masked_unblock(), rt_task_resume(), RTE_LOWERR, portslot_t::sem, soft_kthread_init(), soft_rt_fun_call(), soft_rt_recvfrom(), soft_rt_sendto(), soft_stub_fun(), StackSize, portslot_t::task, task, this_node, and TSK_FRM_WNR.
Referenced by __rtai_netrpc_init().
Here is the call graph for this function:

| static void recv_thread | ( | void | ) | [static] |
Definition at line 1644 of file netrpc.c.
References sock_t::callback, current, kpoll(), krecvfrom(), MAX_MSG_SIZE, MaxSocks, pollv, rtai_set_linux_task_priority(), and socks.
Referenced by init_softrtnet().
Here is the call graph for this function:

| void rt_daemonize | ( | void | ) |
Referenced by kthread_fun(), kthread_m(), and thread_fun().
| RTAI_SYSCALL_MODE RT_TASK* rt_find_asgn_stub | ( | unsigned long long | owner, | |
| int | asgn | |||
| ) |
Definition at line 819 of file netrpc.c.
References find_stub(), get_stub(), portslot, and task.
Here is the call graph for this function:

| int rt_get_net_rpc_ret | ( | MBX * | mbx, | |
| unsigned long long * | retval, | |||
| void * | msg1, | |||
| int * | msglen1, | |||
| void * | msg2, | |||
| int * | msglen2, | |||
| RTIME | timeout, | |||
| int | type | |||
| ) |
Definition at line 1131 of file netrpc.c.
References _rt_mbx_receive(), NET_RPC_EXT, reply_t::retval, rt_net_rpc_fun_ext, reply_t::w2size, and reply_t::wsize.
Here is the call graph for this function:

| RTAI_SYSCALL_MODE int rt_rel_stub | ( | unsigned long long | owner | ) |
Definition at line 826 of file netrpc.c.
References find_stub(), and gvb_stub().
Here is the call graph for this function:

| void rt_schedule_soft | ( | RT_TASK * | ) |
Definition at line 1955 of file sched.c.
Referenced by lxrt_fun_call(), soft_rt_fun_call(), and soft_rt_genfun_call().
| RTAI_SYSCALL_MODE int rt_send_req_rel_port | ( | unsigned long | node, | |
| int | op, | |||
| unsigned long | id, | |||
| MBX * | mbx, | |||
| int | hard | |||
| ) |
Definition at line 738 of file netrpc.c.
References portslot_t::addr, ADRSZ, check_portslot(), decode, encode, get_portslot(), gvb_portslot(), recovery_msg::hard, portslot_t::hard, portslot_t::indx, MaxSocks, portslot_t::mbx, msg, MSG_HARD, MSG_SOFT, portslot_t::name, NETRPC_TIMER_FREQ, portslot_t::owner, OWNER, recovery_msg::owner, PORT_INC, PORT_SHF, portslot, recovery_msg::priority, PRT_RCV, PRT_REQ, PRTSRVNAME, portslot_t::recovered, rt_pend_linux_srq(), rt_sem_wait(), portslot_t::sem, portslot_t::socket, soft_rt_recvfrom(), soft_rt_sendto(), SPRT_ADDR, portslot_t::task, task, this_node, and timer_sem.
Here is the call graph for this function:

| RTAI_SYSCALL_MODE int rt_set_netrpc_timeout | ( | int | port, | |
| RTIME | timeout | |||
| ) |
| RTAI_SYSCALL_MODE unsigned long rt_set_this_node | ( | const char * | ddn, | |
| unsigned long | node, | |||
| int | hard | |||
| ) |
| RTAI_SYSCALL_MODE int rt_waiting_return | ( | unsigned long | node, | |
| int | port | |||
| ) |
Definition at line 839 of file netrpc.c.
References PORT_SHF, portslot, portslot_t::sem, and portslot_t::task.
| RTAI_MODULE_PARM | ( | ThisHardNode | , | |
| charp | ||||
| ) |
| RTAI_MODULE_PARM | ( | ThisSoftNode | , | |
| charp | ||||
| ) |
| RTAI_MODULE_PARM | ( | ThisNode | , | |
| charp | ||||
| ) |
| RTAI_MODULE_PARM | ( | StackSize | , | |
| int | ||||
| ) |
| RTAI_MODULE_PARM | ( | MaxSocks | , | |
| ulong | ||||
| ) |
| RTAI_MODULE_PARM | ( | MaxStubs | , | |
| ulong | ||||
| ) |
| static void send_thread | ( | void | ) | [static] |
Definition at line 1623 of file netrpc.c.
References ADRSZ, current, ksendto(), rtai_set_linux_task_priority(), socks, and sysrq.
Referenced by init_softrtnet().
Here is the call graph for this function:

| void set_netrpc_encoding | ( | void * | encode_fun, | |
| void * | decode_fun, | |||
| void * | ext | |||
| ) |
| int set_rtext | ( | RT_TASK * | , | |
| int | , | |||
| int | , | |||
| void(*)(void) | , | |||
| unsigned | int, | |||
| void * | ||||
| ) |
Referenced by __task_init(), lxrt_exit(), start_stop_kthread(), and thread_fun().
| static int soft_kthread_delete | ( | RT_TASK * | task | ) | [static] |
Definition at line 364 of file netrpc.c.
References clr_rtext(), current, NETRPC_TIMER_FREQ, RT_SCHED_READY, rt_task_masked_unblock(), and task.
Referenced by __rtai_netrpc_exit(), and gvb_stub().
Here is the call graph for this function:

| static int soft_kthread_init | ( | RT_TASK * | task, | |
| long | fun, | |||
| long | arg, | |||
| int | priority | |||
| ) | [static] |
Definition at line 348 of file netrpc.c.
References current, NETRPC_TIMER_FREQ, RT_SCHED_READY, RT_SCHED_SUSPENDED, task, and thread_fun().
Referenced by __rtai_netrpc_init(), and port_server_fun().
Here is the call graph for this function:

| int soft_rt_bind | ( | int | sock, | |
| struct sockaddr * | addr, | |||
| int | addrlen | |||
| ) |
| int soft_rt_close | ( | int | sock | ) |
Definition at line 1249 of file netrpc.c.
References MaxSocks, sock_t::opnd, and socks.
Referenced by __rtai_netrpc_exit().
| static int soft_rt_fun_call | ( | RT_TASK * | task, | |
| void * | fun, | |||
| void * | arg | |||
| ) | [inline, static] |
Definition at line 317 of file netrpc.c.
References rt_schedule_soft(), and task.
Referenced by port_server_fun(), soft_stub_fun(), and thread_fun().
Here is the call graph for this function:

| static long long soft_rt_genfun_call | ( | RT_TASK * | task, | |
| void * | fun, | |||
| void * | args, | |||
| int | argsize | |||
| ) | [inline, static] |
Definition at line 327 of file netrpc.c.
References rt_schedule_soft(), and task.
Referenced by soft_stub_fun().
Here is the call graph for this function:

| int soft_rt_recvfrom | ( | int | sock, | |
| void * | msg, | |||
| int | msglen, | |||
| unsigned int | flags, | |||
| struct sockaddr * | from, | |||
| long * | fromlen | |||
| ) |
Definition at line 1295 of file netrpc.c.
References sock_t::addrlen, MaxSocks, sock_t::recvd, and socks.
Referenced by _rt_net_rpc(), net_resume_task(), port_server_fun(), rt_send_req_rel_port(), and soft_stub_fun().
| int soft_rt_sendto | ( | int | sock, | |
| const void * | msg, | |||
| int | msglen, | |||
| unsigned int | sflags, | |||
| struct sockaddr * | to, | |||
| int | tolen | |||
| ) |
Definition at line 1276 of file netrpc.c.
References MAX_MSG_SIZE, MaxSocks, rt_pend_linux_srq(), rt_spin_lock_irqsave(), rt_spin_unlock_irqrestore, socks, and sysrq.
Referenced by _rt_net_rpc(), port_server_fun(), rt_send_req_rel_port(), and soft_stub_fun().
Here is the call graph for this function:

| int soft_rt_socket | ( | int | domain, | |
| int | type, | |||
| int | protocol | |||
| ) |
Definition at line 1238 of file netrpc.c.
References cmpxchg, MaxSocks, sock_t::opnd, and socks.
Referenced by __rtai_netrpc_init().
| int soft_rt_socket_callback | ( | int | sock, | |
| int(*)(int sock, void *arg) | func, | |||
| void * | arg | |||
| ) |
Definition at line 1262 of file netrpc.c.
References sock_t::arg, sock_t::callback, and socks.
Referenced by __rtai_netrpc_init().
| static void soft_stub_fun | ( | struct portslot_t * | portslotp | ) | [static] |
Definition at line 456 of file netrpc.c.
References portslot_t::addr, ADRSZ, argconv(), par_t::argsize, par_t::base_priority, BASEPORT, current, decode, encode, EXT, flags, FUN, par_t::fun_ext_timed, par_t::mach, MAX_MSG_SIZE, MaxStubsMone, reply_t::myport, nano2count(), NETRPC_ALIGN_RTIME, par_t::owner, portslot_t::owner, par_t::partypes, portslot, par_t::priority, portslot_t::recovered, recovery, recovery_lock, reply_t::retval, RPC_RTR, RPC_SRV, par_t::rsize, rt_net_rpc_fun_ext, RT_SCHED_LINUX_PRIORITY, rt_sem_signal(), rt_sem_wait(), rt_spin_lock_irqsave(), rt_spin_unlock_irqrestore, rtai_set_linux_task_priority(), RTE_LOWERR, portslot_t::sem, portslot_t::socket, soft_rt_fun_call(), soft_rt_genfun_call(), soft_rt_recvfrom(), soft_rt_sendto(), portslot_t::task, task, TIMED, and par_t::type.
Referenced by port_server_fun().
Here is the call graph for this function:

| static void softrtnet_hdl | ( | void | ) | [static] |
| static void thread_fun | ( | RT_TASK * | task | ) | [static] |
Definition at line 336 of file netrpc.c.
References current, get_min_tasks_cpuid(), rt_daemonize(), rt_task_suspend(), rtai_set_linux_task_priority(), set_rtext(), soft_rt_fun_call(), and task.
Referenced by soft_kthread_init().
Here is the call graph for this function:

| static void timer_fun | ( | unsigned long | none | ) | [static] |
Definition at line 190 of file netrpc.c.
References NETRPC_TIMER_FREQ, rt_sem_signal(), and timer_sem.
Referenced by __rtai_netrpc_init().
Here is the call graph for this function:

int(*) decode(struct portslot_t *portslotp, void *msg, int size, int where) [static] |
Definition at line 200 of file netrpc.c.
Referenced by _rt_net_rpc(), hard_stub_fun(), port_server_fun(), rt_send_req_rel_port(), set_netrpc_encoding(), and soft_stub_fun().
int(*) encode(struct portslot_t *portslotp, void *msg, int size, int where) [static] |
Definition at line 199 of file netrpc.c.
Referenced by _rt_net_rpc(), hard_stub_fun(), port_server_fun(), rt_send_req_rel_port(), set_netrpc_encoding(), and soft_stub_fun().
unsigned long end_softrtnet [static] |
| int errno |
Definition at line 1315 of file netrpc.c.
Referenced by __wrap_clock_getres(), __wrap_clock_gettime(), __wrap_clock_settime(), __wrap_sem_close(), __wrap_sem_destroy(), __wrap_sem_getvalue(), __wrap_sem_init(), __wrap_sem_open(), __wrap_sem_post(), __wrap_sem_timedwait(), __wrap_sem_trywait(), __wrap_sem_unlink(), __wrap_sem_wait(), __wrap_timer_create(), exec_conf(), mq_close(), mq_getattr(), mq_notify(), mq_open(), mq_receive(), mq_send(), mq_setattr(), mq_timedreceive(), mq_timedsend(), mq_unlink(), rtf_create_named(), rtf_evdrp(), rtf_getfifobyname(), rtf_named_create(), rtf_open_sized(), rtf_overwrite(), rtf_read_all_at_once(), rtf_read_if(), rtf_read_timed(), rtf_reset(), rtf_resize(), rtf_sem_destroy(), rtf_sem_init(), rtf_sem_post(), rtf_sem_timed_wait(), rtf_sem_trywait(), rtf_sem_wait(), rtf_set_async_sig(), rtf_suspend_timed(), rtf_write_if(), and rtf_write_timed().
unsigned long MaxSocks = MAX_SOCKS [static] |
Definition at line 86 of file netrpc.c.
Referenced by __rtai_netrpc_exit(), __rtai_netrpc_init(), cleanup_softrtnet(), get_portslot(), init_softrtnet(), recv_thread(), rt_send_req_rel_port(), soft_rt_close(), soft_rt_recvfrom(), soft_rt_sendto(), and soft_rt_socket().
int MaxSockSrq [static] |
unsigned long MaxStubs = MAX_STUBS [static] |
Definition at line 82 of file netrpc.c.
Referenced by __rtai_netrpc_exit(), __rtai_netrpc_init(), check_portslot(), gvb_portslot(), gvb_stub(), and net_resume_task().
int MaxStubsMone [static] |
Definition at line 84 of file netrpc.c.
Referenced by __rtai_netrpc_init(), get_stub(), hard_stub_fun(), net_resume_task(), port_server_fun(), and soft_stub_fun().
int mod_timer_srq [static] |
| struct recovery_msg* msg |
Definition at line 118 of file netrpc.c.
Referenced by krecvmsg(), ksendmsg(), port_server_fun(), rt_get_net_rpc_ret(), rt_send_req_rel_port(), rt_timer_tick_ext(), and text_insert_msg().
struct pollfd* pollv [static] |
Definition at line 1641 of file netrpc.c.
Referenced by cleanup_softrtnet(), init_softrtnet(), and recv_thread().
RT_TASK* port_server [static] |
Definition at line 1226 of file netrpc.c.
Referenced by __rtai_netrpc_init(), and port_server_fun().
struct portslot_t* portslot [static] |
Definition at line 115 of file netrpc.c.
Referenced by __rtai_netrpc_exit(), __rtai_netrpc_init(), _rt_net_rpc(), check_portslot(), find_stub(), get_portslot(), get_stub(), gvb_portslot(), gvb_stub(), hard_stub_fun(), net_resume_task(), port_server_fun(), rt_find_asgn_stub(), rt_send_req_rel_port(), rt_set_netrpc_timeout(), rt_waiting_return(), and soft_stub_fun().
spinlock_t portslot_lock = SPIN_LOCK_UNLOCKED [static] |
volatile int portslotsp [static] |
Definition at line 109 of file netrpc.c.
Referenced by __rtai_netrpc_init(), check_portslot(), get_portslot(), and gvb_portslot().
struct { ... } recovery [static] |
Referenced by __rtai_netrpc_init(), hard_stub_fun(), net_resume_task(), port_server_fun(), and soft_stub_fun().
spinlock_t recovery_lock = SPIN_LOCK_UNLOCKED [static] |
Definition at line 119 of file netrpc.c.
Referenced by hard_stub_fun(), net_resume_task(), and soft_stub_fun().
struct task_struct* recv_handle [static] |
struct rt_fun_entry* rt_net_rpc_fun_ext[MAX_DFUN_EXT] [static] |
Definition at line 102 of file netrpc.c.
Referenced by __rtai_netrpc_init(), hard_stub_fun(), rt_get_net_rpc_ret(), set_netrpc_encoding(), and soft_stub_fun().
| void** rt_net_rpc_fun_hook = (void *)rt_net_rpc_fun_ext |
| struct rt_native_fun_entry rt_netrpc_entries[] |
Initial value:
{
{ { 1, _rt_net_rpc }, NETRPC },
{ { 0, rt_set_netrpc_timeout }, SET_NETRPC_TIMEOUT },
{ { 1, rt_send_req_rel_port }, SEND_REQ_REL_PORT },
{ { 0, ddn2nl }, DDN2NL },
{ { 0, rt_set_this_node }, SET_THIS_NODE },
{ { 0, rt_find_asgn_stub }, FIND_ASGN_STUB },
{ { 0, rt_rel_stub }, REL_STUB },
{ { 0, rt_waiting_return }, WAITING_RETURN },
{ { 0, 0 }, 000 }
}
Definition at line 1236 of file netrpc.c.
Referenced by cleanup_softrtnet(), init_softrtnet(), recv_thread(), send_thread(), soft_rt_close(), soft_rt_recvfrom(), soft_rt_sendto(), soft_rt_socket(), and soft_rt_socket_callback().
struct sockaddr_in SPRT_ADDR [static] |
Definition at line 116 of file netrpc.c.
Referenced by __rtai_netrpc_init(), init_softrtnet(), and rt_send_req_rel_port().
int StackSize = NETRPC_STACK_SIZE [static] |
spinlock_t stub_lock = SPIN_LOCK_UNLOCKED [static] |
volatile int stubssp = 1 [static] |
| void* sys_call_table[] |
struct { ... } sysrq [static] |
Referenced by cleanup_softrtnet(), init_softrtnet(), send_thread(), and soft_rt_sendto().
spinlock_t sysrq_lock = SPIN_LOCK_UNLOCKED [static] |
unsigned long this_node[2] [static] |
Definition at line 104 of file netrpc.c.
Referenced by __rtai_netrpc_init(), port_server_fun(), rt_send_req_rel_port(), and rt_set_this_node().
char* ThisHardNode = 0 [static] |
char* ThisNode = LOCALHOST [static] |
char* ThisSoftNode = 0 [static] |
struct timer_list timer [static] |
Definition at line 187 of file netrpc.c.
Referenced by rt_get_timer_overrun(), rt_get_timer_times(), rt_insert_timer(), rt_remove_timer(), rt_set_timer_firing_time(), rt_set_timer_period(), rt_set_timer_priority(), and timer_fun().
Definition at line 188 of file netrpc.c.
Referenced by __rtai_netrpc_exit(), __rtai_netrpc_init(), rt_send_req_rel_port(), and timer_fun().
1.4.7