diff --git a/Makefile b/Makefile
index a43733d..9e3bfef 100644
--- a/Makefile
+++ b/Makefile
@@ -708,7 +708,7 @@ export mod_strip_cmd
ifeq ($(KBUILD_EXTMOD),)
-core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
+core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ mycall/
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S
index 9a0e312..f208f64 100644
--- a/arch/x86/kernel/syscall_table_32.S
+++ b/arch/x86/kernel/syscall_table_32.S
@@ -348,3 +348,5 @@ ENTRY(sys_call_table)
.long sys_setns
.long sys_process_vm_readv
.long sys_process_vm_writev
+ .long sys_mycall
+ .long sys_sillycopy /* 350 */
diff --git a/mycall/Makefile b/mycall/Makefile
new file mode 100644
index 0000000..60ba8c8
--- /dev/null
+++ b/mycall/Makefile
@@ -0,0 +1 @@
+obj-y := mycall.o
diff --git a/mycall/mycall.c b/mycall/mycall.c
new file mode 100644
index 0000000..d071b72
--- /dev/null
+++ b/mycall/mycall.c
@@ -0,0 +1,39 @@
+/*
+ * =====================================================================================
+ *
+ * Filename: mycall.c
+ *
+ * Description:
+ *
+ * Version: 1.0
+ * Created: 12/19/2011 08:05:03 AM
+ * Revision: none
+ * Compiler: gcc
+ *
+ * Author: YOUR NAME (),
+ * Company:
+ *
+ * =====================================================================================
+ */
+#include <linux/syscalls.h>
+
+SYSCALL_DEFINE1(mycall, int, i)
+{
+ return i+10;
+}
+
+SYSCALL_DEFINE3(sillycopy,
+ unsigned long *, src,
+ unsigned long *, dst,
+ unsigned long , len)
+{
+ unsigned long buf[1024];
+
+ if (copy_from_user(buf, src, len))
+ return -EFAULT;
+
+ if (copy_to_user(dst, buf, len))
+ return -EFAULT;
+
+ return len;
+}
diff --git a/mycall/mycalltest.c b/mycall/mycalltest.c
new file mode 100644
index 0000000..71497ab
--- /dev/null
+++ b/mycall/mycalltest.c
@@ -0,0 +1,61 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+
+int main()
+{
+ pid_t tid;
+ char buf1[20] = {"abcd"};
+ char buf2[20] = {0};
+ int len = 5;
+
+ tid = syscall(SYS_gettid);
+ printf("sys_gettid call number is %d\n", SYS_gettid);
+ printf("sys_gettid return : %d\n", tid);
+
+ /*call sys_gettid in assembly*/
+ __asm__(
+ "mov $224, %%eax\n"
+ "int $0x80\n"
+ "mov %%eax, %0"
+ :"=r"(tid)
+ );
+ printf("sys_gettid return from assembly: %d\n", tid);
+
+
+
+ tid = syscall(349, 15);
+ printf("sys_mycall return : %d\n", tid);
+
+ /*call sys_mycall in assembly*/
+ __asm__(
+ "mov $349, %%eax\n"
+ "mov $15, %%ebx\n"
+ "int $0x80\n"
+ "mov %%eax, %0"
+ :"=r"(tid)
+ );
+ printf("sys_mycall in assembly return: %d\n", tid);
+
+ printf("buf2 is %s\n", buf2);
+ tid = syscall(350, buf1, buf2, 5);
+ printf("buf2 is %s\n", buf2);
+
+ buf2[0] = 'e';
+ printf("buf2 is %s\n", buf2);
+ /*call sys_sillycopy in assembly*/
+ __asm__(
+ "mov $350, %%eax\n"
+ "mov %1, %%ebx\n"
+ "mov %2, %%ecx\n"
+ "mov %3, %%edx\n"
+ "int $0x80\n"
+ "mov %%eax, %0"
+ :"=r"(tid)
+ :"r"(buf1), "r"(buf2), "r"(len)
+ :
+ );
+ printf("buf2 is %s\n", buf2);
+}