From 9cd85ddcf72ebda6c282be211c21f5bbb4464d56 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 25 Aug 2015 08:59:33 +0200 Subject: [PATCH] hw: call lock_for_destruction in platform_pd Issue #1607 --- repos/base-hw/src/core/include/platform_pd.h | 5 +++++ repos/base-hw/src/core/platform_pd.cc | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/repos/base-hw/src/core/include/platform_pd.h b/repos/base-hw/src/core/include/platform_pd.h index 8b5c247bee..43ea6d067b 100644 --- a/repos/base-hw/src/core/include/platform_pd.h +++ b/repos/base-hw/src/core/include/platform_pd.h @@ -180,6 +180,11 @@ class Genode::Platform_pd : public Hw::Address_space, */ Platform_pd(Allocator * md_alloc, char const *label); + /** + * Destructor + */ + ~Platform_pd(); + /** * Bind thread 't' to protection domain * diff --git a/repos/base-hw/src/core/platform_pd.cc b/repos/base-hw/src/core/platform_pd.cc index 3f3d6d4487..f3305afdbd 100644 --- a/repos/base-hw/src/core/platform_pd.cc +++ b/repos/base-hw/src/core/platform_pd.cc @@ -167,6 +167,12 @@ Platform_pd::Platform_pd(Allocator * md_alloc, char const *label) } } +Platform_pd::~Platform_pd() +{ + /* invalidate weak pointers to this object */ + Address_space::lock_for_destruction(); +} + /************************************* ** Core_platform_pd implementation **