summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_sig.c6
-rw-r--r--sys/kern/kern_synch.c5
-rw-r--r--sys/kern/sched_bsd.c18
-rw-r--r--sys/sys/proc.h4
-rw-r--r--sys/sys/sched.h3
5 files changed, 15 insertions, 21 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 56b3af9558a..e212ea40b68 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.192 2016/01/09 06:13:43 semarie Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.193 2016/03/09 13:38:50 mpi Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -896,7 +896,7 @@ ptsignal(struct proc *p, int signum, enum signal_type type)
panic("psignal signal number");
#endif
- /* Ignore signal if we are exiting */
+ /* Ignore signal if the target process is exiting */
if (pr->ps_flags & PS_EXITING)
return;
@@ -980,7 +980,7 @@ ptsignal(struct proc *p, int signum, enum signal_type type)
} else {
action = SIG_DFL;
- if (prop & SA_KILL && pr->ps_nice > NZERO)
+ if (prop & SA_KILL && pr->ps_nice > NZERO)
pr->ps_nice = NZERO;
/*
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index da949842d4b..a57baf3a536 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_synch.c,v 1.128 2016/02/01 23:34:31 dlg Exp $ */
+/* $OpenBSD: kern_synch.c,v 1.129 2016/03/09 13:38:50 mpi Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*
@@ -59,7 +59,7 @@
#endif
int thrsleep(struct proc *, struct sys___thrsleep_args *);
-
+int thrsleep_unlock(void *, int);
/*
* We're only looking at 7 bits of the address; everything is
@@ -436,7 +436,6 @@ sys_sched_yield(struct proc *p, void *v, register_t *retval)
return (0);
}
-int thrsleep_unlock(void *, int);
int
thrsleep_unlock(void *lock, int lockflags)
{
diff --git a/sys/kern/sched_bsd.c b/sys/kern/sched_bsd.c
index 33db9c73d01..8b318df5996 100644
--- a/sys/kern/sched_bsd.c
+++ b/sys/kern/sched_bsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sched_bsd.c,v 1.42 2015/11/08 20:45:57 naddy Exp $ */
+/* $OpenBSD: sched_bsd.c,v 1.43 2016/03/09 13:38:50 mpi Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*-
@@ -60,7 +60,8 @@ int rrticks_init; /* # of hardclock ticks per roundrobin() */
struct __mp_lock sched_lock;
#endif
-void schedcpu(void *);
+void schedcpu(void *);
+void updatepri(struct proc *);
void
scheduler_start(void)
@@ -70,10 +71,9 @@ scheduler_start(void)
/*
* We avoid polluting the global namespace by keeping the scheduler
* timeouts static in this function.
- * We setup the timeouts here and kick schedcpu and roundrobin once to
- * make them do their job.
+ * We setup the timeout here and kick schedcpu once to make it do
+ * its job.
*/
-
timeout_set(&schedcpu_to, schedcpu, &schedcpu_to);
rrticks_init = hz / 10;
@@ -218,9 +218,7 @@ schedcpu(void *arg)
LIST_FOREACH(p, &allproc, p_list) {
/*
- * Increment time in/out of memory and sleep time
- * (if sleeping). We ignore overflow; with 16-bit int's
- * (remember them?) overflow takes 45 days.
+ * Increment sleep time (if sleeping). We ignore overflow.
*/
if (p->p_stat == SSLEEP || p->p_stat == SSTOP)
p->p_slptime++;
@@ -233,7 +231,7 @@ schedcpu(void *arg)
continue;
SCHED_LOCK(s);
/*
- * p_pctcpu is only for ps.
+ * p_pctcpu is only for diagnostic tools such as ps.
*/
#if (FSHIFT >= CCPU_SHIFT)
p->p_pctcpu += (phz == 100)?
@@ -550,7 +548,6 @@ resetpriority(struct proc *p)
* processes which haven't run much recently, and to round-robin among other
* processes.
*/
-
void
schedclock(struct proc *p)
{
@@ -715,4 +712,3 @@ sysctl_hwperfpolicy(void *oldp, size_t *oldlenp, void *newp, size_t newlen)
return 0;
}
#endif
-
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 19c7e7b7b03..2123e1a991e 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.h,v 1.216 2016/03/06 05:20:26 guenther Exp $ */
+/* $OpenBSD: proc.h,v 1.217 2016/03/09 13:38:50 mpi Exp $ */
/* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 christos Exp $ */
/*-
@@ -323,7 +323,7 @@ struct proc {
sigset_t p_sigmask; /* Current signal mask. */
u_char p_priority; /* Process priority. */
- u_char p_usrpri; /* User-priority based on p_cpu and ps_nice. */
+ u_char p_usrpri; /* User-priority based on p_estcpu and ps_nice. */
char p_comm[MAXCOMLEN+1];
int p_pledge_syscall; /* Cache of current syscall */
diff --git a/sys/sys/sched.h b/sys/sys/sched.h
index c7dfaadfd30..376302e8447 100644
--- a/sys/sys/sched.h
+++ b/sys/sys/sched.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sched.h,v 1.39 2015/09/13 11:15:11 kettenis Exp $ */
+/* $OpenBSD: sched.h,v 1.40 2016/03/09 13:38:50 mpi Exp $ */
/* $NetBSD: sched.h,v 1.2 1999/02/28 18:14:58 ross Exp $ */
/*-
@@ -139,7 +139,6 @@ void schedclock(struct proc *);
struct cpu_info;
void roundrobin(struct cpu_info *);
void scheduler_start(void);
-void updatepri(struct proc *);
void userret(struct proc *p);
void sched_init_cpu(struct cpu_info *);