[ros-svn] [ion] 16542: Second part of patch,
implements the new RTL functions which will be used (not
used by kernel yet).
ion at svn.reactos.com
ion at svn.reactos.com
Tue Jul 12 06:41:45 CEST 2005
Second part of patch, implements the new RTL functions which will be used (not used by kernel yet).
- RtlCreateUserProcess:
* Created RtlpInitEnvironment to manage Environment Block creation. Rougly based on
old KlInitPeb code but with some optimizations.
* Don't ignore Process Security Descriptor if one was specified.
* Don't ignore ZeroBits, get correct entrypoint, and don't assume PEB address.
* Don't close handle of section before closing process handle on failure.
* Support new undocumented flag which pre-allocates 1MB of memory for Native Processes
* FIXME: Hande duplication should be done, but wasn't and still isn't.
- RtlpCreateUserStack:
* New function to create a stack for a Thread, similar to BasepCreateStack but
has some differences related to StackCommit/StackReserve.
* Also create Guard Page
- RtlpFreeUserStack:
* Undoes what the function above does, in case of failure in code using it.
- RtlCreateUserThread:
* Use the new functions instead of rosrtl.
- RtlInitializeContext:
* New function similar to BasepInitializeContext but;
> Uses a single entrypoint, not many possible thunks like Kernel32 (no need)
> The starting EFLAGS is Interrupts Enabled, not IOPL 3.
> We don't initialize the same Context Flags
> The initial context registers are different
- RtlFreeUserThreadStack
* Don't assume the TEB address
- RtlExitUserThread
* Remove deprecated stack-switching semantics and use new TEB flag to tell the Kernel
to deallocate the stack for us.
Updated files:
trunk/reactos/lib/kernel32/process/create.c
trunk/reactos/lib/ntdll/rtl/process.c
trunk/reactos/lib/rtl/process.c
trunk/reactos/lib/rtl/thread.c
trunk/reactos/ntoskrnl/mm/pe.c
More information about the Ros-svn
mailing list