TYPEDEF long time_t;
TYPEDEF long suseconds_t;
-TYPEDEF struct { union { int __i[9]; unsigned __s[9]; } __u; } pthread_attr_t;
-TYPEDEF struct { union { int __i[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
-TYPEDEF struct { union { int __i[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
-TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } pthread_cond_t;
-TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } cnd_t;
-TYPEDEF struct { union { int __i[8]; void *__p[8]; } __u; } pthread_rwlock_t;
-TYPEDEF struct { union { int __i[5]; void *__p[5]; } __u; } pthread_barrier_t;
+TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
+TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
+TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
+TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
+TYPEDEF struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
-TYPEDEF struct { union { int __i[9]; unsigned __s[9]; } __u; } pthread_attr_t;
-TYPEDEF struct { union { int __i[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
-TYPEDEF struct { union { int __i[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
-TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } pthread_cond_t;
-TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } cnd_t;
-TYPEDEF struct { union { int __i[8]; void *__p[8]; } __u; } pthread_rwlock_t;
-TYPEDEF struct { union { int __i[5]; void *__p[5]; } __u; } pthread_barrier_t;
+TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
+TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
+TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
+TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
+TYPEDEF struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
-TYPEDEF struct { union { int __i[9]; unsigned __s[9]; } __u; } pthread_attr_t;
-TYPEDEF struct { union { int __i[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
-TYPEDEF struct { union { int __i[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
-TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } pthread_cond_t;
-TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } cnd_t;
-TYPEDEF struct { union { int __i[8]; void *__p[8]; } __u; } pthread_rwlock_t;
-TYPEDEF struct { union { int __i[5]; void *__p[5]; } __u; } pthread_barrier_t;
+TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
+TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
+TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
+TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
+TYPEDEF struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
-TYPEDEF struct { union { int __i[9]; unsigned __s[9]; } __u; } pthread_attr_t;
-TYPEDEF struct { union { int __i[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
-TYPEDEF struct { union { int __i[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
-TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } pthread_cond_t;
-TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } cnd_t;
-TYPEDEF struct { union { int __i[8]; void *__p[8]; } __u; } pthread_rwlock_t;
-TYPEDEF struct { union { int __i[5]; void *__p[5]; } __u; } pthread_barrier_t;
+TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
+TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
+TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
+TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
+TYPEDEF struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
-TYPEDEF struct { union { int __i[9]; unsigned __s[9]; } __u; } pthread_attr_t;
-TYPEDEF struct { union { int __i[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
-TYPEDEF struct { union { int __i[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
-TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } pthread_cond_t;
-TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } cnd_t;
-TYPEDEF struct { union { int __i[8]; void *__p[8]; } __u; } pthread_rwlock_t;
-TYPEDEF struct { union { int __i[5]; void *__p[5]; } __u; } pthread_barrier_t;
+TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
+TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
+TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
+TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
+TYPEDEF struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
-TYPEDEF struct { union { int __i[9]; unsigned __s[9]; } __u; } pthread_attr_t;
-TYPEDEF struct { union { int __i[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
-TYPEDEF struct { union { int __i[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
-TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } pthread_cond_t;
-TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } cnd_t;
-TYPEDEF struct { union { int __i[8]; void *__p[8]; } __u; } pthread_rwlock_t;
-TYPEDEF struct { union { int __i[5]; void *__p[5]; } __u; } pthread_barrier_t;
+TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
+TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
+TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
+TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
+TYPEDEF struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
-TYPEDEF struct { union { int __i[9]; unsigned __s[9]; } __u; } pthread_attr_t;
-TYPEDEF struct { union { int __i[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
-TYPEDEF struct { union { int __i[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
-TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } pthread_cond_t;
-TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } cnd_t;
-TYPEDEF struct { union { int __i[8]; void *__p[8]; } __u; } pthread_rwlock_t;
-TYPEDEF struct { union { int __i[5]; void *__p[5]; } __u; } pthread_barrier_t;
+TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
+TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
+TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
+TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
+TYPEDEF struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
TYPEDEF long long time_t;
TYPEDEF long long suseconds_t;
-TYPEDEF struct { union { int __i[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
-TYPEDEF struct { union { int __i[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
-TYPEDEF struct { union { int __i[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
-TYPEDEF struct { union { int __i[12]; void *__p[6]; } __u; } pthread_cond_t;
-TYPEDEF struct { union { int __i[12]; void *__p[6]; } __u; } cnd_t;
-TYPEDEF struct { union { int __i[14]; void *__p[7]; } __u; } pthread_rwlock_t;
-TYPEDEF struct { union { int __i[8]; void *__p[4]; } __u; } pthread_barrier_t;
+TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
+TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
+TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
+TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
+TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
-TYPEDEF struct { union { int __i[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
-TYPEDEF struct { union { int __i[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
-TYPEDEF struct { union { int __i[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
-TYPEDEF struct { union { int __i[12]; void *__p[6]; } __u; } pthread_cond_t;
-TYPEDEF struct { union { int __i[12]; void *__p[6]; } __u; } cnd_t;
-TYPEDEF struct { union { int __i[14]; void *__p[7]; } __u; } pthread_rwlock_t;
-TYPEDEF struct { union { int __i[8]; void *__p[4]; } __u; } pthread_barrier_t;
+TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
+TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
+TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
+TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
+TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
+TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
struct sigevent aio_sigevent;
void *__td;
int __lock[2];
- int __err;
+ volatile int __err;
ssize_t __ret;
off_t aio_offset;
void *__next, *__prev;
#define SEM_FAILED ((sem_t *)0)
typedef struct {
- int __val[4*sizeof(long)/sizeof(int)];
+ volatile int __val[4*sizeof(long)/sizeof(int)];
} sem_t;
int sem_close(sem_t *);
struct aiocb *cb;
struct aio_thread *next, *prev;
struct aio_queue *q;
- int running, err, op;
+ volatile int running;
+ int err, op;
ssize_t ret;
};
off_t tell;
int buf_pos;
int buf_end;
- int lock[2];
+ volatile int lock[2];
char buf[2048];
};
static void (*funcs[COUNT])(void);
static int count;
-static int lock[2];
+static volatile int lock[2];
void __funcs_on_quick_exit()
{
void *a[COUNT];
} builtin, *head;
-static int lock[2];
+static volatile int lock[2];
void __funcs_on_exit()
{
struct __locale_map;
struct __locale_struct {
- int ctype_utf8;
+ volatile int ctype_utf8;
char *messages_name;
- struct __locale_map *cat[4];
+ struct __locale_map *volatile cat[4];
};
struct __libc {
size_t *auxv;
volatile int threads_minus_1;
FILE *ofl_head;
- int ofl_lock[2];
+ volatile int ofl_lock[2];
size_t tls_size;
size_t page_size;
volatile int uselocale_cnt;
volatile void *volatile pending;
} robust_list;
int unblock_cancel;
- int timer_id;
+ volatile int timer_id;
locale_t locale;
- int killlock[2];
- int exitlock[2];
- int startlock[2];
+ volatile int killlock[2];
+ volatile int exitlock[2];
+ volatile int startlock[2];
unsigned long sigmask[_NSIG/8/sizeof(long)];
void *stdio_locks;
};
#define _a_policy __u.__i[3*__SU+2]
#define _a_prio __u.__i[3*__SU+3]
#define _m_type __u.__i[0]
-#define _m_lock __u.__i[1]
-#define _m_waiters __u.__i[2]
+#define _m_lock __u.__vi[1]
+#define _m_waiters __u.__vi[2]
#define _m_prev __u.__p[3]
#define _m_next __u.__p[4]
#define _m_count __u.__i[5]
#define _c_shared __u.__p[0]
-#define _c_seq __u.__i[2]
-#define _c_waiters __u.__i[3]
+#define _c_seq __u.__vi[2]
+#define _c_waiters __u.__vi[3]
#define _c_clock __u.__i[4]
-#define _c_lock __u.__i[8]
+#define _c_lock __u.__vi[8]
#define _c_head __u.__p[1]
#define _c_tail __u.__p[5]
-#define _rw_lock __u.__i[0]
-#define _rw_waiters __u.__i[1]
+#define _rw_lock __u.__vi[0]
+#define _rw_waiters __u.__vi[1]
#define _rw_shared __u.__i[2]
-#define _b_lock __u.__i[0]
-#define _b_waiters __u.__i[1]
+#define _b_lock __u.__vi[0]
+#define _b_waiters __u.__vi[1]
#define _b_limit __u.__i[2]
-#define _b_count __u.__i[3]
-#define _b_waiters2 __u.__i[4]
+#define _b_count __u.__vi[3]
+#define _b_waiters2 __u.__vi[4]
#define _b_inst __u.__p[3]
#include "pthread_arch.h"
short dummy3;
signed char mode;
signed char lbf;
- int lock;
- int waiters;
+ volatile int lock;
+ volatile int waiters;
void *cookie;
off_t off;
char *getln_buf;
size_t relro_start, relro_end;
void **new_dtv;
unsigned char *new_tls;
- int new_dtv_idx, new_tls_idx;
+ volatile int new_dtv_idx, new_tls_idx;
struct td_index *td_index;
struct dso *fini_next;
char *shortname;
static struct __locale_map *findlocale(const char *name, size_t n)
{
- static void *loc_head;
+ static void *volatile loc_head;
struct __locale_map *p, *new, *old_head;
const char *path = 0, *z;
char buf[256];
struct binding {
struct binding *next;
int dirlen;
- int active;
+ volatile int active;
char *domainname;
char *dirname;
char buf[];
char *bindtextdomain(const char *domainname, const char *dirname)
{
- static int lock[2];
+ static volatile int lock[2];
struct binding *p, *q;
if (!domainname) return 0;
struct msgcat *next;
const void *map;
size_t map_size;
- void *plural_rule;
- int nplurals;
+ void *volatile plural_rule;
+ volatile int nplurals;
char name[];
};
{
static uintptr_t cur, brk;
uintptr_t base, new;
- static int lock[2];
+ static volatile int lock[2];
size_t align=1;
if (!n) n++;
};
struct bin {
- int lock[2];
+ volatile int lock[2];
struct chunk *head;
struct chunk *tail;
};
static struct {
uintptr_t brk;
size_t *heap;
- uint64_t binmap;
+ volatile uint64_t binmap;
struct bin bins[64];
- int brk_lock[2];
- int free_lock[2];
+ volatile int brk_lock[2];
+ volatile int free_lock[2];
unsigned mmap_step;
} mal;
static int init_malloc(size_t n)
{
- static int init, waiters;
+ static volatile int init, waiters;
int state;
struct chunk *c;
#include "libc.h"
#include "atomic.h"
-static int lock[2];
+static volatile int lock[2];
static char log_ident[32];
static int log_opt;
static int log_facility = LOG_USER;
-static int log_mask = 0xff;
+static volatile int log_mask = 0xff;
static int log_fd = -1;
int setlogmask(int maskpri)
static int i = 3;
static int j = 0;
static uint32_t *x = init+1;
-static int lock[2];
+static volatile int lock[2];
static uint32_t lcg31(uint32_t x) {
return (1103515245*x + 12345) & 0x7fffffff;
struct atfork_funcs *prev, *next;
} *funcs;
-static int lock[2];
+static volatile int lock[2];
void __fork_handler(int who)
{
struct instance
{
- int count;
- int last;
- int waiters;
- int finished;
+ volatile int count;
+ volatile int last;
+ volatile int waiters;
+ volatile int finished;
};
int pthread_barrier_wait(pthread_barrier_t *b)
struct waiter {
struct waiter *prev, *next;
- int state, barrier;
- int *notify;
+ volatile int state, barrier;
+ volatile int *notify;
};
/* Self-synchronized-destruction-safe lock functions */
int __pthread_cond_timedwait(pthread_cond_t *restrict c, pthread_mutex_t *restrict m, const struct timespec *restrict ts)
{
struct waiter node = { 0 };
- int e, seq, *fut, clock = c->_c_clock, cs, shared=0, oldstate, tmp;
+ int e, seq, clock = c->_c_clock, cs, shared=0, oldstate, tmp;
+ volatile int *fut;
if ((m->_m_type&15) && (m->_m_lock&INT_MAX) != __pthread_self()->tid)
return EPERM;
int __private_cond_signal(pthread_cond_t *c, int n)
{
struct waiter *p, *first=0;
- int ref = 0, cur;
+ volatile int ref = 0;
+ int cur;
lock(&c->_c_lock);
for (p=c->_c_tail; n && p; p=p->prev) {
volatile size_t __pthread_tsd_size = sizeof(void *) * PTHREAD_KEYS_MAX;
void *__pthread_tsd_main[PTHREAD_KEYS_MAX] = { 0 };
-static void (*keys[PTHREAD_KEYS_MAX])(void *);
+static void (*volatile keys[PTHREAD_KEYS_MAX])(void *);
static void nodtor(void *dummy)
{
{
/* Return immediately if init finished before, but ensure that
* effects of the init routine are visible to the caller. */
- if (*control == 2) {
+ if (*(volatile int *)control == 2) {
a_barrier();
return 0;
}
sem_t *sem;
int refcnt;
} *semtab;
-static int lock[2];
+static volatile int lock[2];
#define FLAGS (O_RDWR|O_NOFOLLOW|O_CLOEXEC|O_NONBLOCK)
int r;
a_inc(sem->__val+1);
a_cas(sem->__val, 0, -1);
- pthread_cleanup_push(cleanup, sem->__val+1);
+ pthread_cleanup_push(cleanup, (void *)(sem->__val+1));
r = __timedwait_cp(sem->__val, -1, CLOCK_REALTIME, at, sem->__val[2]);
pthread_cleanup_pop(1);
if (r && r != EINTR) {
sem_t target_sem, caller_sem;
} *volatile head;
-static int synccall_lock[2];
-static int target_tid;
+static volatile int synccall_lock[2];
+static volatile int target_tid;
static void (*callback)(void *), *context;
static volatile int dummy = 0;
weak_alias(dummy, __block_new_threads);
#include "pthread_impl.h"
-static int vmlock[2];
+static volatile int vmlock[2];
void __vm_lock(int inc)
{
static char *old_tz = old_tz_buf;
static size_t old_tz_size = sizeof old_tz_buf;
-static int lock[2];
+static volatile int lock[2];
static int getint(const char **p)
{
int __clock_gettime(clockid_t clk, struct timespec *ts)
{
#ifdef VDSO_CGT_SYM
- static int (*cgt)(clockid_t, struct timespec *);
+ static int (*volatile cgt)(clockid_t, struct timespec *);
if (!cgt) {
void *f = __vdsosym(VDSO_CGT_VER, VDSO_CGT_SYM);
if (!f) f = (void *)sc_clock_gettime;