summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2011-07-07 18:00:34 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2011-07-07 18:00:34 +0000
commitc5f3bbcb26284d9b4d7bc6b34ee7042ef8ad1ea7 (patch)
tree75d645a7f18e0a044a68a6ae3cbeed5f0c3f3f6e /sys
parent323960b486363ceabc2690ee5011f82978a752fc (diff)
Functions used in files other than where they are defined should be
declared in .h files, not in each .c. Apply that rule to endtsleep(), scheduler_start(), updatepri(), and realitexpire() ok deraadt@ tedu@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/init_main.c5
-rw-r--r--sys/kern/kern_fork.c4
-rw-r--r--sys/kern/kern_synch.c4
-rw-r--r--sys/kern/sched_bsd.c7
-rw-r--r--sys/sys/proc.h3
-rw-r--r--sys/sys/sched.h4
6 files changed, 9 insertions, 18 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 5607c8a6956..b2362b29af3 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.179 2011/07/06 21:41:37 art Exp $ */
+/* $OpenBSD: init_main.c,v 1.180 2011/07/07 18:00:33 guenther Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -191,10 +191,7 @@ main(void *framep)
quad_t lim;
int s, i;
extern struct pdevinit pdevinit[];
- extern void scheduler_start(void);
extern void disk_init(void);
- extern void endtsleep(void *);
- extern void realitexpire(void *);
/*
* Initialize the current process pointer (curproc) before
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 41b5332768d..59334cfdd03 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_fork.c,v 1.127 2011/07/06 21:41:37 art Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.128 2011/07/07 18:00:33 guenther Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
@@ -206,8 +206,6 @@ fork1(struct proc *p1, int exitsig, int flags, void *stack, size_t stacksize,
int count;
vaddr_t uaddr;
int s;
- extern void endtsleep(void *);
- extern void realitexpire(void *);
struct ptrace_state *newptstat = NULL;
#if NSYSTRACE > 0
void *newstrp = NULL;
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 137dbb35973..aebdfcb3c14 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_synch.c,v 1.96 2011/01/25 18:42:45 stsp Exp $ */
+/* $OpenBSD: kern_synch.c,v 1.97 2011/07/07 18:00:33 guenther Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*
@@ -57,8 +57,6 @@
#include <sys/ktrace.h>
#endif
-void updatepri(struct proc *);
-void endtsleep(void *);
/*
* We're only looking at 7 bits of the address; everything is
diff --git a/sys/kern/sched_bsd.c b/sys/kern/sched_bsd.c
index e24b022ee38..2a79afb234e 100644
--- a/sys/kern/sched_bsd.c
+++ b/sys/kern/sched_bsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sched_bsd.c,v 1.26 2011/07/06 01:49:42 art Exp $ */
+/* $OpenBSD: sched_bsd.c,v 1.27 2011/07/07 18:00:33 guenther Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*-
@@ -61,12 +61,7 @@ int rrticks_init; /* # of hardclock ticks per roundrobin() */
struct __mp_lock sched_lock;
#endif
-void scheduler_start(void);
-
-void roundrobin(struct cpu_info *);
void schedcpu(void *);
-void updatepri(struct proc *);
-void endtsleep(void *);
void
scheduler_start(void)
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 3ab22fdc185..3ad1dcb7cd9 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.h,v 1.140 2011/07/06 21:41:37 art Exp $ */
+/* $OpenBSD: proc.h,v 1.141 2011/07/07 18:00:33 guenther Exp $ */
/* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 christos Exp $ */
/*-
@@ -477,6 +477,7 @@ void pgdelete(struct pgrp *);
void procinit(void);
void resetpriority(struct proc *);
void setrunnable(struct proc *);
+void endtsleep(void *);
void unsleep(struct proc *);
void reaper(void);
void exit1(struct proc *, int, int);
diff --git a/sys/sys/sched.h b/sys/sys/sched.h
index f54e4e88aa6..fc2d3a54de1 100644
--- a/sys/sys/sched.h
+++ b/sys/sys/sched.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sched.h,v 1.28 2010/05/14 18:47:56 kettenis Exp $ */
+/* $OpenBSD: sched.h,v 1.29 2011/07/07 18:00:33 guenther Exp $ */
/* $NetBSD: sched.h,v 1.2 1999/02/28 18:14:58 ross Exp $ */
/*-
@@ -136,6 +136,8 @@ struct proc;
void schedclock(struct proc *);
struct cpu_info;
void roundrobin(struct cpu_info *);
+void scheduler_start(void);
+void updatepri(struct proc *);
void sched_init_cpu(struct cpu_info *);
void sched_idle(void *);