TLS variables (declared with __thread keyword) are global variables
private to each thread. They are implemented by allocating a new
variable every time a thread is spawn.
To reference an TLS variable on a livepatch, one can use the following
notation:
where banner is the original TLS variable we want to reference, and ti
is a variable that will holds the TLS offset metadata required to access
banner. Note that ti is not a pointer or reference, but a instance of
tls_index.
To reference the original TLS variable, one can write:
TLS variables (declared with __thread keyword) are global variables private to each thread. They are implemented by allocating a new variable every time a thread is spawn.
To reference an TLS variable on a livepatch, one can use the following notation:
where
banner
is the original TLS variable we want to reference, andti
is a variable that will holds the TLS offset metadata required to access banner. Note that ti is not a pointer or reference, but a instance oftls_index
.To reference the original TLS variable, one can write:
and then
reference_to_banner
will contain a pointer to the original var in current thread.Signed-off-by: Giuliano Belinassi gbelinassi@suse.de