Il giorno lunedì 26 aprile 2021 alle 10:24:09 UTC+2 Pure White ha scritto:

> Hi all,
>
> I'm trying to get time using `CLOCK_REALTIME_COARSE` and 
> `CLOCK_MONOTONIC_COARSE` for performance reasons, and need to use vdso call 
> by hand-written assembly code. That is, I want to reimplement `time.Now` 
> using `CLOCK_REALTIME_COARSE` and `CLOCK_MONOTONIC_COARSE`.
>
> I referenced the code in runtime and found that there's an issue #20427 
> indicates that I need to switch to g0 for vdso calls, so I tried two 
> methods but neither is good.
> < [...]
>

> ## The right way?
>
> So I really want to know what is the right way to do vdso call outside 
> runtime?
>
> Thanks very much!
>

What about using a different function instead of time.Now, and using 
RawSyscall?

Manlio 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/30b8d7f3-499b-4aab-a7f0-a5fad865a14an%40googlegroups.com.

Reply via email to