kernel - MPSAFE work - add vmspace_token
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 12 Jun 2010 04:59:36 +0000 (21:59 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 12 Jun 2010 04:59:36 +0000 (21:59 -0700)
* Add a global token, vmspace_token

sys/kern/lwkt_token.c
sys/sys/thread.h

index c136e45..e9b4902 100644 (file)
@@ -131,6 +131,7 @@ SYSCTL_INT(_lwkt, OID_AUTO, token_debug, CTLFLAG_RW, &token_debug, 0, "");
 struct lwkt_token pmap_token = LWKT_TOKEN_UP_INITIALIZER;
 struct lwkt_token dev_token = LWKT_TOKEN_UP_INITIALIZER;
 struct lwkt_token vm_token = LWKT_TOKEN_UP_INITIALIZER;
+struct lwkt_token vmspace_token = LWKT_TOKEN_UP_INITIALIZER;
 struct lwkt_token kvm_token = LWKT_TOKEN_UP_INITIALIZER;
 struct lwkt_token proc_token = LWKT_TOKEN_UP_INITIALIZER;
 struct lwkt_token tty_token = LWKT_TOKEN_UP_INITIALIZER;
@@ -142,6 +143,8 @@ SYSCTL_INT(_lwkt, OID_AUTO, dev_mpsafe,
           CTLFLAG_RW, &dev_token.t_flags, 0, "");
 SYSCTL_INT(_lwkt, OID_AUTO, vm_mpsafe,
           CTLFLAG_RW, &vm_token.t_flags, 0, "");
+SYSCTL_INT(_lwkt, OID_AUTO, vmspace_mpsafe,
+          CTLFLAG_RW, &vmspace_token.t_flags, 0, "");
 SYSCTL_INT(_lwkt, OID_AUTO, kvm_mpsafe,
           CTLFLAG_RW, &kvm_token.t_flags, 0, "");
 SYSCTL_INT(_lwkt, OID_AUTO, proc_mpsafe,
@@ -162,6 +165,8 @@ SYSCTL_LONG(_lwkt, OID_AUTO, dev_collisions,
            CTLFLAG_RW, &dev_token.t_collisions, 0, "");
 SYSCTL_LONG(_lwkt, OID_AUTO, vm_collisions,
            CTLFLAG_RW, &vm_token.t_collisions, 0, "");
+SYSCTL_LONG(_lwkt, OID_AUTO, vmspace_collisions,
+           CTLFLAG_RW, &vmspace_token.t_collisions, 0, "");
 SYSCTL_LONG(_lwkt, OID_AUTO, kvm_collisions,
            CTLFLAG_RW, &kvm_token.t_collisions, 0, "");
 SYSCTL_LONG(_lwkt, OID_AUTO, proc_collisions,
index f17c449..7c65bc4 100644 (file)
@@ -355,6 +355,7 @@ struct thread {
 extern struct lwkt_token pmap_token;
 extern struct lwkt_token dev_token;
 extern struct lwkt_token vm_token;
+extern struct lwkt_token vmspace_token;
 extern struct lwkt_token kvm_token;
 extern struct lwkt_token proc_token;
 extern struct lwkt_token tty_token;