From: Jarmo M. <jm...@ho...> - 2002-06-02 20:41:30
|
Hello, I've been reading this list for a while. I thought that I could comment about designing. I learned UML two weeks ago and now I am trying different UML CASE tools. Enterprise Architect is the best one I've tried so far. I drew two versions of ROS modules. One version is based on the idea that every supported subsystem (Win32, OS/2, Posix, etc) has its own module. Other version which doesn't have Win32 subsystem. If Win32 is in its own module, this means that gdi32.dll, kernel32.dll, user32.dll and others would be very thin. They just call functions in ROS kernel module. Usually just calling equivalent function in kernel. This would add small overhead to every Win32 API call. For example int MessageBox( ... ) { return RosMessageBox( ... ); } RosMessageBox would do the hard work (my imaginary name for the function). ROS functions should be compatible with Win32 API because of the speed i.e. the parameters and return values should be the same as in the same Win32 function. Some APIs could be changed for simplicity and for other issues such as better supporting other OSes. The OS/2 subsystem would call the same function(s) in kernel. int WinMessageBox( ... ) { // translate parameters before the call int result = RosMessageBox( ... ); // translate result return result; } Remember to map error codes! I understand that the above idea is dropped. Files like user32.dll are moved to ReactOS kernel module. Win32 applications calls the function as usual, but now the user32.dll does the hard work. OS/2 application links with their usual libs, but the libs calls user32.dll and such. This approach might be a problem for some APIs. int WinMessageBox( ... ) { // translate parameters before the call // call user32.dll int result = MessageBox( ... ); // translate result and map error code return result; } Both designs has their advantages and disadvatages. Anyway, I think that the Win32 module includes is better one. It has more capacity to get better. NT has layers in which API calls lower level and which may call lower level. Does it actually hurt so much if there is an extra level which does so little? But on the other hand, you get more speed to Win32 apps if user32.dll etc does the job without extra call. Attached is both of the designs. JMu |