Difference between revisions of "Win32k.sys"

From ReactOS Wiki
Jump to: navigation, search
(Link to design guideline)
 
(24 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Outdated}}
+
{{stub}}
'''See [[Arwinss]] page for the alternative win32 subsystem implementation effort.'''
+
'''Kernel-mode subsystem server (Win32K)'''
  
'''See also [[Win32k_design_guideline]]'''
+
The Graphics Device Interface Provides functionality for outputting graphical content to monitors, printers and other output devices. It resides in gdi.exe on 16-bit Windows, and [[gdi32.dll]] on 32-bit Windows in user-mode. Kernel-mode GDI support is provided by <code>win32k.sys</code> which communicates directly with the graphics driver.
  
Rewrite suggestions
+
{{Code history|subsystems/win32/win32k}}
  
* A special heap manager for the objects to be stored on the (shared) desktop heaps.
+
== See also ==
* Input processing (in progress due to [[i8042prt]])
+
* [[Arwinss]] page for the alternative win32 subsystem implementation effort.
* Text rendering
+
* [[Win32k design guideline]]
* manage multiple user sessions (see terminal services)
+
* [[Csrss.exe|User-mode subsystem server]]
 +
* [[wikipedia:Windows API#Overview]]
  
 
+
[[Category:Development]]
Rewrite / reworking plan by hardon and w3seek:
+
[[Category:Drivers]]
 
+
[[Category:System Services]]
* Use one win32k.USER global read/write lock (ERESOURCE). No other lock should be used! This essentially makes win32k.USER singlethreaded. This is how Windows does it also, so the perf. should be ok.
 
 
 
* Use shared desktop heap mapped into each User process. This makes perf. even better. The code interaction with the shared heap in user32.dll will only be one/two functions, so at first we may use a slow path to win32k and later when we impl. the shared heap we only change one/two funcs, like seen below:
 
 
 
  RECT GetWindowRect(hwnd)
 
  {
 
    Wnd = GetWnd(hwnd);
 
    return Wnd->Rect;
 
  }
 
 
 
  /*initial*/
 
  Wnd GetWnd(hwnd)
 
  {
 
    return NtUserGetWindow(hwnd);
 
  }
 
 
 
  /*final*/
 
  Wnd GetWnd(hwnd)
 
  {
 
    e = LoockupHandleEntryInSharedHeap(hwnd);
 
    return e->Wndptr;
 
  }
 
 
 
* DONT use callbacks to umode! This makes programming win32k much easier since we dont have to worry about what has changed in win32k after returnig from a callback (and tons of other calls reentering win32k in the mean time).
 
 
 
* Dont rely on Windows NtUserXxx names! Those names only pollutes our impl. and makes us think we should impl. stuff in win32k, just because a function NtUserXxx exist.
 
 
 
* Move scrollbars to umode
 
 
 
* <w3seek_> also one major waste of resources is that right now everytime you move the mouse or type something on your keyboard we wake _all_ waiting threads and only one gets through ;) the thread that gets through first checks who the message belongs to and moves it to the appropriate message queue and wakes that thread.
 

Latest revision as of 07:57, 15 May 2014

The page Win32k.sys is a short article on something that should have a lot more information written on it.
If you know anything else about it, you are STRONGLY encouraged to add the information in. If you are unsure of proper formatting or style, add it to the talk page or this page itself as you think best and others will help.


Kernel-mode subsystem server (Win32K)

The Graphics Device Interface Provides functionality for outputting graphical content to monitors, printers and other output devices. It resides in gdi.exe on 16-bit Windows, and gdi32.dll on 32-bit Windows in user-mode. Kernel-mode GDI support is provided by win32k.sys which communicates directly with the graphics driver.

Commit history (Source code can be found in: /reactos/subsystems/win32/win32k)

See also