Conversation
|
|
oI0ck
left a comment
There was a problem hiding this comment.
Okay, I was wrong on the previous comment. Rescheduling happens on a timer IRQ, hence the cpuTime should be kept up-to-date correctly. LGTM
Implement syscall based on declared getCpuTime function JIRA: RTOS-1088
892e6aa to
9508f1e
Compare
|
I don't like expansion of syscalls list if it's not strictly necessary - this information might be e.g. a part of threadsinfo syscall instead. |
|
Right, haven't noticed that. |
|
Note that the PR description acknowledges that the I have done some limited efforts in making the Implementation-wise it'd be a matter of further refactoring to extract the code that populates the |
|
Good point. I think it's safe then to close this PR and tackle this matter in another one, since that's concerns a different change. |
Implement syscall based on declared getCpuTime function
JIRA: RTOS-1088
Description
Add syscall allowing us to get information on how much time did actual thread spend on CPU.
Motivation and Context
See: phoenix-rtos/libphoenix#431
Added due to performance reasons, existing syscalls (threadsinfo) give info on first n threads on threads tree which would make us search for our thread on the list
Types of changes
How Has This Been Tested?
Checklist:
Special treatment