Provide typedef for socket upcall function.

While here change so_gen_t type to modern uint64_t.
This commit is contained in:
Gleb Smirnoff 2017-06-07 01:48:11 +00:00
parent b94f68dc52
commit b3244df799
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=319641
2 changed files with 5 additions and 6 deletions

View File

@ -3559,8 +3559,7 @@ sodupsockaddr(const struct sockaddr *sa, int mflags)
* Register per-socket buffer upcalls.
*/
void
soupcall_set(struct socket *so, int which,
int (*func)(struct socket *, void *, int), void *arg)
soupcall_set(struct socket *so, int which, so_upcall_t func, void *arg)
{
struct sockbuf *sb;

View File

@ -55,7 +55,8 @@ struct vnet;
* handle on protocol and pointer to protocol
* private data and error information.
*/
typedef u_quad_t so_gen_t;
typedef uint64_t so_gen_t;
typedef int so_upcall_t(struct socket *, void *, int);
struct socket;
@ -400,9 +401,8 @@ int sosend_generic(struct socket *so, struct sockaddr *addr,
int flags, struct thread *td);
int soshutdown(struct socket *so, int how);
void sotoxsocket(struct socket *so, struct xsocket *xso);
void soupcall_clear(struct socket *so, int which);
void soupcall_set(struct socket *so, int which,
int (*func)(struct socket *, void *, int), void *arg);
void soupcall_clear(struct socket *, int);
void soupcall_set(struct socket *, int, so_upcall_t, void *);
void sowakeup(struct socket *so, struct sockbuf *sb);
void sowakeup_aio(struct socket *so, struct sockbuf *sb);
int selsocket(struct socket *so, int events, struct timeval *tv,