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

Unified Diff: src/trusted/sel_universal/rpc_universal_system.cc

Issue 298443002: Remove unused support for SysV shared memory (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/sel_universal/rpc_universal.cc ('k') | src/trusted/service_runtime/include/bits/stat.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/sel_universal/rpc_universal_system.cc
diff --git a/src/trusted/sel_universal/rpc_universal_system.cc b/src/trusted/sel_universal/rpc_universal_system.cc
index ce75e5e002f369b321eb047d2e0ff0a1b940d27e..9b784cea41d546b5a3a0c0ededb3af046d919d12 100644
--- a/src/trusted/sel_universal/rpc_universal_system.cc
+++ b/src/trusted/sel_universal/rpc_universal_system.cc
@@ -6,12 +6,6 @@
#include <fcntl.h>
#include <string.h>
-#if NACL_LINUX && !NACL_ANDROID
-// for shmem cleanup
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include "native_client/src/trusted/desc/linux/nacl_desc_sysv_shm.h"
-#endif
#include <map>
#include <string>
@@ -27,38 +21,6 @@ using std::stringstream;
#include "native_client/src/trusted/service_runtime/include/sys/fcntl.h"
-namespace {
-
-// The main point of this class is to ensure automatic cleanup.
-// If the destructor is not invoked you need to manually cleanup
-// the shared memory descriptors via "ipcs -m" and "ipcrm -m <id>"
-class AddressMap {
- public:
- AddressMap() {}
-
- ~AddressMap() {
- // NOTE: you CANNOT call NaClLog - this is called too late
- // NaClLog(1, "cleanup\n");
-#if NACL_LINUX && !NACL_ANDROID
- typedef map<NaClDesc*, uintptr_t>::iterator IT;
- for (IT it = map_.begin(); it != map_.end(); ++it) {
- shmctl(reinterpret_cast<NaClDescSysvShm*>(it->first)->id, IPC_RMID, NULL);
- }
-#endif
- }
-
- void Add(NaClDesc* desc, uintptr_t addr) { map_[desc] = addr; }
-
- uintptr_t Get(NaClDesc* desc) { return map_[desc]; }
-
- private:
- map<NaClDesc*, uintptr_t> map_;
-};
-
-AddressMap GlobalAddressMap;
-
-} // namespace
-
bool HandlerSyncSocketCreate(NaClCommandLoop* ncl,
const vector<string>& args) {
if (args.size() < 3) {
« no previous file with comments | « src/trusted/sel_universal/rpc_universal.cc ('k') | src/trusted/service_runtime/include/bits/stat.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698