Branch: Tag:

2000-03-20

2000-03-20 07:05:19 by Martin Stjernholm <mast@lysator.liu.se>

Lock the config object while doing enable and disable of modules.

Rev: server/base_server/configuration.pike:1.286

3:   //   // German translation by Kai Voigt    - constant cvs_version = "$Id: configuration.pike,v 1.285 2000/03/20 04:08:19 nilsson Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.286 2000/03/20 07:05:19 mast Exp $";   constant is_configuration = 1;   #include <module.h>   #include <roxen.h>
2243:    string _sprintf( ) { return "ModuleCopies()"; }   }    + #ifdef THREADS + Thread.Mutex enable_modules_mutex = Thread.Mutex(); + #define MODULE_LOCK \ +  Thread.MutexKey enable_modules_lock = enable_modules_mutex->lock (2) + #else + #define MODULE_LOCK + #endif +    static int enable_module_batch_msgs;      RoxenModule enable_module( string modname, RoxenModule|void me )   { -  +  MODULE_LOCK;    int id;    ModuleInfo moduleinfo;    ModuleCopies module;
2830:      int disable_module( string modname )   { +  MODULE_LOCK;    RoxenModule me;    int id, pr;    sscanf(modname, "%s#%d", modname, id );
3029:      void enable_all_modules()   { +  MODULE_LOCK;    int q = query( "no_delayed_load" );    set( "no_delayed_load", 0 );    low_init( );