| Index: src/native_client/src/trusted/service_runtime/nacl_app_thread.c
|
| diff --git a/src/native_client/src/trusted/service_runtime/nacl_app_thread.c b/src/native_client/src/trusted/service_runtime/nacl_app_thread.c
|
| index b0ca4f45cc222667e6a981aab46ce52c4156b5e7..e105a79c904b2110700c2cf70774367b6c224844 100644
|
| --- a/src/native_client/src/trusted/service_runtime/nacl_app_thread.c
|
| +++ b/src/native_client/src/trusted/service_runtime/nacl_app_thread.c
|
| @@ -88,7 +88,6 @@ int NaClAppThreadCtor(struct NaClAppThread *natp,
|
| }
|
|
|
| natp->is_privileged = is_privileged;
|
| - natp->refcount = 1;
|
|
|
| if (!NaClClosureResultCtor(&natp->result)) {
|
| goto cleanup_cv;
|
| @@ -208,35 +207,3 @@ int NaClAppThreadAllocSegCtor(struct NaClAppThread *natp,
|
| tls_idx,
|
| sys_tdb_base);
|
| }
|
| -
|
| -
|
| -int NaClAppThreadIncRef(struct NaClAppThread *natp) {
|
| - int refcount;
|
| -
|
| - NaClXMutexLock(&natp->mu);
|
| - if (natp->refcount == 0) {
|
| - NaClLog(LOG_FATAL, "NaClAppThreadIncRef: count was already 0!\n");
|
| - }
|
| - if (++natp->refcount == 0) {
|
| - NaClLog(LOG_FATAL, "NaClAppThreadIncRef: refcount overflow\n");
|
| - }
|
| - refcount = natp->refcount;
|
| - NaClXMutexUnlock(&natp->mu);
|
| -
|
| - return refcount;
|
| -}
|
| -
|
| -
|
| -int NaClAppThreadDecRef(struct NaClAppThread *natp) {
|
| - int refcount;
|
| -
|
| - NaClXMutexLock(&natp->mu);
|
| - refcount = --natp->refcount;
|
| - NaClXMutexUnlock(&natp->mu);
|
| -
|
| - if (0 == refcount) {
|
| - NaClAppThreadDtor(natp);
|
| - free(natp);
|
| - }
|
| - return refcount;
|
| -}
|
|
|