Skip to content

Instantly share code, notes, and snippets.

# Debian setup script for me.
# Edit package repositories and run aptitude command.
echo "
deb http://ftp.jp.debian.org/debian/ wheezy main non-free contrib
deb http://archive.cloudera.com/debian lenny-cdh3 contrib
deb-src http://archive.cloudera.com/debian lenny-cdh3 contrib
deb http://ftp.jp.debian.org/debian/ wheezy main non-free contrib
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index 78b0949..975de60 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -900,3 +900,31 @@ adjust_timeout_calltodo(time_change)
return;
}
#endif /* APM_FIXUP_CALLTODO */
+
+int
#/usr/bin/env ruby
HZ=250
TICK_PER_USEC = 1000000 / HZ
class Timeval
attr_accessor :sec, :usec
def initialize
self.sec = 0
self.usec = 0
all:
make a.out
a.out: a.cc worker.cc
g++ a.cc worker.cc
./a.out
clean:
rm -rf *.o a.out
From e5e403e2cc772dac3e0472f1d6d81f777d6df36f Mon Sep 17 00:00:00 2001
From: OZAWA Tsuyoshi <[email protected]>
Date: Tue, 4 May 2010 21:19:32 +0900
Subject: [PATCH] add i386 & amd64 support
Signed-off-by: OZAWA Tsuyoshi <[email protected]>
---
sys/amd64/amd64/apic_vector.S | 2 +-
sys/amd64/amd64/local_apic.c | 123 +++++++++++++++++++++++++++++++++++++++++
sys/amd64/isa/clock.c | 13 ++++-
Signed-off-by: OZAWA Tsuyoshi <ozawa _at_ t-oza.net>
---
sys/i386/i386/local_apic.c | 132 ++++++++++++++++++++++++++++++++++++++++++++
sys/kern/kern_clock.c | 27 +++++++++
sys/kern/kern_timeout.c | 30 ++++++++++
sys/kern/sched_4bsd.c | 3 +
sys/kern/sched_ule.c | 8 ++-
sys/sys/dynticks.h | 34 +++++++++++
sys/sys/systm.h | 1 +
7 files changed, 233 insertions(+), 2 deletions(-)
From 8e71cc1c52262eb1f6a467078788ac092a3b112d Mon Sep 17 00:00:00 2001
From: ozawa <[email protected]>
Date: Sun, 18 Apr 2010 06:18:17 +0900
Subject: [PATCH] define __le16, __le32, __le64 for type check
Signed-off-by: ozawa <[email protected]>
---
block/sheepdog.c | 145 ++++++++++++++++++++++++++++--------------------------
1 files changed, 75 insertions(+), 70 deletions(-)
diff --git a/sys/i386/i386/local_apic.c b/sys/i386/i386/local_apic.c
index 10a5854..b82a822 100644
--- a/sys/i386/i386/local_apic.c
+++ b/sys/i386/i386/local_apic.c
@@ -68,6 +68,8 @@ __FBSDID("$FreeBSD: src/sys/i386/i386/local_apic.c,v 1.61.2.4.2.1 2009/10/25 01:
#include <ddb/ddb.h>
#endif
+#include <sys/dynticks.h>
+
ozawa@ozadeb:~/workspace/lilyvm$ ./lilyvm kerneltype=Linux kernel=vmlinux linux_initrd=initrd disk=disk-linux linux_commandline=root=/dev/vmdisk0
memsize 128000000
esp:0xbfb00000
eax:0x00000033 ecx:0xffffffff edx:0xb7f57424 ebx:0xbfffe868
esp:0xbfb00000 ebp:0x00000003 esi:0x00000073 edi:0x00000246
cs:0x0000 ds:0x0000 es:0x0000 fs:0x0000 gs:0x0000 ss:0x0000
eip:0x2563
eip:0x2563
sig:4
execgdb ()
# Makefile
# Declare Name of kernel module
KMOD = test
# Enumerate Source files for kernel module
SRCS = test.c
SRCS += device_if.h bus_if.h
i:
sudo kldload ./test.ko