summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2013-10-03 17:30:55 +0000
committermarkm <markm@FreeBSD.org>2013-10-03 17:30:55 +0000
commit4655fd3ead80b03639e139ad19759e0307eb10df (patch)
tree67afea6aa141c4d4eb728b118c7b646e360ac66c /sys
parente7fc623a189ad8f5aab1329d75910535e1823f36 (diff)
downloadFreeBSD-src-4655fd3ead80b03639e139ad19759e0307eb10df.zip
FreeBSD-src-4655fd3ead80b03639e139ad19759e0307eb10df.tar.gz
MFC - tracking commit
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/newvers.sh4
-rw-r--r--sys/net/if_tap.c1
-rw-r--r--sys/net/if_tun.c1
-rw-r--r--sys/powerpc/include/proc.h12
4 files changed, 18 insertions, 0 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index d84e034..263eb4c 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -159,6 +159,10 @@ if [ -n "$git_cmd" ] ; then
git=" ${git}"
fi
fi
+ git_b=`$git_cmd rev-parse --abbrev-ref HEAD`
+ if [ -n "$git_b" ] ; then
+ git="${git}(${git_b})"
+ fi
if $git_cmd --work-tree=${SYSDIR}/.. diff-index \
--name-only HEAD | read dummy; then
git="${git}-dirty"
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c
index ad6f781..fe53a6a 100644
--- a/sys/net/if_tap.c
+++ b/sys/net/if_tap.c
@@ -220,6 +220,7 @@ tap_destroy(struct tap_softc *tp)
CURVNET_SET(ifp->if_vnet);
destroy_dev(tp->tap_dev);
seldrain(&tp->tap_rsel);
+ knlist_clear(&tp->tap_rsel.si_note, 0);
knlist_destroy(&tp->tap_rsel.si_note);
ether_ifdetach(ifp);
if_free(ifp);
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index f44bc0e..f36e7ad 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -258,6 +258,7 @@ tun_destroy(struct tun_softc *tp)
if_free(TUN2IFP(tp));
destroy_dev(dev);
seldrain(&tp->tun_rsel);
+ knlist_clear(&tp->tun_rsel.si_note, 0);
knlist_destroy(&tp->tun_rsel.si_note);
mtx_destroy(&tp->tun_mtx);
cv_destroy(&tp->tun_cv);
diff --git a/sys/powerpc/include/proc.h b/sys/powerpc/include/proc.h
index 627fbf2..4981581 100644
--- a/sys/powerpc/include/proc.h
+++ b/sys/powerpc/include/proc.h
@@ -54,6 +54,18 @@ struct mdproc {
#endif
#ifdef _KERNEL
+
+#include <machine/pcb.h>
+
+/* Get the current kernel thread stack usage. */
+#define GET_STACK_USAGE(total, used) do { \
+ struct thread *td = curthread; \
+ (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \
+ (used) = (char *)td->td_kstack + \
+ td->td_kstack_pages * PAGE_SIZE - \
+ (char *)&td; \
+} while (0)
+
struct syscall_args {
u_int code;
struct sysent *callp;
OpenPOWER on IntegriCloud