Commit graph

23591 commits

Author SHA1 Message Date
Thomas Bluemel
f0b7c5e2d6 Fix compilation
svn path=/trunk/; revision=25525
2007-01-19 01:05:44 +00:00
Christoph von Wittich
d5a1f83701 fix some warnings (gcc 4.2 on Linux x64)
svn path=/trunk/; revision=25524
2007-01-19 01:00:06 +00:00
Thomas Bluemel
ff8132912c Fix freeing memory
svn path=/trunk/; revision=25523
2007-01-19 00:23:48 +00:00
Thomas Bluemel
0c3e4dc99b Move the "Computer Name" page to netid.dll
svn path=/trunk/; revision=25522
2007-01-19 00:09:21 +00:00
Thomas Bluemel
717f760ac7 set eol-style to native
svn path=/trunk/; revision=25521
2007-01-18 23:42:21 +00:00
Andrew Greenwood
8a64d7ef61 PC speaker MIDI driver (see README.TXT for info)
Tested on Windows XP but should be compatible with ReactOS


svn path=/trunk/; revision=25520
2007-01-18 23:26:30 +00:00
Johannes Anderwald
f8edfc8d99 - forgot these changes in my local svn
- generating dependency map works
- results can be viewed with XSL capable browser

svn path=/trunk/; revision=25519
2007-01-18 22:37:10 +00:00
Magnus Olsen
0cb4e210e1 Fixing another bug in converting
PPC 
stwu r1,-32(r1) 

equal with intel
mov [esp-32],esp; 
mov esp, esp - 32; 

svn path=/trunk/; revision=25518
2007-01-18 22:09:08 +00:00
Magnus Olsen
a286bd796f Adding stwu to converting to ia32
fixing some smaller bug when it was disabmler
fixing dymatic translations of abi for ppc and ia32


svn path=/trunk/; revision=25517
2007-01-18 21:35:48 +00:00
Thomas Bluemel
9ea6afafc7 Merge 3 STATICs together
svn path=/trunk/; revision=25516
2007-01-18 21:09:56 +00:00
Johannes Anderwald
62b03bfff8 - dutch translation by Eric Janssen (janssuhhh@gmail.com)
See issue #1989 for more details.

svn path=/trunk/; revision=25515
2007-01-18 20:22:56 +00:00
Magnus Olsen
36a8eccf27 Implement disambler for stwu, left todo add it to the Converter
svn path=/trunk/; revision=25514
2007-01-18 19:33:48 +00:00
Christoph von Wittich
4e16032857 fix some warnings
svn path=/trunk/; revision=25513
2007-01-18 17:12:49 +00:00
Thomas Bluemel
bdce0f47d1 Use comctl32's syslink control, no need to reinvent the wheel
svn path=/trunk/; revision=25512
2007-01-18 16:37:30 +00:00
Magnus Olsen
e6cfb666ca Fixing some ppc disambler bugs. Li are not 100% test it can contain some fault.
Fixing Li bug the register for dest was wrong calctions see file OpCodePPC.txt.
fixing some meaing in ReadMe.txt


svn path=/trunk/; revision=25511
2007-01-18 15:40:37 +00:00
James Tabor
fd1467e3a2 Add Arc.c to win32k. See gdi32 painting.c for more info.
svn path=/trunk/; revision=25508
2007-01-18 13:56:58 +00:00
Magnus Olsen
48cd2b3e75 Expain how the bit order works and how get the opcode. The IBM and freescale manual for ppc cpu are not good expain it.
now I got less headic, and got understainf how to decoding the manual and how the opcode are store. 
  

svn path=/trunk/; revision=25507
2007-01-18 13:43:17 +00:00
Magnus Olsen
4da115c6b5 Adding a opcode list, which opcode we are supportin convert from
svn path=/trunk/; revision=25506
2007-01-18 12:04:24 +00:00
Sylvain Petreolle
d245564623 fix gcc4 build
svn path=/trunk/; revision=25505
2007-01-18 11:13:43 +00:00
Alex Ionescu
9522e0a02b [25 bug fixes]:
- Implement KeReadStateThread.
- Fix PspTerminateProcess to handle case where there's no threads in the process.
- Fix check in PspTerminateProcess. ObClearProcessHandleTable gets called if there's a debug port, not if there's an object table.
- Simplfy PspReapRoutine.
- Fix PspExitThread to wait for all other threads before continuing to kill the last thread. Should fix lots of race/wait conditions.
- PspExitThread should check for !DeadThread and not !Terminated before determining if it should free the TEB. Also, the DbgK handle should only be closed if the thread isn't already dead.
- Fixup formatting of some code to warn less on MSVC.
- Fail various APIs if acquiring rundown protection failed.
- Fix Process Quantum/Priority settings.
- Grant PROCESS_TERMINATE by default.
- Add PROCESS_SET_INFORMATION, STANDARD_RIGHTS_ALL and PROCESS_SET_QUOTA to the default process granted access mask.
- Initialize process/thread/image notification callbacks durin phase 0 Ps initialization.
- The Audit Name belongs to the system process, not the idle process.
- Detect more failures in phase 0 startup.
- Fix various race conditions/incorrect checks in ps/security.c related to impersonation information. Also allow PspAssignPrimaryToken to be called directly with the token pointer and not only the handle.
- Wrap system thread startup stub in SEH and write a SEH filter function to print out debug information when a system thread dies unexpectedly.

svn path=/trunk/; revision=25504
2007-01-18 09:44:49 +00:00
Alex Ionescu
ccee43a360 - Fix __rdtsc so it's considered volatile by GCC instead of caching it.
- Add NtInitialUserProcessBuffer settings and validate/user them when launching smss.
- Use SePublicDefaultUnrestrictedSd for the root system link.
- Make enough space for the smss process parameters, there's 6 strings, not 4.
- Fix incorrect length of NtSystemRoot string.
- Disable SYSENTER on CPUs that don't support it.
- Detect and enable NX feature bit.
- Detect and enable DTS support.
- Implement Ki386EnableXMMIExceptions (the XMMI handler still needs to be done, however).
- Implement KiI386PentiumLockErrataFixup to work around the F00F bug.
- Implement KiIsNpxErrataPresent to detect the FDIV bug.
- Implement CPU Speed detection.
- Only setup Initial FX State if the CPU supports FXSR.
- Setup some more PCR fields during init.
- Use NX_SUPPORT_POLICY flags documented in ntddk.h
- Don't boot if CMPXCHG8B is not supported by the CPU. This is the same requirement as Windows.
- Don't overwrite all the PRCB locks in KiInitSpinlocks due to a stupid bug in the timer spinlock initialization.

svn path=/trunk/; revision=25503
2007-01-18 06:23:14 +00:00
Alex Ionescu
8be76ffcb3 - Remove hack from KiSetPriorityThread. Now it doesn't dispatch threads anymore, but this cleans up the IRQL/Dispatcher hack (it will still insert the higher priority thread in the right queue though, so there's not much visible change, just that priorities suck a bit more -- but this is temporary).
- Guard some more code with #ifdef NEW_SCHEDULER.
- Fix bugs in KiDispatchInterrupt.
- Use PRCB fields instead of PriorityListHead/PriorityListMask to reduces number of code changes between NEW_SCHEDULER and old.
- Fully implement KiDeferredReadyThread, but only for Uni-Processor systems. Supports unwait boosts as well as lock boosts. Not yet used.
- Implement NEW_SCHEDULER version of KiSwapThread and NtYieldExecution.

svn path=/trunk/; revision=25502
2007-01-17 21:53:45 +00:00
Alex Ionescu
a04cac242c [10 bug fixes]:
- Simplify KiSelectReadyThread.
- Use ASSERT_IRQL_EQUAL instead of ASSERT_IRQL, because ASSERT_IRQL is braindead and doesn't actually do what the name proposes. This caused us to miss many critical bugs.
- Don't lower IRQL to PASSIVE_LEVEL after KeInsertQueueApc. This caused a call to KiExitDispatcher at PASSIVE, which is completely fucked. Also do the same fix in KeFreezeAllThreads and KeThawAllThreads.
- Implement code in KiDispatchInterrupt to switch to a new thread, but don't enable for now.
- Fix the KiMask32Array. One of the values was totally off and screwed up priority/affinity masks.
- Exit the dispatcher in KiAdjustQuantumThread. This wasn't done, thus causing a weird system state.
- Fix a bug in KiSetPriorityThread which wasn't properly checking the ProcessReadyQueue member and thus not applying priority changes.
- Fixup lock release and dispatcher exit in wait functions in the NoWait case. It was inverted and messed up, leading to system inconsistency.

svn path=/trunk/; revision=25501
2007-01-17 20:44:37 +00:00
Magnus Olsen
22033f60ea fixing dymatic abi for ppc, and implement a dymatic abi even for ia32 converter
svn path=/trunk/; revision=25500
2007-01-17 20:25:46 +00:00
Magnus Olsen
3f44d73a4b fixing count how many reg we are using. so we can setup a frame pointer
svn path=/trunk/; revision=25499
2007-01-17 18:47:08 +00:00
Magnus Olsen
d1aa0d32ae Adding m68k,arm,ia32,ppc to ppc convert.
Remove the old disambler list from ppc to ppc 
implement new ppc to ppc disambler that are allot better at end. 

svn path=/trunk/; revision=25498
2007-01-17 17:35:18 +00:00
Magnus Olsen
65747168ef fixing a bug did write end code for frame pointer that we do not have
tempary fix, we can not optimize code so good yet. so if it more that 4 register same time we are using own frame, ebx is working as our ebp for we already resvert  the ebp 

svn path=/trunk/; revision=25497
2007-01-17 16:23:39 +00:00
Magnus Olsen
af42a0cc24 fixing the ppc to ia32 break, use ebx as ebp if we got to many register.
svn path=/trunk/; revision=25496
2007-01-17 15:31:47 +00:00
Magnus Olsen
69999a5ad4 This break the ppc disambler support and convert to ia32, temporary
I change the desgin lite to preopare the ia32 to ppc 

svn path=/trunk/; revision=25495
2007-01-17 15:02:43 +00:00
Aleksey Bragin
60fc740a7d Delete 100 files which are completely unneeded in order to statically compile expat library (full source code is located in the vendor branch).
svn path=/trunk/; revision=25494
2007-01-17 12:42:43 +00:00
Alex Ionescu
c696d66532 - Simplify KiSelectReadyThread.
- Disable KiSetAffinityThread to do nothing else but change affinity instead of doing re-scheduling (temporary change).
- Cleanup KiQuantumEnd to prepare for new scheduler.
- Fix up a large bug in KeInsertQueueDpc which was making every DPC become a Threaded DPC due to a bad assignment-instead-of-compare.
- Copy KiSelectNextThread for new scheduler branch, without SMT support.
- Fix a bug in KiAdjustQuantumThread under new scheduler.
- Re-implement KiSetPriorityThread under new scheduler, leave hacks for current scheduler support.
- Remove old testing assert from KiExitDispatcher.

svn path=/trunk/; revision=25491
2007-01-17 01:56:15 +00:00
Alex Ionescu
c15d054bad [22 bug fixes]:
- Make KiComputeNewPriority accept various priority adjuments instead of always assuming an increase of 1 priority level.
- Fix ASSERT in KeSetEventBoostPriority: API is valid *only* for Synchronization events, not notification ones.
- Use proper KiComputeNewPriority call in KeSetEventBoostPriority, since we're not adjusting by 1.
- Make sure the FreezeCount is also 0 in KeAlertResumeThread, before signalling the suspend semaphore.
- Simply alert-mode check in KeAlertThread.
- Don't exit the critical region in KeFreezeAllThreads, it needs to be held.
- Don't enter a critical region in KeThawAllThreads, it should already have been entered; release it after thawing is complete.
- Also change the list loop in these functions to always start with the first thread.
- Copy over boost-disable flag in KeStartThread.
- Don't acquire the dispatcher lock in KeTestAlertThread.
- Set the KernelStackResident flag to TRUE in KeInitThread.
- Fix KeSetIdealProcessorThread to check the CPU is valid on the system, not valid across all valid CPU numbers. Also fix it to compare affinity, not processor.
- Fix KeSetBasePriorityThread to properly call KiComputeNewPriority with an adjustment of 0, and then properly manually adjust with the delta between the new base priority and the old base priority.
- Also normalize the new priority if it's too low.
- Always set the priority decrement back to 0 when KeSetPriorityThread is called.
- Normalize the priority in KeSetPriorityThread if it falls too low.
- Fix process stack count check in KeTerminateThread.
- Acquire thread and PRCB lock in KiAdjustQuantumThread.
- Use KiComputeNewPriority in KiAdjustQuantumThread.
- Dispatch a new thread in KiAdjustQuantumThread to take into account the new scheduler settings.
- Thread priorities should make more sense now...

svn path=/trunk/; revision=25490
2007-01-16 20:49:40 +00:00
Thomas Bluemel
dde6333e88 Fix difference in signedness warnings
svn path=/trunk/; revision=25489
2007-01-16 18:55:06 +00:00
Ged Murphy
6c5af8a927 improve cursor loading code
svn path=/trunk/; revision=25488
2007-01-16 18:30:54 +00:00
Alex Ionescu
14060f6c04 - Reimplement Process/Thread/Image notification callbacks by using the new executive lightweight callback implementation.
- Remove corresponding entry from kernel fun.

svn path=/trunk/; revision=25486
2007-01-16 15:09:53 +00:00
Alex Ionescu
b7e3f88937 - Implement ExCompareExchangeCallBack. The CallBack implementation is now ready for testing.
svn path=/trunk/; revision=25485
2007-01-16 14:20:19 +00:00
Alex Ionescu
1ef7c86725 - Implement ExReferenceCallBackBlock and ExDereferenceCallBackBlock.
- Code is very similar to Ob* Fast Referencing, and the use of macros to encapsulate generic referencing should be done later. Essentially, Ob sticks ObRefs around FastRefs, while ExCallbacks sticks ExRundown around FastRefs.

svn path=/trunk/; revision=25484
2007-01-16 07:20:16 +00:00
Alex Ionescu
9416d6ffa4 - Start partial implementation of Executive Lightweight Callbacks: ExAllocateCallBack, ExInitializeCallBack, ExFreeCallBack, ExWaitForCallBacks, ExGetCallBackBlockRoutine, ExGetcallBackBlockContext, ExDoCallBack.
- Stub ExReferenceCallBackBlock and ExDereferenceCallBackBlock until I get the locking right.
- These callbacks are used by Cm as well as Ps inside Windows NT and combine the power of PushLocks, Rundown Protection and Fast Referencing to ensure callbacks only get called once and thread safely. Not yet used in ROS.

svn path=/trunk/; revision=25483
2007-01-16 05:31:05 +00:00
Alex Ionescu
b51d473275 - Large cleanup of exported callback implementation. It was my first code to ReactOS and quite messy.
- Make code use standard NT structures.
- Fix object type initialization.
- Fix calls to ExCreatecallback during system initalization which were randomly overwriting memory.
- Fix ExREgisterCallback which was allocating only a pointer inside of the entire structure, also over-writing system memory.

svn path=/trunk/; revision=25482
2007-01-16 04:16:31 +00:00
Alex Ionescu
532a28a03c - Fix major bugs in the definition of _KTHREAD inside the NDK. I made some stupid assumptions when reading the .pdb dump data. _KTHREAD should now be the right size and structure as Win 2003. (the reason this bug wasn't more evident was because we were using 1-byte packing and a "padding" field. this has now been removed).
svn path=/trunk/; revision=25481
2007-01-16 02:40:41 +00:00
Alex Ionescu
73d8fac4c0 - Simplify KiWaitTest.
- Add _ADJUST_REASON
- Reformat some ke_x.h wait macros to use simpler/shorter variable names.

svn path=/trunk/; revision=25480
2007-01-16 02:24:19 +00:00
Alex Ionescu
ce501f07c6 - Fix insertion of special APC into APC delivery list.
- Re-identize some APC code (just formatting change).
- Detect APC during GateWait. Previous check scanned for DeferredReady, which is incorrect.
- Simplfy KeremovequeueApc to take advantage of the fact RemoveEntryList now returns whether the list is empty or not.

svn path=/trunk/; revision=25479
2007-01-16 01:27:36 +00:00
Ged Murphy
5b7abf2e8a don't leak a bitmap object if we fail to allocate memory
svn path=/trunk/; revision=25478
2007-01-16 00:08:41 +00:00
Ged Murphy
138ba142b5 use IC instead of DC
svn path=/trunk/; revision=25477
2007-01-15 23:37:44 +00:00
Ged Murphy
01ee458c11 revert r25474
svn path=/trunk/; revision=25476
2007-01-15 23:33:01 +00:00
Ged Murphy
1e1efd9791 - implement correct alpha blending of icons
- pixel bits must be pre-multiplied with the alpha channel
- along with the previous LookupIconIdFromDirectoryEx, basic alpha blending is working. some bugfixing is still required.

svn path=/trunk/; revision=25475
2007-01-15 23:25:35 +00:00
Ged Murphy
743b67a342 silence debug message
svn path=/trunk/; revision=25474
2007-01-15 23:23:29 +00:00
Alex Ionescu
4f9b8acb4d - Fix locking bugs in guarded mutex implementation. In race conditions some operations were not re-attempted.
- Fix some other logic bugs, including a serious bug in KeTrytoAcquireGuardedMutex which inversed the result.

svn path=/trunk/; revision=25473
2007-01-15 21:34:36 +00:00
Alex Ionescu
2e03cf0bb5 - Fix several bugs in the rundown protection implementation, mostly related to incorrect loop restarting in case of a race condition.
- The rundown event is a sync event, not a notification event.
- Only take slow path when waiting for release if the value changed *and* is still not active, not if only one of the two is true.

svn path=/trunk/; revision=25472
2007-01-15 21:12:32 +00:00
Alex Ionescu
6b4b2a47a3 - Add KeAreAllApcsDisabled to DDK.
[4 bug fixes]:
- Setup default GrantedAccess for system init thread/process in ObInit.
- Fix a small bug in ObpReapObject.
- Set object header flag is deletion was done deferred.
- Simplify ObpDeferObjectDeletion.
- Use KeAreAllApcsDisabled instead of only checking IRQL to determine if we should do defered deletion.

svn path=/trunk/; revision=25471
2007-01-15 20:54:40 +00:00