nuttx
nuttx copied to clipboard
[Discussion] Integrating port specific syscall proxies
With the risc-v/litex
port, we're able to access the TIME and TIMEH CSRs in usermode. I would like take advantage of this feature to replace the proxies for syscalls, such as timer_gettime
, with an equivalent implementation that avoids a context switch, where appropriate.
I understand that the syscall.csv
database is used to generate the syscall proxies and stubs, but there doesn't seem to be any facility to provide a different implementation. Potentially, I could remove the desired syscalls from syscall.csv
and provide my own proxy which is linked into libproxies
, but it would be nice if this was more generally supported, rather than patching the kernel locally.
I'd be interested to know if anyone has had a similar idea, or potentially there is a method to achieve this in NuttX which I have overlooked.