sync code with last improvements from OpenBSD

This commit is contained in:
purplerain 2023-09-01 02:20:20 +00:00
parent ecb53bfacf
commit f8bbd6dd90
Signed by: purplerain
GPG Key ID: F42C07F07E2E35B7
2 changed files with 23 additions and 29 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: kern_sched.c,v 1.87 2023/08/29 16:19:34 claudio Exp $ */
/* $OpenBSD: kern_sched.c,v 1.88 2023/08/31 19:29:51 cheloha Exp $ */
/*
* Copyright (c) 2007, 2008 Artur Grabowski <art@openbsd.org>
*
@ -88,26 +88,15 @@ sched_init_cpu(struct cpu_info *ci)
spc->spc_idleproc = NULL;
if (spc->spc_itimer == NULL) {
spc->spc_itimer = clockintr_establish(&ci->ci_queue,
itimer_update);
if (spc->spc_itimer == NULL) {
panic("%s: clockintr_establish itimer_update",
__func__);
}
}
if (spc->spc_profclock == NULL) {
spc->spc_profclock = clockintr_establish(&ci->ci_queue,
profclock);
spc->spc_itimer = clockintr_establish(&ci->ci_queue, itimer_update);
if (spc->spc_itimer == NULL)
panic("%s: clockintr_establish itimer_update", __func__);
spc->spc_profclock = clockintr_establish(&ci->ci_queue, profclock);
if (spc->spc_profclock == NULL)
panic("%s: clockintr_establish profclock", __func__);
}
if (spc->spc_roundrobin == NULL) {
spc->spc_roundrobin = clockintr_establish(&ci->ci_queue,
roundrobin);
spc->spc_roundrobin = clockintr_establish(&ci->ci_queue, roundrobin);
if (spc->spc_roundrobin == NULL)
panic("%s: clockintr_establish roundrobin", __func__);
}
kthread_create_deferred(sched_kthreads_create, ci);

View File

@ -1,5 +1,5 @@
#!/bin/ksh
# $OpenBSD: fw_update.sh,v 1.45 2023/08/31 18:19:21 afresh1 Exp $
# $OpenBSD: fw_update.sh,v 1.47 2023/08/31 21:29:53 afresh1 Exp $
#
# Copyright (c) 2021,2023 Andrew Hewus Fresh <afresh1@openbsd.org>
#
@ -259,18 +259,23 @@ lock_db() {
[ -e /usr/bin/perl ] || return 0
set -o monitor
perl <<'EOL' |&
use v5.16;
use warnings;
perl <<-'EOL' |&
no lib ('/usr/local/libdata/perl5/site_perl');
use v5.36;
use OpenBSD::PackageInfo qw< lock_db >;
$|=1;
$0 = "fw_update: lock_db";
lock_db(0);
say $$;
sleep;
# Wait for STDOUT to be readable, which won't happen
# but if our parent exits unexpectedly it will close.
my $rin = '';
vec($rin, fileno(STDOUT), 1) = 1;
select $rin, '', '', undef;
EOL
set +o monitor
@ -702,7 +707,7 @@ for f in "${add[@]}" _update_ "${update[@]}"; do
if "$pending_status"; then
echo " failed."
elif ! ((VERBOSE)); then
status "failed (${f##*/})"
status " failed (${f##*/})"
fi
continue
}
@ -725,7 +730,7 @@ for f in "${add[@]}" _update_ "${update[@]}"; do
if "$pending_status"; then
echo " failed."
elif ! ((VERBOSE)); then
status "failed ($i)"
status " failed ($i)"
fi
continue
}
@ -736,7 +741,7 @@ for f in "${add[@]}" _update_ "${update[@]}"; do
if "$pending_status"; then
echo " failed."
elif ! ((VERBOSE)); then
status "failed (${f##*/})"
status " failed (${f##*/})"
fi
continue
}