Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Side by Side Diff: src/untrusted/pthread/pthread_internal.h

Issue 951583004: Implement pthread_rwlock functions for NaCl newlib (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/untrusted/pthread/pthread.gyp ('k') | src/untrusted/pthread/pthread_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_PTHREAD_PTHREAD_INTERNAL_H_ 7 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_PTHREAD_PTHREAD_INTERNAL_H_
8 #define NATIVE_CLIENT_SRC_UNTRUSTED_PTHREAD_PTHREAD_INTERNAL_H_ 1 8 #define NATIVE_CLIENT_SRC_UNTRUSTED_PTHREAD_PTHREAD_INTERNAL_H_ 1
9 9
10 #include "native_client/src/untrusted/irt/irt.h" 10 #include "native_client/src/untrusted/irt/irt.h"
11 #include "native_client/src/untrusted/nacl/tls.h"
12 #include "native_client/src/untrusted/nacl/tls_params.h"
11 #include "native_client/src/untrusted/pthread/pthread.h" 13 #include "native_client/src/untrusted/pthread/pthread.h"
14 #include "native_client/src/untrusted/pthread/pthread_types.h"
12 15
13 struct nc_combined_tdb; 16 #define TDB_SIZE (sizeof(struct nc_combined_tdb))
14 17
15 extern int __nc_thread_initialized; 18 extern int __nc_thread_initialized;
16 extern pthread_t __nc_initial_thread_id; 19 extern pthread_t __nc_initial_thread_id;
17 20
18 void __nc_initialize_globals(void); 21 void __nc_initialize_globals(void);
19 22
20 void __nc_initialize_unjoinable_thread(struct nc_combined_tdb *tdb); 23 void __nc_initialize_unjoinable_thread(struct nc_combined_tdb *tdb);
21 24
22 void __nc_initialize_interfaces(void); 25 void __nc_initialize_interfaces(void);
23 26
24 void __nc_tsd_exit(void); 27 void __nc_tsd_exit(void);
25 28
29 static inline struct nc_thread_descriptor *__nc_get_tdb(void) {
30 /*
31 * Fetch the thread-specific data pointer. This is usually just
32 * a wrapper around __libnacl_irt_tls.tls_get() but we don't use
33 * that here so that the IRT build can override the definition.
34 */
35 return (void *) ((char *) __nacl_read_tp_inline()
36 + __nacl_tp_tdb_offset(TDB_SIZE));
37 }
38
26 #endif 39 #endif
OLDNEW
« no previous file with comments | « src/untrusted/pthread/pthread.gyp ('k') | src/untrusted/pthread/pthread_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698