vkernel: Fix build
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Thu, 19 Jan 2017 08:02:58 +0000 (00:02 -0800)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Fri, 20 Jan 2017 21:47:32 +0000 (22:47 +0100)
  - Partially-submitted by: zrj

sys/platform/vkernel64/platform/init.c
sys/platform/vkernel64/x86_64/exception.c
sys/platform/vkernel64/x86_64/vm_machdep.c

index bab7dd6..37cbc58 100644 (file)
@@ -88,6 +88,7 @@ vm_phystable_t phys_avail[16];
 vm_paddr_t Maxmem;
 vm_paddr_t Maxmem_bytes;
 long physmem;
+int naps = 0; /* # of Applications processors */
 int MemImageFd = -1;
 struct vkdisk_info DiskInfo[VKDISK_MAX];
 int DiskNum;
index 6a163fc..541b473 100644 (file)
@@ -42,6 +42,7 @@
 #include <ddb/ddb.h>
 
 #include <sys/thread2.h>
+#include <sys/lwp.h>
 
 #include <machine/trap.h>
 #include <machine/md_var.h>
@@ -148,7 +149,7 @@ infosig(int nada, siginfo_t *info, void *ctxp)
        char buf[256];
 
        snprintf(buf, sizeof(buf), "lwp %d pc=%p sp=%p\n",
-               (int)lwp_gettid(),
+               (lwpid_t)lwp_gettid(),
                (void *)(intptr_t)ctx->uc_mcontext.mc_rip,
                (void *)(intptr_t)ctx->uc_mcontext.mc_rsp);
        write(2, buf, strlen(buf));
index 9a4a687..b19045f 100644 (file)
@@ -53,6 +53,7 @@
 #include <sys/kernel.h>
 #include <sys/sysctl.h>
 #include <sys/unistd.h>
+#include <sys/lwp.h>
 
 #include <machine/clock.h>
 #include <machine/cpu.h>