00001 #include "local.h"
00002
00003
00004 #include <asm/pgtable.h>
00005 #include <asm/uaccess.h>
00006
00007 #include <linux/fs.h>
00008 #include <linux/fdtable.h>
00009 #include <linux/mm.h>
00010 #include <linux/init.h>
00011 #include <linux/init_task.h>
00012 #include <linux/ipc_namespace.h>
00013 #include <linux/kernel.h>
00014 #include <linux/mqueue.h>
00015 #include <linux/module.h>
00016 #include <linux/personality.h>
00017
00018
00019 struct task_struct init_task;
00020
00021
00022 #define BITS_PER_PAGE (PAGE_SIZE*8)
00023 #define BITS_PER_PAGE_MASK (BITS_PER_PAGE-1)
00024
00025
00026 enum system_states system_state;
00027 EXPORT_SYMBOL(system_state);
00028
00029 struct fs_struct init_fs = {
00030 .count = ATOMIC_INIT(1),
00031 .lock = __RW_LOCK_UNLOCKED(init_fs.lock),
00032 .umask = 0022,
00033 };
00034
00035 struct files_struct init_files = {
00036 .count = ATOMIC_INIT(1),
00037 .fdt = &init_files.fdtab,
00038 .fdtab = {
00039 .max_fds = NR_OPEN_DEFAULT,
00040 .fd = &init_files.fd_array[0],
00041 .close_on_exec = (fd_set *)&init_files.close_on_exec_init,
00042 .open_fds = (fd_set *)&init_files.open_fds_init,
00043 .rcu = RCU_HEAD_INIT,
00044 },
00045 .file_lock = __SPIN_LOCK_UNLOCKED(init_task.file_lock),
00046 };
00047
00048 struct signal_struct init_signals = INIT_SIGNALS(init_signals);
00049 struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
00050 struct mm_struct init_mm = INIT_MM(init_mm);
00051 pgd_t swapper_pg_dir[PTRS_PER_PGD];
00052 union thread_union init_thread_union = { INIT_THREAD_INFO(init_task) };
00053 struct group_info init_groups = {.usage = ATOMIC_INIT(2)};
00054
00055 struct user_struct root_user = {
00056 .__count = ATOMIC_INIT(1),
00057 .processes = ATOMIC_INIT(1),
00058 .files = ATOMIC_INIT(0),
00059 .sigpending = ATOMIC_INIT(0),
00060 .mq_bytes = 0,
00061 .locked_shm = 0,
00062 };
00063
00064
00065
00066
00067
00068
00069
00070 struct pid_namespace init_pid_ns = {
00071 .kref = {
00072 .refcount = ATOMIC_INIT(2),
00073 },
00074 .pidmap = {
00075 [ 0 ... PIDMAP_ENTRIES-1] = { ATOMIC_INIT(BITS_PER_PAGE), NULL }
00076 },
00077 .last_pid = 0,
00078 .level = 0,
00079 .child_reaper = &init_task,
00080 };
00081 EXPORT_SYMBOL_GPL(init_pid_ns);
00082
00083 struct net init_net __attribute__((weak));
00084
00085 struct nsproxy init_nsproxy = INIT_NSPROXY(init_nsproxy);
00086
00087 struct ipc_namespace init_ipc_ns = {
00088 .kref = {
00089 .refcount = ATOMIC_INIT(2),
00090 },
00091 };
00092
00093 struct user_namespace init_user_ns = {
00094 .kref = {
00095 .refcount = ATOMIC_INIT(2),
00096 },
00097 };
00098
00099
00100 struct uts_namespace init_uts_ns = {
00101 .kref = {
00102 .refcount = ATOMIC_INIT(2),
00103 },
00104 .name = {
00105 .sysname = "L4/DDE",
00106 .nodename = "",
00107 .release = "2.6",
00108 .version = "25",
00109 .machine = "",
00110 .domainname = "",
00111 },
00112 };
00113
00114 struct exec_domain default_exec_domain = {
00115 .name = "Linux",
00116 .handler = NULL,
00117 .pers_low = 0,
00118 .pers_high = 0,
00119 .signal_map = 0,
00120 .signal_invmap = 0,
00121 };
00122
00123
00124 struct task_struct init_task = INIT_TASK(init_task);
00125
00126 struct thread_info init_thread = INIT_THREAD_INFO(init_task);
00127
00128 long do_no_restart_syscall(struct restart_block *param)
00129 {
00130 return -EINTR;
00131 }