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

Unified Diff: src/trusted/service_runtime/nacl_syscall_common.c

Issue 891603002: Removes the name service from the service runtime (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Fixes code review comments Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/service_runtime/nacl_syscall_common.h ('k') | src/trusted/service_runtime/nacl_syscall_list.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/service_runtime/nacl_syscall_common.c
diff --git a/src/trusted/service_runtime/nacl_syscall_common.c b/src/trusted/service_runtime/nacl_syscall_common.c
index 0282744b73519ae9fc9fd6e68d3917e60abb30ef..616ac9903f2b7c08f8a1cf02011f318550d4a7d8 100644
--- a/src/trusted/service_runtime/nacl_syscall_common.c
+++ b/src/trusted/service_runtime/nacl_syscall_common.c
@@ -144,57 +144,6 @@ int32_t NaClSysThreadExit(struct NaClAppThread *natp,
return -NACL_ABI_EINVAL;
}
-int32_t NaClSysNameService(struct NaClAppThread *natp,
- uint32_t desc_addr) {
- struct NaClApp *nap = natp->nap;
- int32_t retval = -NACL_ABI_EINVAL;
- int32_t desc;
-
- NaClLog(3,
- ("NaClSysNameService(0x%08"NACL_PRIxPTR","
- " 0x%08"NACL_PRIx32")\n"),
- (uintptr_t) natp,
- desc_addr);
-
- if (!NaClCopyInFromUser(nap, &desc, desc_addr, sizeof desc)) {
- NaClLog(LOG_ERROR,
- "Invalid address argument to NaClSysNameService\n");
- retval = -NACL_ABI_EFAULT;
- goto done;
- }
-
- if (-1 == desc) {
- /* read */
- desc = NaClAppSetDescAvail(nap, NaClDescRef(nap->name_service_conn_cap));
- if (NaClCopyOutToUser(nap, desc_addr, &desc, sizeof desc)) {
- retval = 0;
- } else {
- retval = -NACL_ABI_EFAULT;
- }
- } else {
- struct NaClDesc *desc_obj_ptr = NaClAppGetDesc(nap, desc);
-
- if (NULL == desc_obj_ptr) {
- retval = -NACL_ABI_EBADF;
- goto done;
- }
- if (NACL_DESC_CONN_CAP != NACL_VTBL(NaClDesc, desc_obj_ptr)->typeTag &&
- NACL_DESC_CONN_CAP_FD != NACL_VTBL(NaClDesc, desc_obj_ptr)->typeTag) {
- retval = -NACL_ABI_EINVAL;
- goto done;
- }
- /* write */
- NaClXMutexLock(&nap->mu);
- NaClDescUnref(nap->name_service_conn_cap);
- nap->name_service_conn_cap = desc_obj_ptr;
- NaClXMutexUnlock(&nap->mu);
- retval = 0;
- }
-
- done:
- return retval;
-}
-
int32_t NaClSysTlsInit(struct NaClAppThread *natp,
uint32_t thread_ptr) {
int32_t retval = -NACL_ABI_EINVAL;
« no previous file with comments | « src/trusted/service_runtime/nacl_syscall_common.h ('k') | src/trusted/service_runtime/nacl_syscall_list.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698