[ros-kernel] Commits to subsys/win32k

Thomas Weidenmueller thomas at reactsoft.com
Thu Jul 8 21:57:28 CEST 2004


Some of you may already know, I've been working on a win32k redesign of 
the user object stuff for a couple of weeks already. This redesign does 
not affect the GDI as it is implemented at the moment. If you make 
changes to our win32k, please do try to merge your commits to any file 
in subsys/win32k with the branch "win32k_user_reconstruction" (without 
quotes). If you can't find a file (especially header files in 
subsys/win32k/include),  I may have removed it and merged it's content 
into the file internal.h. Please keep the following in mind if you work 
on win32k and plan to merge your changes to the 
"win32k_user_reconstruction" branch:

- Almost none of the code in this branch is tested, it needs serious 
work until it boots ReactOS again. I'd appreciate any help in getting 
the basics working again, It's really a bunch of work and I'm propably 
not able to fix all of the problems.
- I had to delete quite a bunch of code and entire implementations (e.g. 
accellerator tables and menus), they need to be re-implemented to fit 
into the new design.
- If you commit changes in the subsys/win32k/ntuser directory, make sure 
that NtUser* functions should only be implemented in the file ntuser.c. 
This is done for the most functions already, except those in desktop.c 
and winsta.c. I'll change them to the new model this weekend.
- The NtUser* functions should ONLY be called from usermode, thus do NOT 
call NtUser* functions from internal code
- My new design eliminates all user object handles (not yet GDI handles) 
from the internal structures and functions, therefore handles should 
only be translated directly inside the NtUser* functions. There may be 
one or two exceptions for message callbacks to umode. So please do not 
store or use user object handles in internal functions named other than 
NtUser*.
- There are now global locks (ntuser/userlock.c) for user mode objects 
to avoid thousands of lockings all the time. These global locks are 
going to be  per window-station instead of session-wide. Make sure you 
do a shared or exclusive lock BEFORE translating a user object handle. 
If you create a user object handle or change any information in or 
related to user objects, you should acquire an exclusive lock, otherwise 
you may use a shared lock. If possible, only acquire/release the locks 
directly inside the NtUser* functions (there may be an exception for 
before and after doing a callback to umode to prevent dead-locks).
- Please make use of the handy macros in the ntuser/ntuser.c file if you 
(re)implement a NtUser* function, this makes it easier to modify things 
easily. They're defined in the top of the file.
- Please contact me, in case you have questions or don't know how to 
merge your code.

The purpose of this redesign is to make the user interface quite a bit 
faster than it is right now. Another goal is to clean up all the code 
and eventually remove all object handles out of the internal stuff 
(except the GDI ones of course).

If you have any suggestions or questions, just contact me or reply to 
this email on the mailing list.

Best Regards

Thomas


More information about the Ros-kernel mailing list