-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the Proxy Kernel, gettimeofday always returns 0 #1
Comments
Well, if we disassemble that code we get this:
So yah, it's only ever going to return zero. "gettimeofday" should make a syscall, which would be handled by the riscv-pk (SYS_time) properly and return a value based off of "rdcycle()" and assuming a 1GHz clock. So the question is why is the compiler giving us the wrong code, when the proxy-kernel is waiting for a SYS_time syscall? I'm guessing a stub somewhere in riscv-gcc didn't get filled out, but I don't really know where to look myself. |
Newlib's implementation of gettimeofday was doing exactly what Chris' Need to rebuild riscv-gcc before rebuilding riscv-pk. On Tue, Nov 12, 2013 at 10:54 PM, Christopher Celio <
|
I'm building a simple program with riscv-gcc and running with the proxy kernel. I'm using the proxy kernel to obtain some system libraries such as time.h.
Here's an example usage:
This always prints 0.0000, even when called in a long loop. Strange...
Any ideas what might be going wrong?
I can provide code and give more details if anyone wants to try to reproduce it.
Thanks,
Forrest
The text was updated successfully, but these errors were encountered: