Commit graph

23689 commits

Author SHA1 Message Date
Aleksey Bragin d1beb35b7d Fix compile (debug information is removed from Spare[2], but noone uses it).
svn path=/trunk/; revision=25634
2007-01-26 10:07:26 +00:00
Alex Ionescu 35c5b063fd - Fix definition of RTL_CRITICAL_SECTION_DEBUG.
- Fix all MSVC warnings in kernel32.
- Re-enable PCH.
- Disable Rtl*CondVar calls, since we can't target Vista *AND* 2003 due to linker problems. We'll need a way to create multiple DLL versions if we're going to attempt this.
- Make ASSERTs always valid in kernel32 as long as DBG is set.
- Fix Windows-loading hack, it seems there's only two levels of SEH. Eitherways, I think I've found a cleaner way to make it load nicely, so this hack will go away soon.

svn path=/trunk/; revision=25633
2007-01-26 07:22:19 +00:00
Alex Ionescu 32a29de195 - Multiple fixes to ERESOURCE implementation.
svn path=/trunk/; revision=25632
2007-01-25 23:48:48 +00:00
Alex Ionescu c4f9542125 - Clean up kernel32\thread.c and fix some bugs.
- Implement KeSetDisableBoostThread.
- Temporarily disable SEH/validation in NtQuery/SetProcess/ThreadInformation routines since it was making all calls fail.
- Fix bugs when using ThreadPriority, ThreadBasePriority, ThreadAffinityMask. Parameters are now validated properly, and affinity masked with the process.
- Implement ThreadSetIdealProcessor and ThreadPriorityBoost case.
- Implement ThreadZeroTlsCell case. TLS should now work properly.
- Make kernel32_winetest for threads usable.
- Update Kernel Fun.

svn path=/trunk/; revision=25631
2007-01-25 22:39:32 +00:00
Alex Ionescu 91d26f3e23 - Implement the balance set manager. Doesn't do much for now except start up the thread queue scanner.
- Implement the thread queue scanner, but disable most of it for now, since we're not using the new scheduler.

svn path=/trunk/; revision=25630
2007-01-25 18:48:56 +00:00
Alex Ionescu 819a0ed90a - Use WinXP style /SOS output when enabled. (TODO: Display banner/memory/cpu).
- Make more init functions return TRUE/FALSE and bugcheck the system if they failed.
- Add more progress bar update calls.
- Merge MmInit2 and MmInit3 into MmInitSystem with different phase calls.
- Clear KeLoaderBlock after drivers have been loaded.
- Update kernel fun.
- Update symbolic names of certain strings in ntoskrnl.mc. Use WINDOWS_NT... instead of REACTOS because these names are documented and should be kept for cross-code compatibility.

svn path=/trunk/; revision=25629
2007-01-25 17:51:45 +00:00
Sylvain Petreolle bbf7047df5 compile intl_new using its includes, not intl's ones
svn path=/trunk/; revision=25628
2007-01-25 15:06:10 +00:00
Magnus Olsen 267904be80 revers r25623
Acdring to Sylvain Petreolle, spetreolle at yahoo.fr this is copy paste from windows xp cpl, it is not allown todo a copy paste of sentence from windows xp, he did compare it. 

svn path=/trunk/; revision=25627
2007-01-25 10:15:19 +00:00
Alex Ionescu 92208d72a8 - Implement KeUpdateSystemTime properly, it now saves and returns the old time, supports HAL time, as well as loops the timer list to fixup relative timers and expired timers after the time has changed.
- Replace mm failure detection code by dprint + while loop to avoid bugchecks which might make the error worse to see.
- Remove some deprecated code/functions and cleanup clock.c entirely.

svn path=/trunk/; revision=25626
2007-01-25 05:14:55 +00:00
Alex Ionescu 2691e0994a - Implement ObQueryTypeInfo and link it to NtQueryObject.
- Fix a bug in ObQueryNameInfo.
See issue #1993 for more details.

svn path=/trunk/; revision=25625
2007-01-25 01:50:40 +00:00
Alex Ionescu bdc7f65b2d - Rename KiSetSystemTime to KeSetSystemTime and enhance prototype for later use.
- Create Phase 1 initialization for the SRM (SeInitSystem). Right now it inserts the system boot token into object manager, which is something we forgot to do before.
- Renamed ExPhase2Init to Phase1Initialization, since it's not Phase 2.
- Updated Phase 1 PS Initialization to get the KeLoaderBlock pointer and use it as a context parameter when calling Phase1Initialization.
- Split off Phase1Initialization into Phase1InitializationDiscard, which is the bulk of the phase 1 code (99% of it) and can be put in an .INIT section to be freed after boot.
- Modify parts of the Inbv setup code. Also implement support for /SOS, and try to mimic its behaviour on NT (not fully achieved). You will need /SOS to see boot messages on the screen! FreeLDR now adds this by default to the "Debug "configuration.
- Temporarily disable ReactOS Banner during boot. We will get this data from the .mc/.res file in a later patch instead of hard-coding it.
- Optimize calling and usage of ExpLoadInitialProcess.
- Add support for Y2K bug fix documented for Windows NT (/YEAR).
- Add support to detect WinPE/MiniNT/ReactOS Live CD.
- Add temporary debugging code to MmInit2 and some Mm functions to detect if these functions are being used too early, which could result in catastrophic to subtle bugs.
- Add more bugchecks when failures occur, and enhance others. Also add more codes to ntoskrnl.mc.
- Disable calls to ObfDereferenceDeviceMap since it's not yet implemented.

svn path=/trunk/; revision=25624
2007-01-25 01:13:09 +00:00
Johannes Anderwald 3f65c90a12 - set svn eol-properties
- update translation by Heis Spiter heis underscore spiter at hotmail dot c o m
See issue #2000 for more details.

svn path=/trunk/; revision=25623
2007-01-24 20:27:50 +00:00
Alex Ionescu ddcd40d53c - Fix a bug, fix breakage from previous revision.
svn path=/trunk/; revision=25622
2007-01-24 19:54:51 +00:00
Alex Ionescu c307d73c12 - Fix ExInitPoolLookasidePointers and ExpInitailizeLookasideLists.
- Implement DbgLoadImageSymbols, Implement DebugService, and ExpLoadBootSymbols during phase 0 executive init to make KD load the symbols for all the boot drivers, and optionally breakpoint. Not yet useful since we don't have KD.
- Detect /BURNMEM and /PERFMEM and go all the way to determining the pages required, but warn the user that we don't support these flags yet.
- Detect FLG_KERNEL_STACK_TRACE_DB and FLG_ENABLE_EXCEPTION_LOGGING and warn that we don't support these yet.
- Add call to Cm to setup system variables, but disable until cm rewrite.
- Add PnP Manager initialization call and implement PnP Manager Phase 0 initialization (PiInitPhase0, PpInitializeDeviceReferenceTable), but this isn't used for now.
- Move MmInit2 to Phase 1 initialization, and initailize bootvid there as well.
- Add/Fix missing definitions, prototypes to NDK/NTIFS.

svn path=/trunk/; revision=25621
2007-01-24 19:48:34 +00:00
KJK::Hyperion 0e1ec5f828 * __cpuid, __rdtsc, __readmsr, __readpmc, __writemsr, __wbinvd, __readcr0, __readcr2, __readcr3, __readcr4: show me a fan of the extended inline asm syntax and I'll show you a SPARKLING FIST OF BURNING RAGE. Sprinkled __volatile__ liberally because there is no way to say "has side effects" OR "delete if outputs are ignored", only BOTH or NEITHER. This breaks Visual C++ compatibility ever so subtly. Tread carefully. THANK YOU GCC TEAM for keeping things interesting!
* __writemsr: pass 64-bit value with "A" constraint
 * __writecr0, __writecr3, __writecr4: "memory" clobber becase Visual C++ does, too

svn path=/trunk/; revision=25620
2007-01-24 19:07:19 +00:00
KJK::Hyperion d9a9b8a705 * __ll_lshift, __ll_rshift, __ull_rshift: fixed handling of 64-bit arguments and return values by forcing them to be passed as EDX:EAX. Finally generates decent code
* updated comments to reflect current state of the code

svn path=/trunk/; revision=25619
2007-01-24 18:01:34 +00:00
Sylvain Petreolle 2bf5cb7c4f add french resources
fix typos

svn path=/trunk/; revision=25618
2007-01-24 17:45:26 +00:00
KJK::Hyperion 9c1f53ca78 * _ReadBarrier, _WriteBarrier: defined as aliases for _ReadWriteBarrier. Alas
* __emul, __emulu: fixed to specify instruction length suffix
 * __rdtsc: removed "__volatile__" attribute from the inline asm. Hyperion recommends you fix your goddamn code instead
 * __emul, __emulu, __rdtsc, __readmsr, __readpmc: return 64-bit values with the "=A" constraint instead of horrible kludge

svn path=/trunk/; revision=25617
2007-01-24 16:53:44 +00:00
Alex Ionescu f1e71db26d - Rewrite kernel timer implementation to use Windows 2003's hash-based table timer model. Extremely scalable, since each timer list has its own lock, and optimized for speed since timers are hashed with the tick count at each update (timer.c).
- Implement a new timer expiration function which takes advantage of the fact that timers are now hashed with the system tickcount, and thus only parses the "hot" lists (dpc.c).
- Detect timer expiration during KeUpdateSystemTime and edit the KPRCB to notify of timer expiration. This will be picked up by the timer expiration DPC (clock.s).
- Add support for new timer code in dispatcher (wait.c, queue.c, ke_x.h).
- Change system startup to support the new timer DPC/list (krnlinit.c, clock.c).
- Remove corresponding entry from kernel fun, and update the guidance plan with recent successes and setbacks. This patch is likely the last big architectural change in the kernel except for enabling the new scheduler at a later time.

svn path=/trunk/; revision=25611
2007-01-24 06:50:28 +00:00
Alex Ionescu 991fe7200a - Fix a bug in NtSetTimer which was causing us to completely disregard the due time.
- kmtest now reports 0 failures for the extimer regression test.

svn path=/trunk/; revision=25610
2007-01-24 04:46:31 +00:00
Dominique Cote dd98a989eb Added test calls for function FsRtlMdlReadDev() and FsRtlMdlReadCompleteDev()
svn path=/trunk/; revision=25609
2007-01-23 23:12:32 +00:00
Alex Ionescu 2ef08cc69b - Fix reference count bugs in executive timer implementation.
- Don't modify status when failing due to an access fault (NT doesn't!).
- Do parameter checks before bothering with expensive SEHing.

svn path=/trunk/; revision=25608
2007-01-23 23:10:13 +00:00
Alex Ionescu 36433ba5ec - Fix some warnings.
- Rearrange some code.
- Remove useless/deprecated code.

svn path=/trunk/; revision=25607
2007-01-23 22:46:38 +00:00
Christoph von Wittich 4fc7465a8f replace _sleep with Sleep to fix the gcc 4.x build
svn path=/trunk/; revision=25606
2007-01-23 21:48:31 +00:00
Alex Ionescu 5c2e4f088a - Convert KxDelayThreadWait, KxSingleThreadWait, KxMultiThreadWait into macros.
- Add KxQueueThreadWait macro based on previous ones.
- Add KxSetTimerForThreadWait to initialize the timer during the macros above. Wait timer setup is now done in two phases, which will be required with the new timer code anyway.
- Remove IRQL hack from idle loop when delivering DPCs.
- Make the wait code use the new macros and make it scale better.
- Add some missing definitions to asm.h

svn path=/trunk/; revision=25605
2007-01-23 18:39:47 +00:00
KJK::Hyperion 85ffdc2193 Fixed:
- _ReadWriteBarrier
 - _InterlockedCompareExchange8
 - _InterlockedCompareExchange16
 - _InterlockedCompareExchange
 - _InterlockedCompareExchange64
 - _InterlockedCompareExchangePointer
 - _InterlockedExchange
 - _InterlockedExchangePointer
 - _InterlockedExchangeAdd
 - _interlockedbittestandset
 - _interlockedbittestandreset

This commit dedicated to Alex (sup Alex!)

svn path=/trunk/; revision=25604
2007-01-23 18:26:51 +00:00
Aleksey Bragin 12e90157e6 Alexey Zavyalov: Add functionally Numbers, Currency, Time, Date tabs. Fix some bugs.
See issue #1988 for more details.

svn path=/trunk/; revision=25603
2007-01-23 17:59:36 +00:00
Alex Ionescu 89056c2f7a - Fix MSVC breakage caused by recent modifications of cctypes.h.
- Remove structures from ntifs.h that shouldn't be there.
- Add support for optimized detection of a DOS device path \?? or \??\ and implement it into ObpLookupObjectName.
- Add support for proper re-parsing up to a maximum of 30 times to avoid reparse DOS attacks on the kernel.
- Set WIN32_WINNT version to Windows 2003 SP1.

svn path=/trunk/; revision=25602
2007-01-22 22:16:13 +00:00
Ged Murphy b5edfb619c - Fix the display of the radio buttons by using the Marlett font to draw the radio buttons instead of using Pie and Ellipse as Wine does. (ReactOS NtGdiPie and NtGdiEllipse need work anyway)
- The font is a bit messy at the moment, so it would be appreciated if any font designers out there could fix it.

svn path=/trunk/; revision=25601
2007-01-22 20:14:59 +00:00
Ged Murphy 182f879324 Don't substitute Marlett as TGMarlett is the file name, not the typeface name.
svn path=/trunk/; revision=25600
2007-01-22 19:42:16 +00:00
Christoph von Wittich 5d4a1b41e0 named pipes support for linux builds
svn path=/trunk/; revision=25599
2007-01-22 19:34:53 +00:00
Ged Murphy 87553c6cdd A temporary set of white cursors containing 1 bit and 32 bit variations.
I have some much better ones than these, but they are 32bit only. Making 1 bit versions of these (all ROS can handle at the moment) looked ugly. 32bit cursor support should be ready within the coming weeks.

svn path=/trunk/; revision=25598
2007-01-22 18:11:21 +00:00
Thomas Bluemel 4b97b271b9 Silence a warning
svn path=/trunk/; revision=25597
2007-01-22 17:52:47 +00:00
Saveliy Tretiakov f603122931 Fix bugs in IntLoadKeyboardLayout and make it work.
svn path=/trunk/; revision=25596
2007-01-22 17:08:34 +00:00
Johannes Anderwald a00e6038e9 - remove obsolete file
svn path=/trunk/; revision=25595
2007-01-22 10:43:18 +00:00
Sylvain Petreolle 85ff81ad42 fix warnings
svn path=/trunk/; revision=25594
2007-01-22 10:35:52 +00:00
Alex Ionescu b440bf6fae - Implement ExEnumHandleTable. Had to add a small hack due to some memory freeing/init problem that requires more investigation.
- Implement ObpEnumFindHandleProcedure.

svn path=/trunk/; revision=25593
2007-01-22 09:57:10 +00:00
Hervé Poussineau 50d8fb4688 Fix warnings and indentation
svn path=/trunk/; revision=25592
2007-01-22 09:48:26 +00:00
Hervé Poussineau e51baab788 Fix indentation
svn path=/trunk/; revision=25591
2007-01-22 09:46:01 +00:00
Sylvain Petreolle 17291b0214 fix case (2nd try)
svn path=/trunk/; revision=25590
2007-01-22 09:33:42 +00:00
Sylvain Petreolle 7b65b5fdf8 fix case
svn path=/trunk/; revision=25589
2007-01-22 09:24:42 +00:00
Johannes Anderwald 5e50203d9d - Italian translation by Daniele Forsi (dforsi at gmail dot com)
- fixes bug 1990
See issue #1990 for more details.

svn path=/trunk/; revision=25588
2007-01-22 09:14:32 +00:00
Alex Ionescu 19085f7dfd - Proper fix for the bug that 25558 attempted to fix. Kernel-mode registry handles now work (they didn't before 25558).
- Also the system now boots again since this fix is correct.

svn path=/trunk/; revision=25587
2007-01-22 08:46:56 +00:00
Alex Ionescu 3e42c58603 - Implement new ExHandle* implementation using pushlocks and the Windows 2003 HANDLE_TABLE structure and semantics. Only the currently used base APIs were implemented; support for audit masks still disabled, debug/tracing calls disabled.
- Remove manual overrides of NTDDI_VERSION all over the thread and set it once globally, since ExHandle* was the only non-updated package. The entire kernel now builds with Windows 2003 SP1 as a target.
- Remove this entry from kernel fun.

svn path=/trunk/; revision=25586
2007-01-22 08:15:17 +00:00
Alex Ionescu d1c966119b - Fix HANDLE_TABLE definition.
- Fix LPC bugcheck during 2nd stage setup and/or bootup (double-free):
- LpcReplyMessage and LpcWaitingOnPort are a union inside ETHREAD, and they can actually be both accessed in the same time! (Unlike other unions which are self-exclusive). Therefore, we need a way to:
  1) Mark a message vs a port.
  2) Retrieve the correct object.
 This has now been implemented with some helper inline functions.

svn path=/trunk/; revision=25585
2007-01-22 08:07:24 +00:00
Alex Ionescu a0d7a72c1a - Implement a cute little hack called DEFINE_WAIT_BLOCK which makes pushlocks work on GCC 3.4.5 as well as 4.1.2+ (with no perf-hit on the latter).
- Implement ExWaitForUnblockPushLock (just a wrapper around ExTimedWaitForUnblockPushLock).
- Simplfy ExBlockPushLock and fix some bugs.
- Fix a bug in ExfReleasePushLockExclusive when we have to wake the lock.
- Fix a bug in ExfUnblockPushLock which was touching the wrong pointer.
- Fix ExWaitOnPushLock to verify that the pushlock is actually locked.

svn path=/trunk/; revision=25584
2007-01-22 06:47:44 +00:00
Christoph von Wittich 2f75cefc88 some more warnings fixes (gcc 4.2)
svn path=/trunk/; revision=25583
2007-01-22 03:00:02 +00:00
Thomas Bluemel 4410a2013e This is the last fix for GCC4.2. Now everything can be built with -O3
svn path=/trunk/; revision=25582
2007-01-21 23:54:59 +00:00
Johannes Anderwald 3b4ec883fa - define msvc compabitble debug macro
- fix error in debug print

svn path=/trunk/; revision=25581
2007-01-21 23:29:12 +00:00
Thomas Bluemel 80513cb036 Fix compilation with GCC4.2. Please check changes in CreateProcessInternalW for correctness!
svn path=/trunk/; revision=25580
2007-01-21 23:29:10 +00:00