Skip to content

Commit 3ec985d

Browse files
committed
snooper: complete general dynamic and local exec TLS mode support
Signed-off-by: Andrii Nakryiko <[email protected]>
1 parent 3cbaa37 commit 3ec985d

File tree

5 files changed

+333
-62
lines changed

5 files changed

+333
-62
lines changed

examples/c/app.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ static void *thread_func(void *arg)
9898
while (1) {
9999
time_t now;
100100

101+
errno = 123456789;
101102
func_mux(10);
103+
errno = 987654321;
102104

103105
now = time(NULL);
104106
if (now > last_print) {

examples/c/app_lib.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
__thread int tls_shared;
2+
__thread int tls_shared2;
23
static __thread int tls_local_shared;
34

45
int get_tls_local_shared(void) { return tls_local_shared; }
6+
int get_tls_shared(void) { return tls_shared; }
7+
int get_tls_shared2(void) { return tls_shared2; }
58
void bump_tls_local_shared(void) { tls_local_shared += 16; }

0 commit comments

Comments
 (0)