diff options
author | 2004-06-09 20:18:28 +0000 | |
---|---|---|
committer | 2004-06-09 20:18:28 +0000 | |
commit | c46fd98e83c3f85ee585e9e7b62f29adddc53812 (patch) | |
tree | 57e2c0dbf04e6280b6b0b0ad72e1f804cc234df6 /sys/kern/kern_subr.c | |
parent | rename POOLPAGE macros to pmap_map_direct (diff) | |
download | wireguard-openbsd-c46fd98e83c3f85ee585e9e7b62f29adddc53812.tar.xz wireguard-openbsd-c46fd98e83c3f85ee585e9e7b62f29adddc53812.zip |
Merge in a piece of the SMP branch into HEAD.
Introduce the cpu_info structure, p_cpu field in struct proc and global
scheduling context and various changed code to deal with this. At the
moment no architecture uses this stuff yet, but it will allow us slow and
controlled migration to the new APIs.
All new code is ifdef:ed out.
ok deraadt@ niklas@
Diffstat (limited to 'sys/kern/kern_subr.c')
-rw-r--r-- | sys/kern/kern_subr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index d9c4abba39a..52432e05522 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_subr.c,v 1.26 2003/10/31 11:10:41 markus Exp $ */ +/* $OpenBSD: kern_subr.c,v 1.27 2004/06/09 20:18:28 art Exp $ */ /* $NetBSD: kern_subr.c,v 1.15 1996/04/09 17:21:56 ragge Exp $ */ /* @@ -77,7 +77,12 @@ uiomove(cp, n, uio) switch (uio->uio_segflg) { case UIO_USERSPACE: +#ifdef __HAVE_CPUINFO + if (curcpu()->ci_schedstate.spc_schedflags & + SPCF_SHOULDYIELD) +#else if (p->p_schedflags & PSCHED_SHOULDYIELD) +#endif preempt(NULL); if (uio->uio_rw == UIO_READ) error = copyout(cp, iov->iov_base, cnt); |