From 3617701208c6fd63386442d2d107d37ff7d22041 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sun, 25 May 2014 15:53:23 +0200 Subject: include: fix the embedded type definitions in memory_object.defs In order to use MIG translation functions to lookup memory objects, preprocessor macros have been introduced into the definition of memory_object_t in 50cc5152. The procedure definitions contain inlined type definitions in order to change the type of the argument in question (i.e. to make it polymorphic). The inline definitions however lack the destructor function, leading to reference leaks when a reference is acquired in the intran function. * include/mach/memory_object.defs: Add the destructor functions to the inlined type definitions. --- include/mach/memory_object.defs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/mach') diff --git a/include/mach/memory_object.defs b/include/mach/memory_object.defs index 0ed8dbc..1ae36aa 100644 --- a/include/mach/memory_object.defs +++ b/include/mach/memory_object.defs @@ -92,6 +92,9 @@ simpleroutine memory_object_terminate( ctype: mach_port_t #ifdef MEMORY_OBJECT_INTRAN intran: MEMORY_OBJECT_INTRAN +#endif +#ifdef MEMORY_OBJECT_DESTRUCTOR + destructor: MEMORY_OBJECT_DESTRUCTOR #endif ; #if SEQNOS @@ -232,6 +235,9 @@ simpleroutine memory_object_lock_completed( ctype: mach_port_t #ifdef MEMORY_OBJECT_INTRAN intran: MEMORY_OBJECT_INTRAN +#endif +#ifdef MEMORY_OBJECT_DESTRUCTOR + destructor: MEMORY_OBJECT_DESTRUCTOR #endif ; #if SEQNOS @@ -267,6 +273,9 @@ simpleroutine memory_object_supply_completed( ctype: mach_port_t #ifdef MEMORY_OBJECT_INTRAN intran: MEMORY_OBJECT_INTRAN +#endif +#ifdef MEMORY_OBJECT_DESTRUCTOR + destructor: MEMORY_OBJECT_DESTRUCTOR #endif ; #if SEQNOS @@ -317,6 +326,9 @@ simpleroutine memory_object_change_completed( ctype: mach_port_t #ifdef MEMORY_OBJECT_INTRAN intran: MEMORY_OBJECT_INTRAN +#endif +#ifdef MEMORY_OBJECT_DESTRUCTOR + destructor: MEMORY_OBJECT_DESTRUCTOR #endif ; #if SEQNOS -- cgit v1.2.3