Пример #1
0
        public static KernelResult StartInitialProcess(
            KernelContext context,
            ProcessCreationInfo creationInfo,
            ReadOnlySpan <int> capabilities,
            int mainThreadPriority,
            ThreadStart customThreadStart)
        {
            KProcess process = new KProcess(context);

            KernelResult result = process.Initialize(
                creationInfo,
                capabilities,
                context.ResourceLimit,
                MemoryRegion.Service,
                null,
                customThreadStart);

            if (result != KernelResult.Success)
            {
                return(result);
            }

            process.DefaultCpuCore = 3;

            context.Processes.TryAdd(process.Pid, process);

            return(process.Start(mainThreadPriority, 0x1000UL));
        }
Пример #2
0
 internal static void SetKernelContext(KernelContext context, KThread thread)
 {
     Context       = context;
     CurrentThread = thread;
 }
Пример #3
0
 internal static void SetKernelContext(KernelContext context)
 {
     Context = context;
 }