[rtems-libbsd commit] Remove rusage dependencies
Sebastian Huber
sebh at rtems.org
Thu Apr 26 14:06:58 UTC 2012
Module: rtems-libbsd
Branch: master
Commit: 9ee768907e0bf30a921e60d802a8e32db5ea5bee
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=9ee768907e0bf30a921e60d802a8e32db5ea5bee
Author: Christian Mauderer <christian.mauderer at embedded-brains.de>
Date: Thu Apr 26 15:47:49 2012 +0200
Remove rusage dependencies
---
freebsd/kern/uipc_socket.c | 10 ++++++++++
freebsd/netinet/sctp_output.c | 2 ++
freebsd/sys/proc.h | 1 -
3 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/freebsd/kern/uipc_socket.c b/freebsd/kern/uipc_socket.c
index 535ec10..a0ff9f5 100644
--- a/freebsd/kern/uipc_socket.c
+++ b/freebsd/kern/uipc_socket.c
@@ -975,8 +975,10 @@ sosend_dgram(struct socket *so, struct sockaddr *addr, struct uio *uio,
dontroute =
(flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0;
+#ifndef __rtems__
if (td != NULL)
td->td_ru.ru_msgsnd++;
+#endif /* __rtems__ */
if (control != NULL)
clen = control->m_len;
@@ -1144,8 +1146,10 @@ sosend_generic(struct socket *so, struct sockaddr *addr, struct uio *uio,
dontroute =
(flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0 &&
(so->so_proto->pr_flags & PR_ATOMIC);
+#ifndef __rtems__
if (td != NULL)
td->td_ru.ru_msgsnd++;
+#endif /* __rtems__ */
if (control != NULL)
clen = control->m_len;
@@ -1525,8 +1529,10 @@ dontblock:
* readers from pulling off the front of the socket buffer.
*/
SOCKBUF_LOCK_ASSERT(&so->so_rcv);
+#ifndef __rtems__
if (uio->uio_td)
uio->uio_td->td_ru.ru_msgrcv++;
+#endif /* __rtems__ */
KASSERT(m == so->so_rcv.sb_mb, ("soreceive: m != so->so_rcv.sb_mb"));
SBLASTRECORDCHK(&so->so_rcv);
SBLASTMBUFCHK(&so->so_rcv);
@@ -1973,8 +1979,10 @@ deliver:
KASSERT(sb->sb_mb != NULL, ("%s: sb_mb == NULL", __func__));
/* Statistics. */
+#ifndef __rtems__
if (uio->uio_td)
uio->uio_td->td_ru.ru_msgrcv++;
+#endif /* __rtems__ */
/* Fill uio until full or current end of socket buffer is reached. */
len = min(uio->uio_resid, sb->sb_cc);
@@ -2134,8 +2142,10 @@ soreceive_dgram(struct socket *so, struct sockaddr **psa, struct uio *uio,
}
SOCKBUF_LOCK_ASSERT(&so->so_rcv);
+#ifndef __rtems__
if (uio->uio_td)
uio->uio_td->td_ru.ru_msgrcv++;
+#endif /* __rtems__ */
SBLASTRECORDCHK(&so->so_rcv);
SBLASTMBUFCHK(&so->so_rcv);
nextrecord = m->m_nextpkt;
diff --git a/freebsd/netinet/sctp_output.c b/freebsd/netinet/sctp_output.c
index b10e434..9acd328 100644
--- a/freebsd/netinet/sctp_output.c
+++ b/freebsd/netinet/sctp_output.c
@@ -12580,10 +12580,12 @@ sctp_lower_sosend(struct socket *so,
goto out_unlocked;
}
}
+#ifndef __rtems__
/* Ok, we will attempt a msgsnd :> */
if (p) {
p->td_ru.ru_msgsnd++;
}
+#endif /* __rtems__ */
/* Are we aborting? */
if (srcv->sinfo_flags & SCTP_ABORT) {
struct mbuf *mm;
diff --git a/freebsd/sys/proc.h b/freebsd/sys/proc.h
index a2bac70..9583ba3 100644
--- a/freebsd/sys/proc.h
+++ b/freebsd/sys/proc.h
@@ -312,7 +312,6 @@ struct thread {
char td_name [16];
struct proc *td_proc; /* (*) Associated process. */
struct ucred *td_ucred; /* (k) Reference to credentials. */
- struct rusage td_ru; /* (t) rusage information. */
register_t td_retval[2]; /* (k) Syscall aux returns. */
void *td_wchan; /* (t) Sleep address. */
#endif /* __rtems__ */
More information about the vc
mailing list