From 05f71650ba57d60f6accd2d734cbb41cf8d3aea1 Mon Sep 17 00:00:00 2001 From: mquinson Date: Thu, 25 Mar 2010 17:08:28 +0000 Subject: [PATCH] make sure it still compiles with pthreads git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7384 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/simix/smx_context_lua.c | 15 +++++++++++++-- src/simix/smx_context_thread.c | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/simix/smx_context_lua.c b/src/simix/smx_context_lua.c index 50ec2402b0..2218c5b220 100644 --- a/src/simix/smx_context_lua.c +++ b/src/simix/smx_context_lua.c @@ -8,13 +8,22 @@ #include #include +#include "smx_context_private.h" + +/* We don't use that factory at all for now. This may change at some point, + * to reduce the amount of memory per user thread in sysv + */ + +lua_State *simgrid_lua_state; +void SIMIX_ctx_lua_factory_init(smx_context_factory_t *factory) { +} + +#ifdef KILLME /* lua can run with ultra tiny stacks since the user code lives in lua stacks, not the main one */ //#define CONTEXT_STACK_SIZE 4*1024 -#include "smx_context_sysv_private.h" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(lua); -lua_State *simgrid_lua_state; static smx_context_t smx_ctx_lua_create_context(xbt_main_func_t code, int argc, char** argv, @@ -81,3 +90,5 @@ smx_ctx_lua_resume(smx_context_t new_context) { smx_ctx_sysv_resume(new_context); } #endif + +#endif diff --git a/src/simix/smx_context_thread.c b/src/simix/smx_context_thread.c index c332693461..ff034efeda 100644 --- a/src/simix/smx_context_thread.c +++ b/src/simix/smx_context_thread.c @@ -14,6 +14,7 @@ #include "xbt/swag.h" #include "xbt/xbt_os_thread.h" #include "xbt_modinter.h" /* prototype of os thread module's init/exit in XBT */ +#include "simix/smx_context_private.h" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_context); -- 2.20.1