Track pipe(2) reads and writes as rusage message receives and sends, a
feature misplaced during the transition from BSD 4.4's socket implementation to the optimised FreeBSD pipe implementation. MFC after: 1 week Reviewed by: arichardson, imp Differential Revision: https://reviews.freebsd.org/D27878
This commit is contained in:
parent
3d65fd97e8
commit
4f2cbaf3cd
@ -857,6 +857,8 @@ unlocked_error:
|
||||
pipeselwakeup(rpipe);
|
||||
|
||||
PIPE_UNLOCK(rpipe);
|
||||
if (nread > 0)
|
||||
td->td_ru.ru_msgrcv++;
|
||||
return (error);
|
||||
}
|
||||
|
||||
@ -1314,6 +1316,8 @@ pipe_write(struct file *fp, struct uio *uio, struct ucred *active_cred,
|
||||
|
||||
pipeunlock(wpipe);
|
||||
PIPE_UNLOCK(rpipe);
|
||||
if (uio->uio_resid != orig_resid)
|
||||
td->td_ru.ru_msgsnd++;
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user