mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
tipc: eliminate upcall function pointers between port and socket
Due to the original one-to-many relation between port and user API layers, upcalls to the API have been performed via function pointers, installed in struct tipc_port at creation. Since this relation now always is one-to-one, we can instead use ordinary function calls. We remove the function pointers 'dispatcher' and ´wakeup' from struct tipc_port, and replace them with calls to the renamed functions tipc_sk_rcv() and tipc_sk_wakeup(). At the same time we change the name and signature of the functions tipc_createport() and tipc_deleteport() to reflect their new role as mere initialization/destruction functions. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8826cde655
commit
24be34b5a0
5 changed files with 36 additions and 60 deletions
|
@ -67,4 +67,11 @@ static inline struct sock *tipc_port_to_sk(const struct tipc_port *port)
|
|||
return &(container_of(port, struct tipc_sock, port))->sk;
|
||||
}
|
||||
|
||||
static inline void tipc_sk_wakeup(struct sock *sk)
|
||||
{
|
||||
sk->sk_write_space(sk);
|
||||
}
|
||||
|
||||
u32 tipc_sk_rcv(struct sock *sk, struct sk_buff *buf);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue