move to 1.6-beta
This commit is contained in:
parent
45c7370e13
commit
509ad7f110
81 changed files with 886 additions and 439 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: kern_event.c,v 1.199 2024/07/29 12:42:53 claudio Exp $ */
|
||||
/* $OpenBSD: kern_event.c,v 1.200 2024/08/06 08:44:54 claudio Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
|
||||
|
@ -124,6 +124,8 @@ int filt_kqueue_common(struct knote *kn, struct kqueue *kq);
|
|||
int filt_procattach(struct knote *kn);
|
||||
void filt_procdetach(struct knote *kn);
|
||||
int filt_proc(struct knote *kn, long hint);
|
||||
int filt_procmodify(struct kevent *kev, struct knote *kn);
|
||||
int filt_procprocess(struct knote *kn, struct kevent *kev);
|
||||
int filt_sigattach(struct knote *kn);
|
||||
void filt_sigdetach(struct knote *kn);
|
||||
int filt_signal(struct knote *kn, long hint);
|
||||
|
@ -145,17 +147,21 @@ const struct filterops kqread_filtops = {
|
|||
};
|
||||
|
||||
const struct filterops proc_filtops = {
|
||||
.f_flags = 0,
|
||||
.f_flags = FILTEROP_MPSAFE,
|
||||
.f_attach = filt_procattach,
|
||||
.f_detach = filt_procdetach,
|
||||
.f_event = filt_proc,
|
||||
.f_modify = filt_procmodify,
|
||||
.f_process = filt_procprocess,
|
||||
};
|
||||
|
||||
const struct filterops sig_filtops = {
|
||||
.f_flags = 0,
|
||||
.f_flags = FILTEROP_MPSAFE,
|
||||
.f_attach = filt_sigattach,
|
||||
.f_detach = filt_sigdetach,
|
||||
.f_event = filt_signal,
|
||||
.f_modify = filt_procmodify,
|
||||
.f_process = filt_procprocess,
|
||||
};
|
||||
|
||||
const struct filterops file_filtops = {
|
||||
|
@ -177,6 +183,7 @@ const struct filterops timer_filtops = {
|
|||
struct pool knote_pool;
|
||||
struct pool kqueue_pool;
|
||||
struct mutex kqueue_klist_lock = MUTEX_INITIALIZER(IPL_MPFLOOR);
|
||||
struct rwlock kqueue_ps_list_lock = RWLOCK_INITIALIZER("kqpsl");
|
||||
int kq_ntimeouts = 0;
|
||||
int kq_timeoutmax = (4 * 1024);
|
||||
|
||||
|
@ -333,7 +340,7 @@ int
|
|||
filt_procattach(struct knote *kn)
|
||||
{
|
||||
struct process *pr;
|
||||
int s;
|
||||
int nolock;
|
||||
|
||||
if ((curproc->p_p->ps_flags & PS_PLEDGE) &&
|
||||
(curproc->p_p->ps_pledge & PLEDGE_PROC) == 0)
|
||||
|
@ -342,13 +349,14 @@ filt_procattach(struct knote *kn)
|
|||
if (kn->kn_id > PID_MAX)
|
||||
return ESRCH;
|
||||
|
||||
KERNEL_LOCK();
|
||||
pr = prfind(kn->kn_id);
|
||||
if (pr == NULL)
|
||||
return (ESRCH);
|
||||
goto fail;
|
||||
|
||||
/* exiting processes can't be specified */
|
||||
if (pr->ps_flags & PS_EXITING)
|
||||
return (ESRCH);
|
||||
goto fail;
|
||||
|
||||
kn->kn_ptr.p_process = pr;
|
||||
kn->kn_flags |= EV_CLEAR; /* automatically set */
|
||||
|
@ -360,13 +368,26 @@ filt_procattach(struct knote *kn)
|
|||
kn->kn_data = kn->kn_sdata; /* ppid */
|
||||
kn->kn_fflags = NOTE_CHILD;
|
||||
kn->kn_flags &= ~EV_FLAG1;
|
||||
rw_assert_wrlock(&kqueue_ps_list_lock);
|
||||
}
|
||||
|
||||
s = splhigh();
|
||||
/* this needs both the ps_mtx and exclusive kqueue_ps_list_lock. */
|
||||
nolock = (rw_status(&kqueue_ps_list_lock) == RW_WRITE);
|
||||
if (!nolock)
|
||||
rw_enter_write(&kqueue_ps_list_lock);
|
||||
mtx_enter(&pr->ps_mtx);
|
||||
klist_insert_locked(&pr->ps_klist, kn);
|
||||
splx(s);
|
||||
mtx_leave(&pr->ps_mtx);
|
||||
if (!nolock)
|
||||
rw_exit_write(&kqueue_ps_list_lock);
|
||||
|
||||
KERNEL_UNLOCK();
|
||||
|
||||
return (0);
|
||||
|
||||
fail:
|
||||
KERNEL_UNLOCK();
|
||||
return (ESRCH);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -380,25 +401,25 @@ filt_procattach(struct knote *kn)
|
|||
void
|
||||
filt_procdetach(struct knote *kn)
|
||||
{
|
||||
struct kqueue *kq = kn->kn_kq;
|
||||
struct process *pr = kn->kn_ptr.p_process;
|
||||
int s, status;
|
||||
int status;
|
||||
|
||||
mtx_enter(&kq->kq_lock);
|
||||
/* this needs both the ps_mtx and exclusive kqueue_ps_list_lock. */
|
||||
rw_enter_write(&kqueue_ps_list_lock);
|
||||
mtx_enter(&pr->ps_mtx);
|
||||
status = kn->kn_status;
|
||||
mtx_leave(&kq->kq_lock);
|
||||
|
||||
if (status & KN_DETACHED)
|
||||
return;
|
||||
if ((status & KN_DETACHED) == 0)
|
||||
klist_remove_locked(&pr->ps_klist, kn);
|
||||
|
||||
s = splhigh();
|
||||
klist_remove_locked(&pr->ps_klist, kn);
|
||||
splx(s);
|
||||
mtx_leave(&pr->ps_mtx);
|
||||
rw_exit_write(&kqueue_ps_list_lock);
|
||||
}
|
||||
|
||||
int
|
||||
filt_proc(struct knote *kn, long hint)
|
||||
{
|
||||
struct process *pr = kn->kn_ptr.p_process;
|
||||
struct kqueue *kq = kn->kn_kq;
|
||||
u_int event;
|
||||
|
||||
|
@ -419,17 +440,14 @@ filt_proc(struct knote *kn, long hint)
|
|||
*/
|
||||
if (event == NOTE_EXIT) {
|
||||
struct process *pr = kn->kn_ptr.p_process;
|
||||
int s;
|
||||
|
||||
mtx_enter(&kq->kq_lock);
|
||||
kn->kn_status |= KN_DETACHED;
|
||||
mtx_leave(&kq->kq_lock);
|
||||
|
||||
s = splhigh();
|
||||
kn->kn_flags |= (EV_EOF | EV_ONESHOT);
|
||||
kn->kn_data = W_EXITCODE(pr->ps_xexit, pr->ps_xsig);
|
||||
klist_remove_locked(&pr->ps_klist, kn);
|
||||
splx(s);
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
@ -452,7 +470,12 @@ filt_proc(struct knote *kn, long hint)
|
|||
kev.fflags = kn->kn_sfflags;
|
||||
kev.data = kn->kn_id; /* parent */
|
||||
kev.udata = kn->kn_udata; /* preserve udata */
|
||||
|
||||
rw_assert_wrlock(&kqueue_ps_list_lock);
|
||||
mtx_leave(&pr->ps_mtx);
|
||||
error = kqueue_register(kq, &kev, 0, NULL);
|
||||
mtx_enter(&pr->ps_mtx);
|
||||
|
||||
if (error)
|
||||
kn->kn_fflags |= NOTE_TRACKERR;
|
||||
}
|
||||
|
@ -460,6 +483,37 @@ filt_proc(struct knote *kn, long hint)
|
|||
return (kn->kn_fflags != 0);
|
||||
}
|
||||
|
||||
int
|
||||
filt_procmodify(struct kevent *kev, struct knote *kn)
|
||||
{
|
||||
struct process *pr = kn->kn_ptr.p_process;
|
||||
int active;
|
||||
|
||||
mtx_enter(&pr->ps_mtx);
|
||||
active = knote_modify(kev, kn);
|
||||
mtx_leave(&pr->ps_mtx);
|
||||
|
||||
return (active);
|
||||
}
|
||||
|
||||
/*
|
||||
* By default only grab the mutex here. If the event requires extra protection
|
||||
* because it alters the klist (NOTE_EXIT, NOTE_FORK the caller of the knote
|
||||
* needs to grab the rwlock first.
|
||||
*/
|
||||
int
|
||||
filt_procprocess(struct knote *kn, struct kevent *kev)
|
||||
{
|
||||
struct process *pr = kn->kn_ptr.p_process;
|
||||
int active;
|
||||
|
||||
mtx_enter(&pr->ps_mtx);
|
||||
active = knote_process(kn, kev);
|
||||
mtx_leave(&pr->ps_mtx);
|
||||
|
||||
return (active);
|
||||
}
|
||||
|
||||
/*
|
||||
* signal knotes are shared with proc knotes, so we apply a mask to
|
||||
* the hint in order to differentiate them from process hints. This
|
||||
|
@ -470,7 +524,6 @@ int
|
|||
filt_sigattach(struct knote *kn)
|
||||
{
|
||||
struct process *pr = curproc->p_p;
|
||||
int s;
|
||||
|
||||
if (kn->kn_id >= NSIG)
|
||||
return EINVAL;
|
||||
|
@ -478,9 +531,12 @@ filt_sigattach(struct knote *kn)
|
|||
kn->kn_ptr.p_process = pr;
|
||||
kn->kn_flags |= EV_CLEAR; /* automatically set */
|
||||
|
||||
s = splhigh();
|
||||
/* this needs both the ps_mtx and exclusive kqueue_ps_list_lock. */
|
||||
rw_enter_write(&kqueue_ps_list_lock);
|
||||
mtx_enter(&pr->ps_mtx);
|
||||
klist_insert_locked(&pr->ps_klist, kn);
|
||||
splx(s);
|
||||
mtx_leave(&pr->ps_mtx);
|
||||
rw_exit_write(&kqueue_ps_list_lock);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
@ -489,17 +545,17 @@ void
|
|||
filt_sigdetach(struct knote *kn)
|
||||
{
|
||||
struct process *pr = kn->kn_ptr.p_process;
|
||||
int s;
|
||||
|
||||
s = splhigh();
|
||||
rw_enter_write(&kqueue_ps_list_lock);
|
||||
mtx_enter(&pr->ps_mtx);
|
||||
klist_remove_locked(&pr->ps_klist, kn);
|
||||
splx(s);
|
||||
mtx_leave(&pr->ps_mtx);
|
||||
rw_exit_write(&kqueue_ps_list_lock);
|
||||
}
|
||||
|
||||
int
|
||||
filt_signal(struct knote *kn, long hint)
|
||||
{
|
||||
|
||||
if (hint & NOTE_SIGNAL) {
|
||||
hint &= ~NOTE_SIGNAL;
|
||||
|
||||
|
@ -2002,14 +2058,28 @@ knote_fdclose(struct proc *p, int fd)
|
|||
void
|
||||
knote_processexit(struct process *pr)
|
||||
{
|
||||
KERNEL_ASSERT_LOCKED();
|
||||
|
||||
/* this needs both the ps_mtx and exclusive kqueue_ps_list_lock. */
|
||||
rw_enter_write(&kqueue_ps_list_lock);
|
||||
mtx_enter(&pr->ps_mtx);
|
||||
knote_locked(&pr->ps_klist, NOTE_EXIT);
|
||||
mtx_leave(&pr->ps_mtx);
|
||||
rw_exit_write(&kqueue_ps_list_lock);
|
||||
|
||||
/* remove other knotes hanging off the process */
|
||||
klist_invalidate(&pr->ps_klist);
|
||||
}
|
||||
|
||||
void
|
||||
knote_processfork(struct process *pr, pid_t pid)
|
||||
{
|
||||
/* this needs both the ps_mtx and exclusive kqueue_ps_list_lock. */
|
||||
rw_enter_write(&kqueue_ps_list_lock);
|
||||
mtx_enter(&pr->ps_mtx);
|
||||
knote_locked(&pr->ps_klist, NOTE_FORK | pid);
|
||||
mtx_leave(&pr->ps_mtx);
|
||||
rw_exit_write(&kqueue_ps_list_lock);
|
||||
}
|
||||
|
||||
void
|
||||
knote_attach(struct knote *kn)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: kern_exec.c,v 1.256 2024/07/08 13:17:12 claudio Exp $ */
|
||||
/* $OpenBSD: kern_exec.c,v 1.257 2024/08/06 08:44:54 claudio Exp $ */
|
||||
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
|
||||
|
||||
/*-
|
||||
|
@ -711,7 +711,7 @@ sys_execve(struct proc *p, void *v, register_t *retval)
|
|||
/*
|
||||
* notify others that we exec'd
|
||||
*/
|
||||
knote_locked(&pr->ps_klist, NOTE_EXEC);
|
||||
knote(&pr->ps_klist, NOTE_EXEC);
|
||||
|
||||
/* map the process's timekeep page, needs to be before exec_elf_fixup */
|
||||
if (exec_timekeep_map(pr))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: kern_exit.c,v 1.228 2024/07/29 09:49:49 claudio Exp $ */
|
||||
/* $OpenBSD: kern_exit.c,v 1.230 2024/08/06 18:41:20 claudio Exp $ */
|
||||
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: kern_fork.c,v 1.260 2024/06/03 12:48:25 claudio Exp $ */
|
||||
/* $OpenBSD: kern_fork.c,v 1.261 2024/08/06 08:44:54 claudio Exp $ */
|
||||
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -199,6 +199,7 @@ process_initialize(struct process *pr, struct proc *p)
|
|||
|
||||
rw_init(&pr->ps_lock, "pslock");
|
||||
mtx_init(&pr->ps_mtx, IPL_HIGH);
|
||||
klist_init_mutex(&pr->ps_klist, &pr->ps_mtx);
|
||||
|
||||
timeout_set_flags(&pr->ps_realit_to, realitexpire, pr,
|
||||
KCLOCK_UPTIME, 0);
|
||||
|
@ -484,7 +485,7 @@ fork1(struct proc *curp, int flags, void (*func)(void *), void *arg,
|
|||
/*
|
||||
* Notify any interested parties about the new process.
|
||||
*/
|
||||
knote_locked(&curpr->ps_klist, NOTE_FORK | pr->ps_pid);
|
||||
knote_processfork(curpr, pr->ps_pid);
|
||||
|
||||
/*
|
||||
* Update stats now that we know the fork was successful.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: kern_sig.c,v 1.336 2024/07/29 12:42:53 claudio Exp $ */
|
||||
/* $OpenBSD: kern_sig.c,v 1.337 2024/08/06 08:44:54 claudio Exp $ */
|
||||
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -985,7 +985,7 @@ ptsignal(struct proc *p, int signum, enum signal_type type)
|
|||
}
|
||||
|
||||
if (type != SPROPAGATED)
|
||||
knote_locked(&pr->ps_klist, NOTE_SIGNAL | signum);
|
||||
knote(&pr->ps_klist, NOTE_SIGNAL | signum);
|
||||
|
||||
prop = sigprop[signum];
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: kern_sysctl.c,v 1.433 2024/08/05 18:47:29 mvs Exp $ */
|
||||
/* $OpenBSD: kern_sysctl.c,v 1.436 2024/08/08 15:02:36 bluhm Exp $ */
|
||||
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
|
@ -507,6 +507,8 @@ kern_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
|
|||
return (sysctl_rdstring(oldp, oldlenp, newp, version));
|
||||
case KERN_NUMVNODES: /* XXX numvnodes is a long */
|
||||
return (sysctl_rdint(oldp, oldlenp, newp, numvnodes));
|
||||
case KERN_CLOCKRATE:
|
||||
return (sysctl_clockrate(oldp, oldlenp, newp));
|
||||
case KERN_BOOTTIME: {
|
||||
struct timeval bt;
|
||||
memset(&bt, 0, sizeof bt);
|
||||
|
@ -531,6 +533,18 @@ kern_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
|
|||
return (sysctl_rdstruct(oldp, oldlenp, newp,
|
||||
&mbs, sizeof(mbs)));
|
||||
}
|
||||
case KERN_MSGBUFSIZE:
|
||||
case KERN_CONSBUFSIZE: {
|
||||
struct msgbuf *mp;
|
||||
mp = (name[0] == KERN_MSGBUFSIZE) ? msgbufp : consbufp;
|
||||
/*
|
||||
* deal with cases where the message buffer has
|
||||
* become corrupted.
|
||||
*/
|
||||
if (!mp || mp->msg_magic != MSG_MAGIC)
|
||||
return (ENXIO);
|
||||
return (sysctl_rdint(oldp, oldlenp, newp, mp->msg_bufs));
|
||||
}
|
||||
case KERN_OSREV:
|
||||
case KERN_NFILES:
|
||||
case KERN_TTYCOUNT:
|
||||
|
@ -614,20 +628,6 @@ kern_sysctl_locked(int *name, u_int namelen, void *oldp, size_t *oldlenp,
|
|||
error = sysctl_int(oldp, oldlenp, newp, newlen, &inthostid);
|
||||
hostid = inthostid;
|
||||
return (error);
|
||||
case KERN_CLOCKRATE:
|
||||
return (sysctl_clockrate(oldp, oldlenp, newp));
|
||||
case KERN_MSGBUFSIZE:
|
||||
case KERN_CONSBUFSIZE: {
|
||||
struct msgbuf *mp;
|
||||
mp = (name[0] == KERN_MSGBUFSIZE) ? msgbufp : consbufp;
|
||||
/*
|
||||
* deal with cases where the message buffer has
|
||||
* become corrupted.
|
||||
*/
|
||||
if (!mp || mp->msg_magic != MSG_MAGIC)
|
||||
return (ENXIO);
|
||||
return (sysctl_rdint(oldp, oldlenp, newp, mp->msg_bufs));
|
||||
}
|
||||
case KERN_CONSBUF:
|
||||
if ((error = suser(p)))
|
||||
return (error);
|
||||
|
@ -635,7 +635,10 @@ kern_sysctl_locked(int *name, u_int namelen, void *oldp, size_t *oldlenp,
|
|||
case KERN_MSGBUF: {
|
||||
struct msgbuf *mp;
|
||||
mp = (name[0] == KERN_MSGBUF) ? msgbufp : consbufp;
|
||||
/* see note above */
|
||||
/*
|
||||
* deal with cases where the message buffer has
|
||||
* become corrupted.
|
||||
*/
|
||||
if (!mp || mp->msg_magic != MSG_MAGIC)
|
||||
return (ENXIO);
|
||||
return (sysctl_rdstruct(oldp, oldlenp, newp, mp,
|
||||
|
@ -1679,7 +1682,7 @@ sysctl_file(int *name, u_int namelen, char *where, size_t *sizep,
|
|||
*/
|
||||
if (pr->ps_flags & (PS_SYSTEM | PS_EMBRYO | PS_EXITING))
|
||||
continue;
|
||||
if (arg > 0 && pr->ps_pid != (pid_t)arg) {
|
||||
if (arg >= 0 && pr->ps_pid != (pid_t)arg) {
|
||||
/* not the pid we are looking for */
|
||||
continue;
|
||||
}
|
||||
|
@ -1699,6 +1702,9 @@ sysctl_file(int *name, u_int namelen, char *where, size_t *sizep,
|
|||
FILLIT(fp, fdp, i, NULL, pr);
|
||||
FRELE(fp, p);
|
||||
}
|
||||
/* pid is unique, stop searching */
|
||||
if (arg >= 0)
|
||||
break;
|
||||
}
|
||||
if (!matched)
|
||||
error = ESRCH;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: uipc_socket.c,v 1.341 2024/08/01 17:19:01 bluhm Exp $ */
|
||||
/* $OpenBSD: uipc_socket.c,v 1.342 2024/08/06 20:14:56 mvs Exp $ */
|
||||
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -234,8 +234,8 @@ sobind(struct socket *so, struct mbuf *nam, struct proc *p)
|
|||
int
|
||||
solisten(struct socket *so, int backlog)
|
||||
{
|
||||
int somaxconn_local = READ_ONCE(somaxconn);
|
||||
int sominconn_local = READ_ONCE(sominconn);
|
||||
int somaxconn_local = atomic_load_int(&somaxconn);
|
||||
int sominconn_local = atomic_load_int(&sominconn);
|
||||
int error;
|
||||
|
||||
switch (so->so_type) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: uipc_usrreq.c,v 1.208 2024/06/28 21:30:24 mvs Exp $ */
|
||||
/* $OpenBSD: uipc_usrreq.c,v 1.209 2024/08/06 20:13:58 mvs Exp $ */
|
||||
/* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -235,12 +235,12 @@ uipc_setaddr(const struct unpcb *unp, struct mbuf *nam)
|
|||
* be large enough for at least one max-size datagram plus address.
|
||||
*/
|
||||
#define PIPSIZ 8192
|
||||
u_int unpst_sendspace = PIPSIZ;
|
||||
u_int unpst_recvspace = PIPSIZ;
|
||||
u_int unpsq_sendspace = PIPSIZ;
|
||||
u_int unpsq_recvspace = PIPSIZ;
|
||||
u_int unpdg_sendspace = 2*1024; /* really max datagram size */
|
||||
u_int unpdg_recvspace = 16*1024;
|
||||
u_int unpst_sendspace = PIPSIZ; /* [a] */
|
||||
u_int unpst_recvspace = PIPSIZ; /* [a] */
|
||||
u_int unpsq_sendspace = PIPSIZ; /* [a] */
|
||||
u_int unpsq_recvspace = PIPSIZ; /* [a] */
|
||||
u_int unpdg_sendspace = 2*1024; /* [a] really max datagram size */
|
||||
u_int unpdg_recvspace = 16*1024; /* [a] */
|
||||
|
||||
const struct sysctl_bounded_args unpstctl_vars[] = {
|
||||
{ UNPCTL_RECVSPACE, &unpst_recvspace, 0, SB_MAX },
|
||||
|
@ -267,15 +267,21 @@ uipc_attach(struct socket *so, int proto, int wait)
|
|||
switch (so->so_type) {
|
||||
|
||||
case SOCK_STREAM:
|
||||
error = soreserve(so, unpst_sendspace, unpst_recvspace);
|
||||
error = soreserve(so,
|
||||
atomic_load_int(&unpst_sendspace),
|
||||
atomic_load_int(&unpst_recvspace));
|
||||
break;
|
||||
|
||||
case SOCK_SEQPACKET:
|
||||
error = soreserve(so, unpsq_sendspace, unpsq_recvspace);
|
||||
error = soreserve(so,
|
||||
atomic_load_int(&unpsq_sendspace),
|
||||
atomic_load_int(&unpsq_recvspace));
|
||||
break;
|
||||
|
||||
case SOCK_DGRAM:
|
||||
error = soreserve(so, unpdg_sendspace, unpdg_recvspace);
|
||||
error = soreserve(so,
|
||||
atomic_load_int(&unpdg_sendspace),
|
||||
atomic_load_int(&unpdg_recvspace));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue