s3/torture: use stack buffer for rbtree loop
[Samba.git] / source3 / lib / server_prefork_util.h
blob65e85dd3505791c38ba12328d41f74ba5b3286d3
1 /*
2 Unix SMB/CIFS implementation.
3 Prefork Helpers.
5 Copyright (C) Simo Sorce <idra@samba.org> 2011
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef _SERVER_PREFORK_UTIL_H_
22 #define _SERVER_PREFORK_UTIL_H_
24 struct tevent_context;
25 struct messaging_context;
27 #define PFH_INIT 0x00
28 #define PFH_NEW_MAX 0x01
29 #define PFH_ENOSPC 0x02
31 struct pf_daemon_config {
32 int prefork_status;
33 int min_children;
34 int max_children;
35 int spawn_rate;
36 int max_allowed_clients;
37 int child_min_life;
40 void pfh_daemon_config(const char *daemon_name,
41 struct pf_daemon_config *cfg,
42 struct pf_daemon_config *default_cfg);
44 void pfh_manage_pool(struct tevent_context *ev_ctx,
45 struct messaging_context *msg_ctx,
46 struct pf_daemon_config *cfg,
47 struct prefork_pool *pool);
49 void pfh_client_terminated(struct pf_worker_data *pf);
50 bool pfh_child_allowed_to_accept(struct pf_worker_data *pf);
52 #endif /* _SERVER_PREFORK_UTIL_H_ */