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

Unified Diff: src/shared/imc/nacl/nacl_imc.cc

Issue 1210053007: Remove unused untrusted implementations of NaClSendDatagram() and others (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/imc/nacl/nacl_imc.cc
diff --git a/src/shared/imc/nacl/nacl_imc.cc b/src/shared/imc/nacl/nacl_imc.cc
index 5fa94844dd6e98432c6564abd6147831db86ba9f..608fa2ec8783e2daa96be020f20114521bf8992e 100644
--- a/src/shared/imc/nacl/nacl_imc.cc
+++ b/src/shared/imc/nacl/nacl_imc.cc
@@ -12,32 +12,8 @@
#include <sys/mman.h>
#include <unistd.h>
-#include <algorithm>
-
-#include "native_client/src/shared/imc/nacl_imc_c.h"
-
-#if defined(__native_client__)
#include "native_client/src/public/imc_syscalls.h"
-typedef NaClAbiNaClImcMsgHdr NaClImcMsgHdr;
-#endif
-
-/* Duplicate a NaCl file descriptor. */
-NaClHandle NaClDuplicateNaClHandle(NaClHandle handle) {
- return dup(handle);
-}
-
-int NaClWouldBlock() {
- return (errno == EAGAIN) ? 1 : 0;
-}
-
-NaClHandle NaClBoundSocket(const NaClSocketAddress* address) {
- /*
- * TODO(shiki): Switch to the following once the make_bound_sock() prototype
- * is cleaned up.
- * return make_bound_sock(address);
- */
- return -1;
-}
+#include "native_client/src/shared/imc/nacl_imc_c.h"
int NaClSocketPair(NaClHandle pair[2]) {
jvoung (off chromium) 2015/07/08 17:20:10 It wasn't clear to me the difference in categoriza
Mark Seaborn 2015/07/08 17:40:13 The difference is that there is some test code tha
return imc_socketpair(pair);
@@ -47,52 +23,9 @@ int NaClClose(NaClHandle handle) {
return close(handle);
}
-int NaClSendDatagram(NaClHandle handle, const NaClMessageHeader* message,
- int flags) {
- return imc_sendmsg(handle, (const NaClImcMsgHdr *) message,
- flags);
-}
-
-int NaClSendDatagramTo(const NaClMessageHeader* message, int flags,
- const NaClSocketAddress* name) {
- return -1; /* TODO(bsy): how to implement this for NaCl? */
-}
-
-int NaClReceiveDatagram(NaClHandle handle, NaClMessageHeader* message,
- int flags) {
- return imc_recvmsg(handle, (NaClImcMsgHdr *) message, flags);
-}
-
NaClHandle NaClCreateMemoryObject(size_t length, int executable) {
if (executable) {
return -1; /* Will never work with NaCl and should never be invoked. */
}
return imc_mem_obj_create(length);
}
-
-void* NaClMap(struct NaClDescEffector* effp,
- void* start, size_t length, int prot, int flags,
- NaClHandle memory, off_t offset) {
- static int posix_prot[4] = {
- PROT_NONE,
- PROT_READ,
- PROT_WRITE,
- PROT_READ | PROT_WRITE
- };
- int adjusted = 0;
-
- if (flags & NACL_MAP_SHARED) {
- adjusted |= MAP_SHARED;
- }
- if (flags & NACL_MAP_PRIVATE) {
- adjusted |= MAP_PRIVATE;
- }
- if (flags & NACL_MAP_FIXED) {
- adjusted |= MAP_FIXED;
- }
- return mmap(start, length, posix_prot[prot & 3], adjusted, memory, offset);
-}
-
-int NaClUnmap(void* start, size_t length) {
- return munmap(start, length);
-}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698