⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unifiedkernel-0.2.0-k2.6.13.diff

📁 该项目主要是将wingdows程序直接运行在linux上
💻 DIFF
📖 第 1 页 / 共 5 页
字号:
 #else #ifdef CONFIG_X86_IO_APIC+#ifndef CONFIG_UNIFIED_KERNEL #define NR_IRQS 224 # if (224 >= 32 * NR_CPUS) # define NR_IRQ_VECTORS NR_IRQS@@ -13,9 +14,18 @@ # define NR_IRQ_VECTORS (32 * NR_CPUS) # endif #else+#define NR_IRQS 208+# if (208 >= 32 * NR_CPUS)+# define NR_IRQ_VECTORS NR_IRQS+# else+# define NR_IRQ_VECTORS (32 * NR_CPUS)+# endif+#endif+#else #define NR_IRQS 16 #define NR_IRQ_VECTORS NR_IRQS #endif+ #endif  #endif /* _ASM_IRQ_VECTORS_LIMITS_H */diff -Nur linux-2.6.13.ori/include/linux/init_task.h linux-2.6.13/include/linux/init_task.h--- linux-2.6.13.ori/include/linux/init_task.h	2005-08-28 23:41:01.000000000 +0000+++ linux-2.6.13/include/linux/init_task.h	2006-12-29 15:12:11.000000000 +0000@@ -1,6 +1,7 @@ #ifndef _LINUX__INIT_TASK_H #define _LINUX__INIT_TASK_H +#include <linux/config.h> #include <linux/file.h>  #define INIT_FILES \@@ -67,6 +68,7 @@  *  INIT_TASK is used to set up the first task table, touch at  * your own risk!. Base=0, limit=0x1fffff (=2MB)  */+#ifndef CONFIG_UNIFIED_KERNEL #define INIT_TASK(tsk)	\ {									\ 	.state		= 0,						\@@ -113,7 +115,55 @@ 	.cpu_timers	= INIT_CPU_TIMERS(tsk.cpu_timers),		\ 	.fs_excl	= ATOMIC_INIT(0),				\ }-+#else+#define INIT_TASK(tsk)	\+{									\+	.state		= 0,						\+	.thread_info	= &init_thread_info,				\+	.usage		= ATOMIC_INIT(2),				\+	.flags		= 0,						\+	.lock_depth	= -1,						\+	.prio		= MAX_PRIO-20,					\+	.static_prio	= MAX_PRIO-20,					\+	.policy		= SCHED_NORMAL,					\+	.cpus_allowed	= CPU_MASK_ALL,					\+	.mm		= NULL,						\+	.active_mm	= &init_mm,					\+	.run_list	= LIST_HEAD_INIT(tsk.run_list),			\+	.ioprio		= 0,						\+	.time_slice	= HZ,						\+	.tasks		= LIST_HEAD_INIT(tsk.tasks),			\+	.ptrace_children= LIST_HEAD_INIT(tsk.ptrace_children),		\+	.ptrace_list	= LIST_HEAD_INIT(tsk.ptrace_list),		\+	.real_parent	= &tsk,						\+	.parent		= &tsk,						\+	.children	= LIST_HEAD_INIT(tsk.children),			\+	.sibling	= LIST_HEAD_INIT(tsk.sibling),			\+	.group_leader	= &tsk,						\+	.group_info	= &init_groups,					\+	.cap_effective	= CAP_INIT_EFF_SET,				\+	.cap_inheritable = CAP_INIT_INH_SET,				\+	.cap_permitted	= CAP_FULL_SET,					\+	.keep_capabilities = 0,						\+	.user		= INIT_USER,					\+	.comm		= "swapper",					\+	.thread		= INIT_THREAD,					\+	.fs		= &init_fs,					\+	.files		= &init_files,					\+	.signal		= &init_signals,				\+	.sighand	= &init_sighand,				\+	.pending	= {						\+		.list = LIST_HEAD_INIT(tsk.pending.list),		\+		.signal = {{0}}},					\+	.blocked	= {{0}},					\+	.alloc_lock	= RW_LOCK_UNLOCKED,				\+	.proc_lock	= SPIN_LOCK_UNLOCKED,				\+	.journal_info	= NULL,						\+	.cpu_timers	= INIT_CPU_TIMERS(tsk.cpu_timers),		\+	.fs_excl	= ATOMIC_INIT(0),				\+	.ethread	= NULL						\+}+#endif  #define INIT_CPU_TIMERS(cpu_timers)					\ {									\diff -Nur linux-2.6.13.ori/include/linux/sched.h linux-2.6.13/include/linux/sched.h--- linux-2.6.13.ori/include/linux/sched.h	2005-08-28 23:41:01.000000000 +0000+++ linux-2.6.13/include/linux/sched.h	2006-12-29 15:12:11.000000000 +0000@@ -65,6 +65,11 @@  */ #define CLONE_KERNEL	(CLONE_FS | CLONE_FILES | CLONE_SIGHAND) +#ifdef CONFIG_UNIFIED_KERNEL+#define	CREATE_PROCESS	1+#define	CREATE_THREAD	2+#endif+ /*  * These are the constant used to fake the fixed-point load-average  * counting. Some notes:@@ -729,7 +734,11 @@    	u32 parent_exec_id;    	u32 self_exec_id; /* Protection of (de-)allocation: mm, files, fs, tty, keyrings */+#ifndef CONFIG_UNIFIED_KERNEL 	spinlock_t alloc_lock;+#else+	rwlock_t alloc_lock; +#endif /* Protection of proc_dentry: nesting proc_lock, dcache_lock, write_lock_irq(&tasklist_lock); */ 	spinlock_t proc_lock; @@ -770,6 +779,9 @@ 	int cpuset_mems_generation; #endif 	atomic_t fs_excl;	/* holding fs exclusive resources */+#ifdef CONFIG_UNIFIED_KERNEL+	struct ethread *ethread;+#endif };  static inline pid_t process_group(struct task_struct *tsk)@@ -1128,12 +1140,20 @@  */ static inline void task_lock(struct task_struct *p) {+	#ifndef CONFIG_UNIFIED_KERNEL 	spin_lock(&p->alloc_lock);+	#else+	write_lock(&p->alloc_lock); +	#endif }  static inline void task_unlock(struct task_struct *p) {+	#ifndef CONFIG_UNIFIED_KERNEL 	spin_unlock(&p->alloc_lock);+	#else+	write_unlock(&p->alloc_lock); +	#endif }  /* set thread flags in other task's structuresdiff -Nur linux-2.6.13.ori/include/linux/win32_object.h linux-2.6.13/include/linux/win32_object.h--- linux-2.6.13.ori/include/linux/win32_object.h	1970-01-01 00:00:00.000000000 +0000+++ linux-2.6.13/include/linux/win32_object.h	2006-12-29 15:12:11.000000000 +0000@@ -0,0 +1,174 @@+/*+ * win32_object.h+ *+ * Copyright (C) 2006  Insigme Co., Ltd+ *+ * Authors: + * - Decao Mao, Chenzhan Hu, Lixing Chu, Limin Jin, Liwei Zhou, Zhiqiang Jiao+ *+ * This software has been developed while working on the Linux Unified Kernel+ * project (http://linux.insigma.com.cn) in the Insigma Reaserch Institute,  + * which is a subdivision of Insigma Co., Ltd (http://www.insigma.com.cn).+ * + * The project is sponsored by Insigma Co., Ltd.+ *+ * The authors can be reached at linux@insigma.com.cn.+ *+ * This program is free software; you can redistribute it and/or modify it+ * under the terms of  the GNU General  Public License as published by the+ * Free Software Foundation; either version 2 of the  License, or (at your+ * option) any later version.+ *+ * Revision History:+ *   Jan 2006 - Created.+ */++#ifndef _WIN32_OBJECT_H+#define _WIN32_OBJECT_H++#include <linux/config.h>+#include <linux/fs.h>+#include <linux/list.h>+#include <linux/wait.h>+#include <linux/sched.h>+#include <linux/nls.h>++#ifdef KDEBUG+#define kdebug(FMT...) printk(FMT)+#else+#define kdebug(FMT...)+#endif++#ifdef KTRACE+#define ktrace(FMT...) printk(FMT)+#else+#define ktrace(FMT...)+#endif++#define OBJECT_MAGIC 0x21436587++#define POLL_NOTSIG	0+#define POLL_SIG	1+#define POLL_ABANDONED	2++struct win32_object_class;+struct eprocess;+struct ethread;+struct wait_table_entry;++struct oname {+	char	*name;		/* object name - use getname/putname! */+	__u32	nhash;		/* dcache-type hash */+};++enum kobject_type {+    event_notification_object = 0,+    event_synchronization_object = 1,+    mutant_object = 2,+    process_object = 3,+    queue_object = 4,+    semaphore_object = 5,+    thread_object = 6,+    gate_object = 7,+    timer_notification_object = 8,+    timer_synchronization_object = 9,+    spare2_object = 10,+    spare3_object = 11,+    spare4_object = 12,+    spare5_object = 13,+    spare6_object = 14,+    spare7_object = 15,+    spare8_object = 16,+    spare9_object = 17,+    apc_object = 18,+    dpc_object = 19,+    device_queue_object = 20,+    event_pair_object = 21,+    interrupt_object = 22,+    profile_object = 23,+    threaded_dpc_object = 24,+    max_kernel_object = 25+};++/*+ * object definition+ * - object namespace is indexed by name and class+ */+typedef struct win32_object {+	struct list_head		o_objlist;	/* obj list (must be 1st) */+#ifdef OBJECT_MAGIC+	int				o_magic;	/* magic number (debugging) */+#endif+	atomic_t			o_count;	/* usage count */+	wait_queue_head_t		o_wait;		/* waiting process list */+	struct win32_object_class	*o_class;	/* object class */+	struct oname			o_name;		/* name of object */+	void				*o_private;	/* type-specific data */+	enum kobject_type		o_type;				+} win32_object;++/*+ * definition of object class, including general operations+ */+#define OBJCLASSNOBJSSIZE 16+#define OBJCLASSNOBJSMASK (OBJCLASSNOBJSSIZE-1)++struct win32_object_class {+	struct list_head	oc_next;+	const char		oc_type[6];	/* type name (5 chars + NUL) */+	int			oc_flags;+#define OCF_DONT_NAME_ANON	0x00000001 /* don't name anonymous objects */++	int (*constructor)(win32_object *, void *);+	int (*reconstructor)(win32_object *, void *);+	void (*destructor)(win32_object *);+	int (*poll)(struct wait_table_entry *, struct ethread *);+	void (*detach)(win32_object *, struct eprocess *);++	/* lock governing access to object lists */+	rwlock_t oc_lock;++	/* named object hash */+	struct list_head oc_nobjs[OBJCLASSNOBJSSIZE];++	/* anonymous object list */+	struct list_head oc_aobjs;+};+/* thread and process object class */+extern struct win32_object_class thread_objclass;+extern struct win32_object_class process_objclass;++/* object list */+extern struct list_head object_list;+extern spinlock_t object_list_lock;++extern struct list_head object_class_list;++/* signal an object and so wake up those waiting on it */+extern __inline__ void signal_object(win32_object *obj, int wakeall)+{+#ifdef OBJECT_MAGIC+        if (obj->o_magic!=OBJECT_MAGIC) {+                printk(KERN_CRIT"bad object magic\n");+                return;+        }+#endif++        if (wakeall)+                wake_up_all(&obj->o_wait);+        else+                wake_up(&obj->o_wait);+} /* end signal_object() */++extern __inline__ void objget(win32_object *obj)+{+#ifdef OBJECT_MAGIC+        if (obj->o_magic!=OBJECT_MAGIC)+                panic("bad object magic\n");+#endif+        if (obj) atomic_inc(&obj->o_count);+} /* end objget() */++extern void objput(win32_object *);++#endif /* _WIN32_OBJECT_H */diff -Nur linux-2.6.13.ori/include/linux/win32_process.h linux-2.6.13/include/linux/win32_process.h--- linux-2.6.13.ori/include/linux/win32_process.h	1970-01-01 00:00:00.000000000 +0000+++ linux-2.6.13/include/linux/win32_process.h	2006-12-29 15:12:11.000000000 +0000@@ -0,0 +1,275 @@+/*+ * win32_process.h+ *+ * Copyright (C) 2006  Insigme Co., Ltd+ *+ * Authors: + * - Decao Mao, Chenzhan Hu, Lixing Chu, Limin Jin, Liwei Zhou, Zhiqiang Jiao+ *+ * This software has been developed while working on the Linux Unified Kernel+ * project (http://linux.insigma.com.cn) in the Insigma Reaserch Institute,  + * which is a subdivision of Insigma Co., Ltd (http://www.insigma.com.cn).+ * + * The project is sponsored by Insigma Co., Ltd.+ *+ * The authors can be reached at linux@insigma.com.cn.+ *+ * This program is free software; you can redistribute it and/or modify it+ * under the terms of  the GNU General  Public License as published by the+ * Free Software Foundation; either version 2 of the  License, or (at your+ * option) any later version.+ *+ * Revision History:+ *   Jan 2006 - Created.+ */++#ifndef _WIN32_PROCESS_H+#define _WIN32_PROCESS_H++#include <linux/win32_thread.h>+#include <linux/winternl.h>+#include <linux/list.h>++/* Process state */+#define PROCESS_STATE_TERMINATED	1+#define PROCESS_STATE_ACTIVE		2++/* Process priority classes */+#define PROCESS_PRIORITY_CLASS_HIGH	(4) /* FIXME */+#define PROCESS_PRIORITY_CLASS_IDLE	(0) /* FIXME */+#define PROCESS_PRIORITY_CLASS_NORMAL	(2) /* FIXME */+#define PROCESS_PRIORITY_CLASS_REALTIME	(5) /* FIXME */+#define PROCESS_PRIORITY_CLASS_BELOW_NORMAL (1) /* FIXME */+#define PROCESS_PRIORITY_CLASS_ABOVE_NORMAL (3) /* FIXME */++#define MAXHANDLES ((PAGE_SIZE-sizeof(struct eprocess))/sizeof(struct win32_object*))+#define MINHANDLE ((HANDLE)(1*sizeof(win32_object*)))+#define MAXHANDLE ((HANDLE)((MAXHANDLES+1)*sizeof(win32_object*)))++static __inline__ struct eprocess *get_eprocess(struct ethread *thread)+{+	struct eprocess *ep = thread->threads_process;+	+	return ep;+} /* end get_eprocess() */++/*+ * kprocess+ */+struct kprocess+{+	struct dispatcher_header	header;		   	/* 000 */+	struct list_head		profile_list_head;	/* 010 */+	physical_address_t		directory_table_base;	/* 018 */+#if defined(_M_IX86)+	struct kgd_entry		ldt_descriptor;		/* 020 */+	struct kidt_entry		Int21_descriptor;  	/* 028 */+	unsigned short			iopm_offset;		/* 030 */+	unsigned char			iopl;		  	/* 032 */+	unsigned char			unused;			/* 033 */+#endif+	unsigned long			active_processors;  	/* 034 */+	unsigned long			kernel_time;		/* 038 */+	unsigned long			user_time;	  	/* 03C */+	struct list_head		ready_list_head;	/* 040 */+	struct list_head		swap_list_entry;	/* 048 */+	void*				vdm_trapc_handler; 	/* 04C */+	struct list_head		thread_list_head;	/* 050 */+	spinlock_t			process_lock;	  	/* 068 */+	unsigned long			affinity;	  	/* 06C */+	union+	{+		struct+		{+			unsigned long	auto_alignment:1;	/* 070.0 */+			unsigned long	disable_boost:1;	/* 070.1 */+			unsigned long	disable_quantum:1;	/* 070.2 */+			unsigned long	reserved_flags:29;	/* 070.3 */+		};+		unsigned long		process_flags;		/* 070 */+	};+	char				base_priority;		/* 074 */+	char				quantum_reset;		/* 075 */+	unsigned char			state;		 	/* 076 */+	unsigned char			thread_seed;		/* 077 */+	unsigned char			power_state;		/* 078 */+	unsigned char			ideal_node;	 	/* 079 */+	unsigned char			visited;	   	/* 07A */+	struct kexecute_options		flags;		 	/* 07B */+	unsigned long			stack_count;		/* 07C */+	struct list_head		process_list_entry; 	/* 080 */+};++struct eprocess+{+	struct kprocess			pcb;			 	/* 000 */+	unsigned long			exit_status;		  	/* 088 */+	spinlock_t			process_lock;		 	/* 08C */+	struct kevent			lock_event;			/* 0A4 */+	unsigned long			lock_count;			/* */+	struct kthread			*lock_owner;		   	/* */+	large_integer_t			create_time;		   	/* */+	large_integer_t			exit_time;		 	/* */+	void 				*rundown_protect;		/* */+	void*				unique_processid;		/* */+	struct list_head		active_process_links;		/* */+	+	/* quota fields */+	unsigned long			quota_usage[3];			/* */+	unsigned long			quota_peak[3];			/* */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -