waf: Remove lib prefix from libraries manually.
[kai/samba.git] / source4 / smbd / process_model.c
index 8fdf5cc2f590a26f087352609aad4288652b909c..d3f234eb41c921155bafdf33c2f9659ab4f4a842 100644 (file)
@@ -6,7 +6,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
-#include "smb_server/smb_server.h"
-#include "smb_build.h"
+#include "smbd/process_model.h"
+#include "param/param.h"
+
+static const struct model_ops *process_model_byname(const char *name);
 
 /*
   setup the events for the chosen process model
 */
-const struct model_ops *process_model_startup(struct event_context *ev, const char *model)
+_PUBLIC_ const struct model_ops *process_model_startup(struct tevent_context *ev, const char *model)
 {
        const struct model_ops *ops;
 
@@ -53,7 +54,7 @@ static int num_models;
   The 'name' can be later used by other backends to find the operations
   structure for this backend.  
 */
-NTSTATUS register_process_model(const void *_ops)
+_PUBLIC_ NTSTATUS register_process_model(const void *_ops)
 {
        const struct model_ops *ops = _ops;
 
@@ -80,10 +81,15 @@ NTSTATUS register_process_model(const void *_ops)
        return NT_STATUS_OK;
 }
 
-NTSTATUS process_model_init(void)
+_PUBLIC_ NTSTATUS process_model_init(struct loadparm_context *lp_ctx)
 {
-       init_module_fn static_init[] = STATIC_PROCESS_MODEL_MODULES;
-       init_module_fn *shared_init = load_samba_modules(NULL, "process_model");
+       extern NTSTATUS process_model_thread_init(void);
+       extern NTSTATUS process_model_standard_init(void);
+       extern NTSTATUS process_model_prefork_init(void);
+       extern NTSTATUS process_model_onefork_init(void);
+       extern NTSTATUS process_model_single_init(void);
+       init_module_fn static_init[] = { STATIC_process_model_MODULES };
+       init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx, "process_model");
 
        run_init_functions(static_init);
        run_init_functions(shared_init);
@@ -96,7 +102,7 @@ NTSTATUS process_model_init(void)
 /*
   return the operations structure for a named backend of the specified type
 */
-const struct model_ops *process_model_byname(const char *name)
+static const struct model_ops *process_model_byname(const char *name)
 {
        int i;