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

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

Issue 623863002: Implement pthread_rwlock functions for NaCl newlib. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
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 /* 7 /*
8 * Native Client pthreads implementation layer 8 * Native Client pthreads implementation layer
9 */ 9 */
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 * experiments with newlib as a shared library talking to glibc's ld.so. 45 * experiments with newlib as a shared library talking to glibc's ld.so.
46 * ld.so does not mind if we trample over most of its tdb structure 46 * ld.so does not mind if we trample over most of its tdb structure
47 * ("tcbhead_t") as long as we keep the field "dtv" untouched and 47 * ("tcbhead_t") as long as we keep the field "dtv" untouched and
48 * use tls_base in a compatible way (which we already do). 48 * use tls_base in a compatible way (which we already do).
49 */ 49 */
50 typedef struct { 50 typedef struct {
51 void *tls_base; /* tls accesses are made relative to this base */ 51 void *tls_base; /* tls accesses are made relative to this base */
52 void *unused_dtv; /* increase compatibility with glibc's tcbhead_t */ 52 void *unused_dtv; /* increase compatibility with glibc's tcbhead_t */
53 int joinable; 53 int joinable;
54 int join_waiting; 54 int join_waiting;
55 int rdlock_count; /* how many rdlock's does this thread hold */
Mark Seaborn 2015/02/02 18:29:13 Nit: remove apostrophe. How about writing this as
Sam Clegg 2015/02/02 19:25:08 Done.
55 nc_thread_memory_block_t *stack_node; 56 nc_thread_memory_block_t *stack_node;
56 nc_thread_memory_block_t *tls_node; 57 nc_thread_memory_block_t *tls_node;
57 nc_thread_function start_func; 58 nc_thread_function start_func;
58 void *state; 59 void *state;
59 /* 60 /*
60 * irt_thread_data is used when libpthread is linked into the IRT. 61 * irt_thread_data is used when libpthread is linked into the IRT.
61 * It is used for free()ing the thread block. 62 * It is used for free()ing the thread block.
62 * TODO(mseaborn): This plays a similar role to tls_node; the two 63 * TODO(mseaborn): This plays a similar role to tls_node; the two
63 * could be unified in future. 64 * could be unified in future.
64 */ 65 */
(...skipping 28 matching lines...) Expand all
93 94
94 static inline void *nc_memory_block_to_payload(nc_thread_memory_block_t *node) { 95 static inline void *nc_memory_block_to_payload(nc_thread_memory_block_t *node) {
95 return &node[1]; 96 return &node[1];
96 } 97 }
97 98
98 #ifdef __cplusplus 99 #ifdef __cplusplus
99 } 100 }
100 #endif 101 #endif
101 102
102 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_PTHREAD_NC_PTHREAD_TYPES_H_ */ 103 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_PTHREAD_NC_PTHREAD_TYPES_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698