Re: [go-nuts] Getting a function's linked address?

2019-10-31 Thread julio . nemesis
> > You can create a lookup table at run time. What would change if you > could do it at link time? Can you show us the code you want to write? > This is actually linked to my remark on build-time source instrumentation on https://github.com/golang/go/issues/35204 : I insert hooks into func

Re: [go-nuts] Getting a function's linked address?

2019-10-29 Thread julio . nemesis
I was meaning an equivalent to declaring an extern function using the same name as the symbol we want. The function address will be the linked symbol address. I indeed use the reflect package today, but this happen at run time while I would like to get those values at link time. I'd like to crea

[go-nuts] Getting a function's linked address?

2019-10-29 Thread julio . nemesis
Hello, I am wondering if it is possible to get the address of a function but at link-time. Kind of the equivalent to the C keyword `extern`. Maybe using the link name directive? But it is not super clear to me. I would like to get them instead at link time instead of using the gosymtab. Thank

Re: [go-nuts] Is it safe to invoke len(channel) on multi-gorountine

2017-06-17 Thread julio . nemesis
I almost got into the trap with this, trying to prioritize selected channel... https://play.golang.org/p/VOrPwx7HC_ -- 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

[go-nuts] Re: reading from file that is closed after starting the read

2016-06-14 Thread julio . nemesis
I am having the same trouble with a tty too. I ended up with pthread_kill to signal the specific goroutines blocked in read: https://play.golang.org/p/VZhm2-dX0B The two goroutines share their ids and wait for each other's completion with a signal. I am not sure how safe it is. But it does the