From 48517ca661895a0c70093e78f165866cb9363206 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Tue, 18 Feb 2014 09:56:23 +0100 Subject: Lanes init crash fix * bumped version to 3.9.1 * keeper array is allocated with master state's alloc function instead of malloc()/free() * prevent application crash when specifying a very large number of keepers in the configuration options * removed some keeper desinit legacy dead code * any error occuring during one-time inits is raised outside the one-time mutex protected code region --- src/keeper.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/keeper.h') diff --git a/src/keeper.h b/src/keeper.h index ed11ec4..5a52f3b 100644 --- a/src/keeper.h +++ b/src/keeper.h @@ -8,15 +8,8 @@ struct s_Keeper //int count; }; -// if enabled, call close_keepers at the very last as we want to be sure no thread is GCing after. -// (and therefore may perform linda object dereferencing after keepers are gone) -// problem: maybe on some platforms (linux) atexit() is called after DLL/so are unloaded... -#define HAVE_KEEPER_ATEXIT_DESINIT 0 - -char const* init_keepers( lua_State* L); -#if !HAVE_KEEPER_ATEXIT_DESINIT -void close_keepers( void); -#endif // HAVE_KEEPER_ATEXIT_DESINIT +int init_keepers( lua_State* L); +void close_keepers( lua_State* L); struct s_Keeper *keeper_acquire( unsigned long magic_); #define KEEPER_MAGIC_SHIFT 3 -- cgit v1.2.3-55-g6feb