-/* $Id: rtl.h,v 1.42 2000/10/08 12:42:24 ekohl Exp $
+/* $Id: rtl.h,v 1.43 2000/10/08 16:32:51 dwelch Exp $
*
*/
#define InsertTailList(ListHead, ListEntry) \
{ \
PLIST_ENTRY OldBlink; \
- assert((ListEntry)->Blink == NULL); \
- assert((ListEntry)->Flink == NULL); \
OldBlink = (ListHead)->Blink; \
(ListEntry)->Flink = (ListHead); \
(ListEntry)->Blink = OldBlink; \
-# $Id: makefile,v 1.39 2000/10/07 13:41:47 dwelch Exp $
+# $Id: makefile,v 1.40 2000/10/08 16:32:51 dwelch Exp $
#
# ReactOS Operating System
#
-mdll \
-o junk.tmp \
-Wl,--base-file,base.tmp \
+ -Wl,--entry=_DllMain@12 \
$(TARGET).o \
../kernel32/kernel32.a -lgcc
- $(RM) junk.tmp
-Wl,--image-base,0x77630000 \
-Wl,--file-alignment,0x1000 \
-Wl,--section-alignment,0x1000 \
- -Wl,temp.exp
+ -Wl,temp.exp \
+ -Wl,--entry=_DllMain@12
- $(RM) temp.exp
$(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
-/* $Id: thread.c,v 1.20 2000/09/05 23:01:07 ekohl Exp $
+/* $Id: thread.c,v 1.21 2000/10/08 16:32:52 dwelch Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
memset(&ThreadContext,0,sizeof(CONTEXT));
ThreadContext.Eip = (LONG)ThreadStartup;
ThreadContext.SegGs = USER_DS;
- ThreadContext.SegFs = USER_DS;
+ ThreadContext.SegFs = TEB_SELECTOR;
ThreadContext.SegEs = USER_DS;
ThreadContext.SegDs = USER_DS;
ThreadContext.SegCs = USER_CS;
-/* $Id: startup.c,v 1.31 2000/09/05 11:01:02 ekohl Exp $
+/* $Id: startup.c,v 1.32 2000/10/08 16:32:52 dwelch Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
DbgPrint("Failed to create loader module entry (NTDLL)\n");
ZwTerminateProcess(NtCurrentProcess(),STATUS_UNSUCCESSFUL);
}
+ memset(NtModule, 0, sizeof(LDR_MODULE));
NtModule->BaseAddress = (PVOID)&_image_base__;
NtModule->EntryPoint = 0; /* no entry point */
-/* $Id: process.c,v 1.20 2000/08/05 18:01:52 dwelch Exp $
+/* $Id: process.c,v 1.21 2000/10/08 16:32:52 dwelch Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
memset(&ThreadContext,0,sizeof(CONTEXT));
ThreadContext.Eip = (ULONG)lpStartAddress;
ThreadContext.SegGs = USER_DS;
- ThreadContext.SegFs = USER_DS;
+ ThreadContext.SegFs = TEB_SELECTOR;
ThreadContext.SegEs = USER_DS;
ThreadContext.SegDs = USER_DS;
ThreadContext.SegCs = USER_CS;
Context->Eip = (LONG)StartAddress;
Context->SegGs = USER_DS;
- Context->SegFs = USER_DS;
+ Context->SegFs = TEB_SELECTOR;
Context->SegEs = USER_DS;
Context->SegDs = USER_DS;
Context->SegCs = USER_CS;
"pusha\n\t" \
"pushl %ds\n\t" \
"pushl %es\n\t" \
+ "pushl %fs\n\t" \
"movl $0xceafbeef,%eax\n\t" \
"pushl %eax\n\t" \
"movw $"STR(KERNEL_DS)",%ax\n\t" \
"call _KiInterruptDispatch\n\t"\
"popl %eax\n\t" \
"popl %eax\n\t" \
+ "popl %fs\n\t" \
"popl %es\n\t" \
"popl %ds\n\t" \
"popa\n\t" \
"pusha\n\t" \
"pushl %ds\n\t" \
"pushl %es\n\t" \
+ "pushl %fs\n\t" \
"movl $0xceafbeef,%eax\n\t" \
"pushl %eax\n\t" \
"movw $"STR(KERNEL_DS)",%ax\n\t" \
"call _KiInterruptDispatch\n\t"\
"popl %eax\n\t" \
"popl %eax\n\t" \
+ "popl %fs\n\t" \
"popl %es\n\t" \
"popl %ds\n\t" \
"popa\n\t" \
Context.Eip = (ULONG)LdrStartupAddr;
Context.SegDs = USER_DS;
Context.SegEs = USER_DS;
- Context.SegFs = USER_DS;
+ Context.SegFs = TEB_SELECTOR;
Context.SegGs = USER_DS;
DPRINT("LdrStartupAddr %x\n",LdrStartupAddr);
-/* $Id: loader.c,v 1.63 2000/10/07 13:41:52 dwelch Exp $
+/* $Id: loader.c,v 1.64 2000/10/08 16:32:53 dwelch Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
NULL,
NULL);
DPRINT("Create dir: %wZ\n", &ModuleName);
- Status = ZwCreateDirectoryObject(&DirHandle, 0, &ObjectAttributes);
+ Status = NtCreateDirectoryObject(&DirHandle, 0, &ObjectAttributes);
assert(NT_SUCCESS(Status));
/* Add module entry for NTOSKRNL */
NULL,
NULL);
CHECKPOINT;
- Status = ZwOpenFile(&FileHandle,
+ Status = NtOpenFile(&FileHandle,
FILE_ALL_ACCESS,
&ObjectAttributes,
NULL, 0, 0);
CHECKPOINT;
/* Get the size of the file */
- Status = ZwQueryInformationFile(FileHandle,
+ Status = NtQueryInformationFile(FileHandle,
NULL,
&FileStdInfo,
sizeof(FileStdInfo),
CHECKPOINT;
/* Load driver into memory chunk */
- Status = ZwReadFile(FileHandle,
+ Status = NtReadFile(FileHandle,
0, 0, 0, 0,
ModuleLoadBase,
FileStdInfo.EndOfFile.u.LowPart,
}
CHECKPOINT;
- ZwClose(FileHandle);
+ NtClose(FileHandle);
/* Build module object name */
wcscpy(NameBuffer, MODULE_ROOT_NAME);
for(;;)
{
-// DPRINT1("Idling DpcQueueSize %d, Irql\n",DpcQueueSize,
-// KeGetCurrentIrql());
-// DbgPrint(".");
if (DpcQueueSize > 0)
{
KeRaiseIrql(DISPATCH_LEVEL,&oldlvl);
NULL);
Priority = LOW_PRIORITY;
- ZwSetInformationThread(PsIdleThreadHandle,
+ NtSetInformationThread(PsIdleThreadHandle,
ThreadPriority,
&Priority,
sizeof(Priority));
-/* $Id: thread.c,v 1.56 2000/10/07 13:41:54 dwelch Exp $
+/* $Id: thread.c,v 1.57 2000/10/08 16:32:53 dwelch Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
FirstThread->Tcb.FreezeCount = 0;
CurrentThread = FirstThread;
CURRENT_KPCR->CurrentThread = (PVOID)FirstThread;
- ZwClose(FirstThreadHandle);
+ NtClose(FirstThreadHandle);
DPRINT("FirstThread %x\n",FirstThread);
+++ /dev/null
-*asm:
-
-
-*asm_final:
-
-
-*cpp:
--remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE}
-
-*cc1:
-%(cc1_spec)
-
-*cc1plus:
-
-
-*endfile:
-
-
-*link:
-%{mwindows:--subsystem windows} %{mdll:--dll -e _DllMainCRTStartup@12}
-
-*lib:
-
-
-*libgcc:
--lgcc
-
-*startfile:
-
-
-*switches_need_spaces:
-
-
-*signed_char:
-%{funsigned-char:-D__CHAR_UNSIGNED__}
-
-*predefines:
--Di386 -D_WIN32 -DWIN32 -D__WIN32__ -D__MINGW32__ -DWINNT -D_X86_=1 -D__STDC__=1 -D__stdcall=__attribute__((__stdcall__)) -D_stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -Asystem(winnt) -Acpu(i386) -Amachine(i386)
-
-*cross_compile:
-1
-
-*version:
-egcs-2.91.57
-
-*multilib:
-. ;
-
-*multilib_defaults:
-
-
-*multilib_extra:
-
-
-*multilib_matches:
-
-
-*linker:
-collect2
-
-*cpp_486:
-%{!ansi:-Di486} -D__i486 -D__i486__
-
-*cpp_586:
-%{!ansi:-Di586 -Dpentium} -D__i586 -D__i586__ -D__pentium -D__pentium__
-
-*cpp_686:
-%{!ansi:-Di686 -Dpentiumpro} -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__
-
-*cpp_cpu_default:
-%(cpp_586)
-
-*cpp_cpu:
--Acpu(i386) -Amachine(i386) %{!ansi:-Di386} -D__i386 -D__i386__ %{mcpu=i486:%(cpp_486)} %{m486:%(cpp_486)} %{mpentium:%(cpp_586)} %{mcpu=pentium:%(cpp_586)} %{mpentiumpro:%(cpp_686)} %{mcpu=pentiumpro:%(cpp_686)} %{!mcpu*:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}
-
-*cc1_cpu:
-%{!mcpu*: %{m386:-mcpu=i386 -march=i386} %{mno-486:-mcpu=i386 -march=i386} %{m486:-mcpu=i486 -march=i486} %{mno-386:-mcpu=i486 -march=i486} %{mno-pentium:-mcpu=i486 -march=i486} %{mpentium:-mcpu=pentium} %{mno-pentiumpro:-mcpu=pentium} %{mpentiumpro:-mcpu=pentiumpro}}
-