summaryrefslogtreecommitdiff
path: root/kern/condition.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2014-06-18 23:35:45 +0200
committerRichard Braun <rbraun@sceen.net>2014-06-18 23:35:45 +0200
commit701a5d9cf5a9416eb8303d703049bf1d4c6c69f0 (patch)
tree0b0fa70492a01df7fb9511ccd388e220f7fc150d /kern/condition.h
parent6b5c9352dc34ef945259994b16c3e1fa1783aef4 (diff)
kern/thread: add thread_join
This change affects more files than it apparently would at first glance. This is because circular dependencies can easily be created between the thread, mutex, condition and spinlock modules. As a result, some of the types of these modules are now defined in kern/types.h.
Diffstat (limited to 'kern/condition.h')
-rw-r--r--kern/condition.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/kern/condition.h b/kern/condition.h
index 6802063b..9cd581a9 100644
--- a/kern/condition.h
+++ b/kern/condition.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Richard Braun.
+ * Copyright (c) 2013-2014 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
@@ -25,12 +25,9 @@
#include <kern/mutex.h>
#include <kern/spinlock.h>
#include <kern/stddef.h>
+#include <kern/types.h>
-struct condition {
- struct spinlock lock;
- struct mutex *mutex;
- struct list waiters;
-};
+struct condition;
#define CONDITION_INITIALIZER(condition) \
{ SPINLOCK_INITIALIZER, NULL, LIST_INITIALIZER((condition).waiters) }