summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorMarin Ramesa <mpr@hi.t-com.hr>2013-11-29 22:54:07 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-12-05 06:44:53 +0900
commit4c427f351acb585bf06f63218cb8ced221d889e0 (patch)
tree9548718d2fd901b70f6057eb93ee1ad2b55aeb40 /kern
parent34918f3816982301834a313f655e13804d6b8ac5 (diff)
kern/task.c: remove forward declarations
* ipc/ipc_mqueue.h: Include ipc/ipc_kmsg_queue.h. * kern/ipc_kobject.h: Move includes into ifndef. * kern/syscall_emulation.h: Include kern/task.h. (eml_init, eml_task_reference, eml_task_deallocate): Add prototypes. * kern/task.c: Include kern/syscall_emulation.h. (eml_init, eml_task_reference, eml_task_deallocate): Remove forward declarations
Diffstat (limited to 'kern')
-rw-r--r--kern/ipc_kobject.h5
-rw-r--r--kern/syscall_emulation.h6
-rw-r--r--kern/task.c5
3 files changed, 9 insertions, 7 deletions
diff --git a/kern/ipc_kobject.h b/kern/ipc_kobject.h
index cb79574..606a66a 100644
--- a/kern/ipc_kobject.h
+++ b/kern/ipc_kobject.h
@@ -36,13 +36,12 @@
* Declarations for letting a port represent a kernel object.
*/
-#include <ipc/ipc_kmsg.h>
-#include <ipc/ipc_types.h>
-
#ifndef _KERN_IPC_KOBJECT_H_
#define _KERN_IPC_KOBJECT_H_
#include <mach/machine/vm_types.h>
+#include <ipc/ipc_types.h>
+#include <ipc/ipc_kmsg.h>
typedef vm_offset_t ipc_kobject_t;
diff --git a/kern/syscall_emulation.h b/kern/syscall_emulation.h
index 501b0a8..bf20e44 100644
--- a/kern/syscall_emulation.h
+++ b/kern/syscall_emulation.h
@@ -33,6 +33,7 @@
#ifndef __ASSEMBLER__
#include <mach/machine/vm_types.h>
#include <kern/lock.h>
+#include <kern/task.h>
typedef vm_offset_t eml_routine_t;
@@ -56,6 +57,11 @@ typedef vm_offset_t *emulation_vector_t; /* Variable-length array */
#define EML_MOD (err_kern|err_sub(2))
#define EML_BAD_TASK (EML_MOD|0x0001)
#define EML_BAD_CNT (EML_MOD|0x0002)
+
+extern void eml_init(void);
+extern void eml_task_reference(task_t task, task_t parent);
+extern void eml_task_deallocate(task_t task);
+
#endif /* __ASSEMBLER__ */
#endif /* _KERN_SYSCALL_EMULATION_H_ */
diff --git a/kern/task.c b/kern/task.c
index f62e47b..933a90e 100644
--- a/kern/task.c
+++ b/kern/task.c
@@ -47,16 +47,13 @@
#include <kern/processor.h>
#include <kern/sched_prim.h> /* for thread_wakeup */
#include <kern/ipc_tt.h>
+#include <kern/syscall_emulation.h>
#include <vm/vm_kern.h> /* for kernel_map, ipc_kernel_map */
#include <machine/machspl.h> /* for splsched */
task_t kernel_task = TASK_NULL;
struct kmem_cache task_cache;
-extern void eml_init(void);
-extern void eml_task_reference(task_t, task_t);
-extern void eml_task_deallocate(task_t);
-
void task_init(void)
{
kmem_cache_init(&task_cache, "task", sizeof(struct task), 0,