Remove some globals from system_properties
pa_size should be static to prop_area, so make it so.
__system_property_area__ was reused for various purposes, but
realistically is a deprecated symbol and this finally separates us
from it.
Bug: 36001741
Test: boot bullhead, system property unit tests
Change-Id: I39663cc3b613093fa4c728b21d8ba58754f8e105
diff --git a/libc/system_properties/context_node.cpp b/libc/system_properties/context_node.cpp
index 440b865..13cef75 100644
--- a/libc/system_properties/context_node.cpp
+++ b/libc/system_properties/context_node.cpp
@@ -28,12 +28,11 @@
#include "context_node.h"
-#include <sys/mman.h>
#include <unistd.h>
#include <async_safe/log.h>
-#include "system_property_globals.h"
+#include "property_filename.h"
// pthread_mutex_lock() calls into system_properties in the case of contention.
// This creates a risk of dead lock if any system_properties functions
@@ -96,10 +95,5 @@
}
void ContextNode::Unmap() {
- if (!pa_) {
- return;
- }
-
- munmap(pa_, pa_size);
- pa_ = nullptr;
+ prop_area::unmap_prop_area(&pa_);
}