socket: De-duplicate SBLOCKWAIT() definitions

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Mark Johnston 2021-09-14 09:01:32 -04:00
parent fd860ace3b
commit fa0463c384
4 changed files with 2 additions and 5 deletions

View file

@ -627,7 +627,6 @@ hvs_trans_disconnect(struct socket *so)
return (0);
}
#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? 0 : SBL_WAIT)
struct hvs_callback_arg {
struct uio *uio;
struct sockbuf *sb;

View file

@ -1413,8 +1413,6 @@ sodisconnect(struct socket *so)
return (error);
}
#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? 0 : SBL_WAIT)
int
sosend_dgram(struct socket *so, struct sockaddr *addr, struct uio *uio,
struct mbuf *top, struct mbuf *control, int flags, struct thread *td)

View file

@ -1047,8 +1047,6 @@ out:
return (error);
}
#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? 0 : SBL_WAIT)
/*
* Send on a socket. If send must go all at once and message is larger than
* send buffering, then hard error. Lock against other senders. If must go

View file

@ -292,6 +292,8 @@ struct socket {
#define SBL_NOINTR 0x00000002 /* Force non-interruptible sleep. */
#define SBL_VALID (SBL_WAIT | SBL_NOINTR)
#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? 0 : SBL_WAIT)
#define SOCK_IO_SEND_LOCK(so, flags) \
soiolock((so), &(so)->so_snd_sx, (flags))
#define SOCK_IO_SEND_UNLOCK(so) \