aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/lang/c/tls_globals/a.c
blob: ab1022514d1ec4669175c690846227645fa695b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//===-- a.c -----------------------------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include <unistd.h>

__thread int var_shared = 33;

int
touch_shared()
{
    return var_shared;
}

void shared_check()
{
	var_shared *= 2;
	usleep(1); // shared thread breakpoint
}