summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/drm/drm_linux.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2020-01-16 16:35:03 +0000
committermpi <mpi@openbsd.org>2020-01-16 16:35:03 +0000
commit9566af8920ce0c73af22f6155f3428b247ad2cc0 (patch)
tree1fbe95b2ac7601abd6418ad43a6a57c6a5924bd1 /sys/dev/pci/drm/drm_linux.c
parentturns out there WAS something fishy in signal handling in the "generic" (diff)
downloadwireguard-openbsd-9566af8920ce0c73af22f6155f3428b247ad2cc0.tar.xz
wireguard-openbsd-9566af8920ce0c73af22f6155f3428b247ad2cc0.zip
Introduce wakeup_proc() a function to un-SSTOP/SSLEEP a thread.
This moves most of the SCHED_LOCK() related to protecting the sleepqueue and its states to kern/kern_sync.c Name suggestion from jsg@, ok kettenis@, visa@
Diffstat (limited to 'sys/dev/pci/drm/drm_linux.c')
-rw-r--r--sys/dev/pci/drm/drm_linux.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/sys/dev/pci/drm/drm_linux.c b/sys/dev/pci/drm/drm_linux.c
index ddb8be808e9..851d90d5af6 100644
--- a/sys/dev/pci/drm/drm_linux.c
+++ b/sys/dev/pci/drm/drm_linux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_linux.c,v 1.55 2020/01/05 13:46:02 visa Exp $ */
+/* $OpenBSD: drm_linux.c,v 1.56 2020/01/16 16:35:03 mpi Exp $ */
/*
* Copyright (c) 2013 Jonathan Gray <jsg@openbsd.org>
* Copyright (c) 2015, 2016 Mark Kettenis <kettenis@openbsd.org>
@@ -115,20 +115,8 @@ schedule_timeout(long timeout)
int
wake_up_process(struct proc *p)
{
- int s, r = 0;
-
- SCHED_LOCK(s);
atomic_cas_ptr(&sch_proc, p, NULL);
- if (p->p_wchan) {
- if (p->p_stat == SSLEEP) {
- setrunnable(p);
- r = 1;
- } else
- unsleep(p);
- }
- SCHED_UNLOCK(s);
-
- return r;
+ return wakeup_proc(p, NULL);
}
void