> If we're going down this route, we should copy the FPsave
> to the stack in notify as we do the Ureg. Then we wouldn't
> need the ofpregs file at all. 

yeah. i'm not fond of it ofpregs-file solution eigther.

> This will require some thinking
> about backwards compatibility. There needs to be a way
> to signal that you have additional data after the Ureg.

i suppose one could just pass a pointer as a second argument
to the note handler. new code using the second argument would
crash on a older kernel, but old userpsace code would just ignore
the extra argument on a new kernel. libthread programs would
need to be checked if they have enougth stack space for the
extra fpu regs.

a cleaner way might be to introduce a new syscall to
set the note handler that is fpu-context aware?

> What did Go abandon? It looks like they're still using the nsec
> and tsemacquire system calls over a decade later. Did I miss
> something?

i apologize, you whre right, it was not abandoned.
there was confusion about the calling convention of the syscall.

//go:nosplit
func nanotime1() int64 {
        var scratch int64
        ns := nsec(&scratch)
        // TODO(aram): remove hack after I fix _nsec in the pc64 kernel.
        if ns == 0 {
                return scratch
        }
        return ns
}

--
cinap

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Taf6b900592afc500-M45ef9ecbdcbbc86b7e4a1731
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to