summaryrefslogtreecommitdiff
path: root/src/thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread')
-rw-r--r--src/thread/pthread_create.c6
-rw-r--r--src/thread/pthread_key_create.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
index f60cd4a3..02b966ab 100644
--- a/src/thread/pthread_create.c
+++ b/src/thread/pthread_create.c
@@ -108,12 +108,12 @@ static int start(void *p)
#define ROUND(x) (((x)+PAGE_SIZE-1)&-PAGE_SIZE)
/* pthread_key_create.c overrides this */
-static const size_t dummy = 0;
+static volatile size_t dummy = 0;
weak_alias(dummy, __pthread_tsd_size);
-static void *const dummy_tsd[1] = { 0 };
+static void *dummy_tsd[1] = { 0 };
weak_alias(dummy_tsd, __pthread_tsd_main);
-static FILE *const dummy_file = 0;
+static FILE *volatile dummy_file = 0;
weak_alias(dummy_file, __stdin_used);
weak_alias(dummy_file, __stdout_used);
weak_alias(dummy_file, __stderr_used);
diff --git a/src/thread/pthread_key_create.c b/src/thread/pthread_key_create.c
index c29935c1..d534b1a2 100644
--- a/src/thread/pthread_key_create.c
+++ b/src/thread/pthread_key_create.c
@@ -1,6 +1,6 @@
#include "pthread_impl.h"
-const size_t __pthread_tsd_size = sizeof(void *) * PTHREAD_KEYS_MAX;
+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 *);