[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 65/68] kern/mach_clock.c: remove forward declaration
From: |
Marin Ramesa |
Subject: |
[PATCH 65/68] kern/mach_clock.c: remove forward declaration |
Date: |
Fri, 29 Nov 2013 22:54:30 +0100 |
* Makefrag.am: Include kern/priority.h.
* kern/mach_clock.c (thread_quantum_update): Remove forward declaration.
Include kern/priority.h.
* kern/priority.h: New file.
Add copyright.
[_KERN_PRIORITY_H_]: Add ifndef.
(thread_quantum_update): Add prototype.
---
Makefrag.am | 1 +
kern/mach_clock.c | 2 +-
kern/priority.h | 28 ++++++++++++++++++++++++++++
3 files changed, 30 insertions(+), 1 deletion(-)
create mode 100644 kern/priority.h
diff --git a/Makefrag.am b/Makefrag.am
index b3f9521..39da40d 100644
--- a/Makefrag.am
+++ b/Makefrag.am
@@ -175,6 +175,7 @@ libkernel_a_SOURCES += \
kern/printf.c \
kern/printf.h \
kern/priority.c \
+ kern/priority.h \
kern/processor.c \
kern/processor.h \
kern/profile.c \
diff --git a/kern/mach_clock.c b/kern/mach_clock.c
index 5ff9c3b..e7bd4b9 100644
--- a/kern/mach_clock.c
+++ b/kern/mach_clock.c
@@ -54,6 +54,7 @@
#include <kern/thread.h>
#include <kern/time_stamp.h>
#include <kern/timer.h>
+#include <kern/priority.h>
#include <vm/vm_kern.h>
#include <sys/time.h>
#include <machine/mach_param.h> /* HZ */
@@ -148,7 +149,6 @@ void clock_interrupt(
* Increment the CPU time statistics.
*/
{
- extern void thread_quantum_update(); /* in priority.c */
int state;
if (usermode)
diff --git a/kern/priority.h b/kern/priority.h
new file mode 100644
index 0000000..2da93eb
--- /dev/null
+++ b/kern/priority.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2013 Free Software Foundation.
+ *
+ * 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 2 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, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _KERN_PRIORITY_H_
+#define _KERN_PRIORITY_H_
+
+extern void thread_quantum_update(
+ int mycpu,
+ thread_t thread,
+ int nticks,
+ int state);
+
+#endif /* _KERN_PRIORITY_H_ */
--
1.8.1.4
- [PATCH 52/68] vm/vm_user.c: remove forward declaration, (continued)
- [PATCH 52/68] vm/vm_user.c: remove forward declaration, Marin Ramesa, 2013/11/29
- [PATCH 51/68] vm/vm_resident.c: correct comment, Marin Ramesa, 2013/11/29
- [PATCH 53/68] Normalize whitespace, Marin Ramesa, 2013/11/29
- [PATCH 56/68] Remove unnecessary files, Marin Ramesa, 2013/11/29
- [PATCH 58/68] kern/time_stamp.c: remove multimax code, Marin Ramesa, 2013/11/29
- [PATCH 59/68] Type definition, Marin Ramesa, 2013/11/29
- [PATCH 60/68] device/net_io.c: remove forward declarations, Marin Ramesa, 2013/11/29
- [PATCH 61/68] i386/i386at/kd.c: remove forward declarations, Marin Ramesa, 2013/11/29
- [PATCH 62/68] i386/i386at/model_dep.c: remove forward declaration, Marin Ramesa, 2013/11/29
- [PATCH 63/68] ipc/ipc_entry.c: remove forward declaration, Marin Ramesa, 2013/11/29
- [PATCH 65/68] kern/mach_clock.c: remove forward declaration,
Marin Ramesa <=
- [PATCH 64/68] ipc/mach_port.c: remove forward declaration, Marin Ramesa, 2013/11/29
- [PATCH 66/68] ddb/db_variables.c: fix near initialization, Marin Ramesa, 2013/11/29
- [PATCH 67/68] device/ds_routines.c: fix initialization from incompatible pointer type, Marin Ramesa, 2013/11/29
- [PATCH 68/68] i386/i386at/com.h: include chips/busses.h for struct bus_device, Marin Ramesa, 2013/11/29
- [PATCH 57/68] Remove MACH_TTD code, Marin Ramesa, 2013/11/29
- [PATCH 54/68] Convert from K&R to ANSI, Marin Ramesa, 2013/11/29
- [PATCH 55/68] Declare void argument lists, Marin Ramesa, 2013/11/29