> On Dec 17, 2018, at 2:23 PM, Szabolcs Nagy <szabolcs.n...@arm.com> wrote: > > On 17/12/2018 18:22, Uecker, Martin wrote: >>> >>> ... >> >> So a thread_local static variable for storing the static >> chain? > > something like that, but the more i think about it the > harder it seems: the call site of the nested function > may not be under control of the nested function writer, > in particular the nested function may be called on a > different thread, and extern library apis are unlikely > to provide guarantees about this, so in general if a > nested function escapes into an extern library then > this cannot be relied on, which limits my original > idea again to cases where there is no escape (which i > think is not that useful). I'm not sure I understand "escape" of a nested function pointer. Your description makes it sound like you're talking about a function being called by someone who has been given the pointer, from outside the scope of the function. That sounds like an illegal operation, exactly as it would be if you attempted to reference an automatic variable via a pointer from outside the scope of that variable. Did I misunderstand? paul
- Re: [PATCH v4][C][ADA] use function descriptors instead... Jeff Law
- Re: [PATCH v4][C][ADA] use function descriptors in... Uecker, Martin
- Re: [PATCH v4][C][ADA] use function descriptor... Jeff Law
- Re: [PATCH v4][C][ADA] use function descri... Martin Sebor
- Re: [PATCH v4][C][ADA] use function de... Uecker, Martin
- Re: [PATCH v4][C][ADA] use function de... Jeff Law
- Re: [PATCH v4][C][ADA] use function de... Uecker, Martin
- Re: [PATCH v4][C][ADA] use function de... Szabolcs Nagy
- Re: [PATCH v4][C][ADA] use function de... Uecker, Martin
- Re: [PATCH v4][C][ADA] use function de... Szabolcs Nagy
- Re: [PATCH v4][C][ADA] use function de... Paul Koning
- Re: [PATCH v4][C][ADA] use function de... Jakub Jelinek
- Re: [PATCH v4][C][ADA] use function de... Jeff Law
- Re: [PATCH v4][C][ADA] use function de... Jakub Jelinek
- Re: [PATCH v4][C][ADA] use function de... Uecker, Martin
- Re: [PATCH v4][C][ADA] use function de... Uecker, Martin
- Re: [PATCH v4][C][ADA] use function de... Jakub Jelinek
- Re: [PATCH v4][C][ADA] use function de... Uecker, Martin
- Re: [PATCH v4][C][ADA] use function de... Jakub Jelinek
- Re: [PATCH v4][C][ADA] use function de... Wilco Dijkstra
- Re: [PATCH v4][C][ADA] use function de... Hans-Peter Nilsson