summaryrefslogtreecommitdiff
path: root/kern/bulletin_i.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-04-01 07:01:19 +0200
committerRichard Braun <rbraun@sceen.net>2018-04-01 07:01:19 +0200
commitcb86e4abaa7f3419ea0e096e5ca80ede5505a696 (patch)
treefe16a41d98641b45bc35177806fd16a4a09f6001 /kern/bulletin_i.h
parent076476fe6c0f4b947d4441afcfc97561bb23711c (diff)
kern/bulletin: new module
Diffstat (limited to 'kern/bulletin_i.h')
-rw-r--r--kern/bulletin_i.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/kern/bulletin_i.h b/kern/bulletin_i.h
new file mode 100644
index 0000000..ea0940a
--- /dev/null
+++ b/kern/bulletin_i.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2017-2018 Richard Braun.
+ *
+ * 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef KERN_BULLETIN_I_H
+#define KERN_BULLETIN_I_H
+
+#include <kern/list.h>
+#include <kern/spinlock.h>
+
+struct bulletin_sub {
+ struct list node;
+ bulletin_notif_fn_t notif_fn;
+ void *arg;
+};
+
+struct bulletin {
+ struct spinlock lock;
+ struct list subs;
+};
+
+#endif /* KERN_BULLETIN_I_H */