diff options
author | Christian Mauderer <christian.mauderer@embedded-brains.de> | 2012-04-26 15:47:49 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-04-26 16:06:42 +0200 |
commit | 9ee768907e0bf30a921e60d802a8e32db5ea5bee (patch) | |
tree | 732261e694c8fab20deec2044d3c913351b7d754 | |
parent | Added in uma_find_refcnt() and vtoslab() (diff) | |
download | rtems-libbsd-9ee768907e0bf30a921e60d802a8e32db5ea5bee.tar.bz2 |
Remove rusage dependencies
-rw-r--r-- | freebsd/kern/uipc_socket.c | 10 | ||||
-rw-r--r-- | freebsd/netinet/sctp_output.c | 2 | ||||
-rw-r--r-- | 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 535ec10a..a0ff9f53 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 b10e434c..9acd3288 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 a2bac703..9583ba31 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__ */ |