From: SourceForge.net <no...@so...> - 2010-09-20 06:53:49
|
Bugs item #3071698, was opened at 2010-09-20 08:53 Message generated for change (Tracker Item Submitted) made by ravriel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=622063&aid=3071698&group_id=98788 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Daemons (Windows) Group: v0.7.x (release) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ron Avriel (ravriel) Assigned to: Nobody/Anonymous (nobody) Summary: Inaccurate co_div64() Initial Comment: co_div64() is inaccurate. For example, co_div64(0x100000000,0x10000000) returns 15 instead of 16. co_div64(0x1000000000000,0x10000000) returns 983055 instead of 1048576. As an alternative, I suggest using http://www.linuxhq.com/kernel/v2.5/75/lib/div64.c that returns both the result and the remainder, both needed in time calculation. Another option is to use Windows native divide operator. Why do we need to implement it if it already exists? Thanks, Ron ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=622063&aid=3071698&group_id=98788 |
From: SourceForge.net <no...@so...> - 2010-09-20 20:08:31
|
Bugs item #3071698, was opened at 2010-09-20 08:53 Message generated for change (Comment added) made by henryn You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=622063&aid=3071698&group_id=98788 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Daemons (Windows) Group: v0.7.x (release) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ron Avriel (ravriel) Assigned to: Nobody/Anonymous (nobody) Summary: Inaccurate co_div64() Initial Comment: co_div64() is inaccurate. For example, co_div64(0x100000000,0x10000000) returns 15 instead of 16. co_div64(0x1000000000000,0x10000000) returns 983055 instead of 1048576. As an alternative, I suggest using http://www.linuxhq.com/kernel/v2.5/75/lib/div64.c that returns both the result and the remainder, both needed in time calculation. Another option is to use Windows native divide operator. Why do we need to implement it if it already exists? Thanks, Ron ---------------------------------------------------------------------- >Comment By: Henry N. (henryn) Date: 2010-09-20 22:08 Message: What is "native divide operator"? If you means the "/", then the answer is simple: GCC will call a function __div... from external "libc.so", that we don't can do from inside linux.sys Windows kernel driver. http://www.linuxhq.com/kernel/v2.5/75/lib/div64.c: This function returns always 0 for your testing numbers. "__div64_32" from kernel 2.6.33 works. http://www.linux-m32r.org/lxr/http/source/lib/div64.c?v=2.6.20-rc1#L26 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=622063&aid=3071698&group_id=98788 |
From: SourceForge.net <no...@so...> - 2010-10-20 00:26:06
|
Bugs item #3071698, was opened at 2010-09-20 08:53 Message generated for change (Comment added) made by henryn You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=622063&aid=3071698&group_id=98788 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Daemons (Windows) Group: v0.7.x (release) >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Ron Avriel (ravriel) Assigned to: Nobody/Anonymous (nobody) Summary: Inaccurate co_div64() Initial Comment: co_div64() is inaccurate. For example, co_div64(0x100000000,0x10000000) returns 15 instead of 16. co_div64(0x1000000000000,0x10000000) returns 983055 instead of 1048576. As an alternative, I suggest using http://www.linuxhq.com/kernel/v2.5/75/lib/div64.c that returns both the result and the remainder, both needed in time calculation. Another option is to use Windows native divide operator. Why do we need to implement it if it already exists? Thanks, Ron ---------------------------------------------------------------------- >Comment By: Henry N. (henryn) Date: 2010-10-20 02:26 Message: SVN r1530: co_div64 replaced with more accurate div64_32 from linux-2.6.33.5 ---------------------------------------------------------------------- Comment By: Henry N. (henryn) Date: 2010-09-20 22:08 Message: What is "native divide operator"? If you means the "/", then the answer is simple: GCC will call a function __div... from external "libc.so", that we don't can do from inside linux.sys Windows kernel driver. http://www.linuxhq.com/kernel/v2.5/75/lib/div64.c: This function returns always 0 for your testing numbers. "__div64_32" from kernel 2.6.33 works. http://www.linux-m32r.org/lxr/http/source/lib/div64.c?v=2.6.20-rc1#L26 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=622063&aid=3071698&group_id=98788 |