I've seen a number of commits along the lines of sginsberg r41986 - this changes Iof* and Obf* functions to use Io* and Ob* instead. Is there any information you can provide on why these changes are needed? Specifically, there was another commit a while back which made it seem like there is a lot of duplicated code around - maybe some for booting, some for the installer, and some for the kernel, and maybe more for userspace?
I guess I don't know what I'm asking yet so no need for a long-winded essay yet, but fundamentally why are there two functions with the same functionality so that you can just remove the "f" in the name and it continues to work?
Obf / Ob and similar
Moderator: Moderator Team
Re: Obf / Ob and similar
Dont expect him to explain this here. Instead, better join #reactos channel and ask the commiter: Stefan100 himself
-
- Developer
- Posts: 34
- Joined: Thu Apr 07, 2005 12:49 am
Re: Obf / Ob and similar
Obf and Iof are Fastcall versions of the Ob/Io functions. They are only available on x86 and are an optimization to reduce the stack space of callers (since internally, on x86, an Ob/Io call will go to Obf/Iof, saving 8 precious bytes of stack, and reducing the number of cycles required). On other platforms, Obf/Iof do not exist, so calling them directly is incorrect. Calling Ob/Io on x64/ARM will result in a call to Ob/Io, while calling Ob/Io on x86 will result in a call to Obf/Iof. Calling Obf/Iof on x86 would yield the same result, but would break on x64, since Obf/Iof are not defined. In either case, it's always the same function -- the question is to how it's exported and macroed (defined). Stefan, which I believe is involved with ARM porting work, was trying to make the calls portable.
I believe the Windows Internals book covers this...
I believe the Windows Internals book covers this...
Re: Obf / Ob and similar
I knew if I left it here long enough, someone would at least provide a hint Cheers!
Who is online
Users browsing this forum: No registered users and 10 guests