lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lightning] Thread-local data?


From: Basile Starynkevitch
Subject: Re: [Lightning] Thread-local data?
Date: Fri, 23 Sep 2016 17:10:00 +0200

On Fri, 2016-09-23 at 10:40 -0400, Sandro Magi wrote:
> How can a dynamically compiled program via GNU lightning, access
> thread-local variables that are annotated with  _Thread_local? If I
> understand correctly, thread-local storage is accessed via a
> privileged register, so does lightning identify this register in some
> way?

GNU lightning is known (and so is TinyCC) to emit slow machine code,
but is able to emit that code very quickly.

So I would simply hand-code in C the few functions retrieving and
updating these thread local data and call these functions as you would
call any (external) function in GNU lightning.

Perhaps there is another way, but I don't know it. Unless that other
way is documented & stable, I won't consider using it.

Regards.
-- 
Basile Starynkevitch <address@hidden>
http://starynkevitch.net/Basile/ (France)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]