mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-15 04:59:27 +08:00
Remove rusage dependencies
This commit is contained in:

committed by
Sebastian Huber

parent
cb6ffcd6cf
commit
9ee768907e
@@ -975,8 +975,10 @@ sosend_dgram(struct socket *so, struct sockaddr *addr, struct uio *uio,
|
|||||||
|
|
||||||
dontroute =
|
dontroute =
|
||||||
(flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0;
|
(flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0;
|
||||||
|
#ifndef __rtems__
|
||||||
if (td != NULL)
|
if (td != NULL)
|
||||||
td->td_ru.ru_msgsnd++;
|
td->td_ru.ru_msgsnd++;
|
||||||
|
#endif /* __rtems__ */
|
||||||
if (control != NULL)
|
if (control != NULL)
|
||||||
clen = control->m_len;
|
clen = control->m_len;
|
||||||
|
|
||||||
@@ -1144,8 +1146,10 @@ sosend_generic(struct socket *so, struct sockaddr *addr, struct uio *uio,
|
|||||||
dontroute =
|
dontroute =
|
||||||
(flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0 &&
|
(flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0 &&
|
||||||
(so->so_proto->pr_flags & PR_ATOMIC);
|
(so->so_proto->pr_flags & PR_ATOMIC);
|
||||||
|
#ifndef __rtems__
|
||||||
if (td != NULL)
|
if (td != NULL)
|
||||||
td->td_ru.ru_msgsnd++;
|
td->td_ru.ru_msgsnd++;
|
||||||
|
#endif /* __rtems__ */
|
||||||
if (control != NULL)
|
if (control != NULL)
|
||||||
clen = control->m_len;
|
clen = control->m_len;
|
||||||
|
|
||||||
@@ -1525,8 +1529,10 @@ dontblock:
|
|||||||
* readers from pulling off the front of the socket buffer.
|
* readers from pulling off the front of the socket buffer.
|
||||||
*/
|
*/
|
||||||
SOCKBUF_LOCK_ASSERT(&so->so_rcv);
|
SOCKBUF_LOCK_ASSERT(&so->so_rcv);
|
||||||
|
#ifndef __rtems__
|
||||||
if (uio->uio_td)
|
if (uio->uio_td)
|
||||||
uio->uio_td->td_ru.ru_msgrcv++;
|
uio->uio_td->td_ru.ru_msgrcv++;
|
||||||
|
#endif /* __rtems__ */
|
||||||
KASSERT(m == so->so_rcv.sb_mb, ("soreceive: m != so->so_rcv.sb_mb"));
|
KASSERT(m == so->so_rcv.sb_mb, ("soreceive: m != so->so_rcv.sb_mb"));
|
||||||
SBLASTRECORDCHK(&so->so_rcv);
|
SBLASTRECORDCHK(&so->so_rcv);
|
||||||
SBLASTMBUFCHK(&so->so_rcv);
|
SBLASTMBUFCHK(&so->so_rcv);
|
||||||
@@ -1973,8 +1979,10 @@ deliver:
|
|||||||
KASSERT(sb->sb_mb != NULL, ("%s: sb_mb == NULL", __func__));
|
KASSERT(sb->sb_mb != NULL, ("%s: sb_mb == NULL", __func__));
|
||||||
|
|
||||||
/* Statistics. */
|
/* Statistics. */
|
||||||
|
#ifndef __rtems__
|
||||||
if (uio->uio_td)
|
if (uio->uio_td)
|
||||||
uio->uio_td->td_ru.ru_msgrcv++;
|
uio->uio_td->td_ru.ru_msgrcv++;
|
||||||
|
#endif /* __rtems__ */
|
||||||
|
|
||||||
/* Fill uio until full or current end of socket buffer is reached. */
|
/* Fill uio until full or current end of socket buffer is reached. */
|
||||||
len = min(uio->uio_resid, sb->sb_cc);
|
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);
|
SOCKBUF_LOCK_ASSERT(&so->so_rcv);
|
||||||
|
|
||||||
|
#ifndef __rtems__
|
||||||
if (uio->uio_td)
|
if (uio->uio_td)
|
||||||
uio->uio_td->td_ru.ru_msgrcv++;
|
uio->uio_td->td_ru.ru_msgrcv++;
|
||||||
|
#endif /* __rtems__ */
|
||||||
SBLASTRECORDCHK(&so->so_rcv);
|
SBLASTRECORDCHK(&so->so_rcv);
|
||||||
SBLASTMBUFCHK(&so->so_rcv);
|
SBLASTMBUFCHK(&so->so_rcv);
|
||||||
nextrecord = m->m_nextpkt;
|
nextrecord = m->m_nextpkt;
|
||||||
|
@@ -12580,10 +12580,12 @@ sctp_lower_sosend(struct socket *so,
|
|||||||
goto out_unlocked;
|
goto out_unlocked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifndef __rtems__
|
||||||
/* Ok, we will attempt a msgsnd :> */
|
/* Ok, we will attempt a msgsnd :> */
|
||||||
if (p) {
|
if (p) {
|
||||||
p->td_ru.ru_msgsnd++;
|
p->td_ru.ru_msgsnd++;
|
||||||
}
|
}
|
||||||
|
#endif /* __rtems__ */
|
||||||
/* Are we aborting? */
|
/* Are we aborting? */
|
||||||
if (srcv->sinfo_flags & SCTP_ABORT) {
|
if (srcv->sinfo_flags & SCTP_ABORT) {
|
||||||
struct mbuf *mm;
|
struct mbuf *mm;
|
||||||
|
@@ -312,7 +312,6 @@ struct thread {
|
|||||||
char td_name [16];
|
char td_name [16];
|
||||||
struct proc *td_proc; /* (*) Associated process. */
|
struct proc *td_proc; /* (*) Associated process. */
|
||||||
struct ucred *td_ucred; /* (k) Reference to credentials. */
|
struct ucred *td_ucred; /* (k) Reference to credentials. */
|
||||||
struct rusage td_ru; /* (t) rusage information. */
|
|
||||||
register_t td_retval[2]; /* (k) Syscall aux returns. */
|
register_t td_retval[2]; /* (k) Syscall aux returns. */
|
||||||
void *td_wchan; /* (t) Sleep address. */
|
void *td_wchan; /* (t) Sleep address. */
|
||||||
#endif /* __rtems__ */
|
#endif /* __rtems__ */
|
||||||
|
Reference in New Issue
Block a user