summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpd.h
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-05-24 14:22:25 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-05-24 14:22:25 +0000
commit576522606d25ccb68ce580aa9b2d77ae382c9c2d (patch)
treef88ad8bb62fe63d49e1c80739d0ac06c72e5c269 /usr.sbin/smtpd/smtpd.h
parent1d52421f171ee8c2a55ae5923fae4352e1f531fb (diff)
Instead of keeping stats private to each process, and querying every
process individually whenever stats need to be fetched, keep stats in MAP_ANON shared memory allocated by parent. This means control has direct access to stats and can respond very quickly without troubling any other daemon processes. ok gilles@
Diffstat (limited to 'usr.sbin/smtpd/smtpd.h')
-rw-r--r--usr.sbin/smtpd/smtpd.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index 11d9e0ac147..d8ff2ca2bf4 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.112 2009/05/20 14:29:44 gilles Exp $ */
+/* $OpenBSD: smtpd.h,v 1.113 2009/05/24 14:22:24 jacekm Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -670,6 +670,8 @@ struct smtpd {
SPLAY_HEAD(batchtree, batch) batch_queue;
SPLAY_HEAD(mdaproctree, mdaproc) mdaproc_queue;
SPLAY_HEAD(lkatree, lkasession) lka_sessions;
+
+ struct stats *stats;
};
struct s_parent {
@@ -707,14 +709,11 @@ struct s_session {
};
struct stats {
- int fd;
- union u_stats {
- struct s_parent parent;
- struct s_queue queue;
- struct s_runner runner;
- struct s_session smtp;
- struct s_session mta;
- } u;
+ struct s_parent parent;
+ struct s_queue queue;
+ struct s_runner runner;
+ struct s_session mta;
+ struct s_session smtp;
};
struct sched {