- Rewrote wait code. It is now cleaner, more optimized and faster. All waiting
functions are now clearly differentiated instead of sharing code. These functions
are called up to a dozen times a second, so having dedicated code for each of
them is a real boost in speed.
- Fixed several queue issues, made a dedicated queue wait/wake function (you are not
supposed to use KeWaitFor on a queue, and this is also a speed boost), and make it
compatible with new wait code.
- Optimized Work Queue code to be much smaller and better organized, by using an
array instead of hard-coded multiple static variables. Also, add support for the
real NT structures and implementation, paving the road for Dynamic Work Items, which
also have timeouts, and deadlock dection + debug info.
- Simplified PsBlockThread and made it compatible with wait code.
- Added support for priority boosting when unwaiting a thread; will use later, as well
as put proper boosting for dispatch objects.
- Inlined all dispatcher lock functions and header initialization for speed.
- Moved executive wait code into ob.
svn path=/trunk/; revision=14047
Dispatcher Objects Rewrite (minus Queues, coming in next patch).
Global Changes:
- Use KOBJECT enumerations for all objects, remove obsoleted ros-internal enumeration.
- Reformatting, commenting, and addition of Debug Prints for easier debugging
- Properly create Executive Objects. They don't need a creation routine.
- Make sure to properly lock and release the Dispatcher Database.
Mutex/Mutant:
- Correct MUTANT_BASIC_INFORMATION
- Return previous state in Kernel Functions, intead of 1 or 0 all the time.
- Initialize listhead properly
- Removed code duplication between mutant and mutex release.
- Fix bugs in release
- Add proper exeption if the mutex is not owned.
Kernel Queues:
- Optimize the code
- Use Inserted Flag
Timers:
- Some changes in setting the default data to allow KiInsertTimer to be called internally
by the wait code in the next patch.
Events:
- Optimize and simplify KeInitializeEvent
- Implement KeInitializeEventPair
- Fix KePulseEvent. It was completely messed up and also used unneeded Interlocked function.
- Fix KeResetEvent. It was not locking the dispatcher lock but using Interlocked.
- Fix KeSetEvent. It was not differentiating between Notification and Sycronization events
and also signaling the Event even if nobody was waiting on it.
Semaphores:
- Fix KeReleaseSemaphore. It was not checking if nobody was waiting on it before unwaiting the thread.
- Fix not releasing dispatcher database before raising an exception.
- Add check to NtCreateSemaphore to make sure the counts make sense.
Event Pairs:
- Remove Thread Event Pair. They are only used for NT4 QuickLPC which is obsoleted.
- Use KeInitializeEventPair
svn path=/trunk/; revision=14045
- Fix implementation of NT Profile Objects. Structures are guesses, but seem pretty close to the NT ones... a lot of stuff based on David Welch's old implementation, but simplified the way profiles are managed extensively, and also using the same buckethash mechanism as NT, this is required for compatibility with Nt Native APIs that use Profile Objects.
- Removed KDBG internal profile management and associated files. I will re-write the Profiler to use NT Profile Objects, which will allow us more extensibilty while profiling and also greater compatibility with NT.
svn path=/trunk/; revision=14022
Lock the registry while accessing sub keys of a key object.
Implemented a worker thread which removes all unused key objects.
Fixed a bug which shows keys twice if a key is already opened.
svn path=/trunk/; revision=14017
- implement generic executive handle tables (since there don't exist documents that describe the parameters of most of these functions (which are kernel internal only), i made them up as required)
- adjusted OB's handle manager to use ex handle tables
- adjusted the client id manager to use ex handle tables
svn path=/trunk/; revision=14007
Make the mouse less choopy.
But it still choopy. It need implement real buffer.
instead it being fild when it is call.
Fix the buffer seq are in right order.
svn path=/trunk/; revision=14004