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

Side by Side Diff: src/native_client/src/trusted/service_runtime/nacl_syscall_common.c

Issue 2659002: Remove thread refcount and remove NaClAppDtor() (Closed)
Patch Set: Fix Gyp build Created 10 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright 2008 The Native Client Authors. All rights reserved. 2 * Copyright 2008 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
4 * be found in the LICENSE file. 4 * be found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * NaCl service run-time, non-platform specific system call helper routines. 8 * NaCl service run-time, non-platform specific system call helper routines.
9 */ 9 */
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 nacl_user[thread_idx] = NULL; 96 nacl_user[thread_idx] = NULL;
97 nacl_thread[thread_idx] = NULL; 97 nacl_thread[thread_idx] = NULL;
98 NaClLog(3, " removing thread from thread table\n"); 98 NaClLog(3, " removing thread from thread table\n");
99 NaClRemoveThreadMu(nap, natp->thread_num); 99 NaClRemoveThreadMu(nap, natp->thread_num);
100 NaClLog(3, " unlocking thread\n"); 100 NaClLog(3, " unlocking thread\n");
101 NaClXMutexUnlock(&natp->mu); 101 NaClXMutexUnlock(&natp->mu);
102 NaClLog(3, " announcing thread count change\n"); 102 NaClLog(3, " announcing thread count change\n");
103 NaClXCondVarBroadcast(&nap->threads_cv); 103 NaClXCondVarBroadcast(&nap->threads_cv);
104 NaClLog(3, " unlocking thread table\n"); 104 NaClLog(3, " unlocking thread table\n");
105 NaClXMutexUnlock(&nap->threads_mu); 105 NaClXMutexUnlock(&nap->threads_mu);
106 NaClLog(3, " decref'ing thread object (from count %d)\n", natp->refcount); 106 NaClLog(3, " freeing thread object\n");
107 NaClAppThreadDecRef(natp); 107 NaClAppThreadDtor(natp);
108 NaClLog(3, " NaClThreadExit\n"); 108 NaClLog(3, " NaClThreadExit\n");
109 NaClThreadExit(); /* should not return */ 109 NaClThreadExit(); /* should not return */
110 NaClLog(LOG_ERROR, "INCONCEIVABLE!\n"); 110 NaClLog(LOG_ERROR, "INCONCEIVABLE!\n");
111 abort(); 111 abort();
112 /* NOTREACHED */ 112 /* NOTREACHED */
113 } 113 }
114 114
115 void NaClSysCommonThreadSyscallEnter(struct NaClAppThread *natp) { 115 void NaClSysCommonThreadSyscallEnter(struct NaClAppThread *natp) {
116 NaClLog(4, "NaClSysCommonThreadSyscallEnter: locking 0x%08"NACL_PRIxPTR"\n", 116 NaClLog(4, "NaClSysCommonThreadSyscallEnter: locking 0x%08"NACL_PRIxPTR"\n",
117 (uintptr_t) &natp->mu); 117 (uintptr_t) &natp->mu);
(...skipping 2591 matching lines...) Expand 10 before | Expand all | Expand 10 after
2709 void *code_target, 2709 void *code_target,
2710 void *code_buffer, 2710 void *code_buffer,
2711 size_t code_size) { 2711 size_t code_size) {
2712 UNREFERENCED_PARAMETER(natp); 2712 UNREFERENCED_PARAMETER(natp);
2713 UNREFERENCED_PARAMETER(code_target); 2713 UNREFERENCED_PARAMETER(code_target);
2714 UNREFERENCED_PARAMETER(code_buffer); 2714 UNREFERENCED_PARAMETER(code_buffer);
2715 UNREFERENCED_PARAMETER(code_size); 2715 UNREFERENCED_PARAMETER(code_size);
2716 2716
2717 return -NACL_ABI_ENOSYS; 2717 return -NACL_ABI_ENOSYS;
2718 } 2718 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698