}
goto retry_space;
}
- error = so_pru_send(so, 0, m, NULL, NULL, td);
+ error = so_pru_senda(so, 0, m, NULL, NULL, td);
crit_exit();
if (error) {
ssb_unlock(&so->so_snd);
}
if (mheader != NULL) {
*sbytes += mheader->m_pkthdr.len;
- error = so_pru_send(so, 0, mheader, NULL, NULL, td);
+ error = so_pru_senda(so, 0, mheader, NULL, NULL, td);
mheader = NULL;
}
ssb_unlock(&so->so_snd);
void so_pru_ctlinput(struct protosw *pr, int cmd,
struct sockaddr *arg, void *extra);
+static __inline int
+so_pru_senda(struct socket *so, int flags, struct mbuf *m,
+ struct sockaddr *addr, struct mbuf *control, struct thread *td)
+{
+ if (so->so_proto->pr_flags & PR_ASYNC_SEND) {
+ so_pru_send_async(so, flags, m, addr, control, td);
+ return 0;
+ } else {
+ return so_pru_send(so, flags, m, addr, control, td);
+ }
+}
+
#endif /* _KERNEL */
#endif /* _SYS_SOCKETOPS_H_ */