OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <pthread.h> | 8 #include <pthread.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 | 10 |
11 #include "native_client/src/untrusted/nacl/tls.h" | 11 #include "native_client/src/untrusted/nacl/tls.h" |
12 | 12 |
13 /* | 13 /* |
14 * libstdc++ makes minimal use of pthread_key_t stuff. | 14 * libstdc++ makes minimal use of pthread_key_t stuff. |
15 */ | 15 */ |
16 | 16 |
17 #undef PTHREAD_KEYS_MAX | 17 #undef PTHREAD_KEYS_MAX |
18 #define PTHREAD_KEYS_MAX 16 | 18 #define PTHREAD_KEYS_MAX 32 |
19 | 19 |
20 #define NC_TSD_NO_MORE_KEYS irt_tsd_no_more_keys() | 20 #define NC_TSD_NO_MORE_KEYS irt_tsd_no_more_keys() |
21 static void irt_tsd_no_more_keys(void) { | 21 static void irt_tsd_no_more_keys(void) { |
22 static const char msg[] = "IRT: too many pthread keys\n"; | 22 static const char msg[] = "IRT: too many pthread keys\n"; |
23 write(2, msg, sizeof msg - 1); | 23 write(2, msg, sizeof msg - 1); |
24 } | 24 } |
25 | 25 |
26 #define NACL_IN_IRT | 26 #define NACL_IN_IRT |
27 | 27 |
28 /* @IGNORE_LINES_FOR_CODE_HYGIENE[2] */ | 28 /* @IGNORE_LINES_FOR_CODE_HYGIENE[2] */ |
29 #include "native_client/src/untrusted/pthread/nc_init_private.c" | 29 #include "native_client/src/untrusted/pthread/nc_init_private.c" |
30 #include "native_client/src/untrusted/pthread/nc_thread.c" | 30 #include "native_client/src/untrusted/pthread/nc_thread.c" |
OLD | NEW |