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

Side by Side Diff: src/trusted/service_runtime/nacl_globals.c

Issue 6937003: modified nacl_sync.h to have NACL_WUR for all functions that return a (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 7 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 2008 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can 3 * Use of this source code is governed by a BSD-style license that can be
4 * be found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * NaCl Server Runtime global scoped objects for handling global resources. 8 * NaCl Server Runtime global scoped objects for handling global resources.
9 */ 9 */
10 10
11 #include "native_client/src/shared/platform/nacl_interruptible_mutex.h" 11 #include "native_client/src/shared/platform/nacl_interruptible_mutex.h"
12 #include "native_client/src/shared/platform/nacl_log.h" 12 #include "native_client/src/shared/platform/nacl_log.h"
13 #include "native_client/src/shared/platform/nacl_sync.h"
14 #include "native_client/src/shared/platform/nacl_sync_checked.h"
13 #include "native_client/src/shared/platform/nacl_threads.h" 15 #include "native_client/src/shared/platform/nacl_threads.h"
14 #include "native_client/src/trusted/service_runtime/arch/sel_ldr_arch.h" 16 #include "native_client/src/trusted/service_runtime/arch/sel_ldr_arch.h"
15 #include "native_client/src/trusted/service_runtime/nacl_app.h" 17 #include "native_client/src/trusted/service_runtime/nacl_app.h"
16 #include "native_client/src/trusted/service_runtime/nacl_app_thread.h" 18 #include "native_client/src/trusted/service_runtime/nacl_app_thread.h"
17 #include "native_client/src/trusted/service_runtime/nacl_globals.h" 19 #include "native_client/src/trusted/service_runtime/nacl_globals.h"
18 20
19 struct NaClMutex nacl_thread_mu = {NULL}; 21 struct NaClMutex nacl_thread_mu = {NULL};
20 22
21 struct NaClThreadContext *nacl_user[NACL_THREAD_MAX] = {NULL}; 23 struct NaClThreadContext *nacl_user[NACL_THREAD_MAX] = {NULL};
22 struct NaClThreadContext *nacl_sys[NACL_THREAD_MAX] = {NULL}; 24 struct NaClThreadContext *nacl_sys[NACL_THREAD_MAX] = {NULL};
23 struct NaClAppThread *nacl_thread[NACL_THREAD_MAX] = {NULL}; 25 struct NaClAppThread *nacl_thread[NACL_THREAD_MAX] = {NULL};
24 26
25 /* 27 /*
26 * Hack for gdb. This records xlate_base in a place where (1) gdb can find it, 28 * Hack for gdb. This records xlate_base in a place where (1) gdb can find it,
27 * and (2) gdb doesn't need debug info (it just needs symbol info). 29 * and (2) gdb doesn't need debug info (it just needs symbol info).
28 */ 30 */
29 uintptr_t nacl_global_xlate_base; 31 uintptr_t nacl_global_xlate_base;
30 32
31 void NaClGlobalModuleInit(void) { 33 void NaClGlobalModuleInit(void) {
32 NaClMutexCtor(&nacl_thread_mu); 34 NaClXMutexCtor(&nacl_thread_mu);
33 NaClInitGlobals(); 35 NaClInitGlobals();
34 } 36 }
35 37
36 38
37 void NaClGlobalModuleFini(void) { 39 void NaClGlobalModuleFini(void) {
38 NaClMutexDtor(&nacl_thread_mu); 40 NaClMutexDtor(&nacl_thread_mu);
39 } 41 }
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/linux/x86/nacl_ldt.c ('k') | src/trusted/service_runtime/nacl_sync_cond_test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698