mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Lock sched_lock before modifying td_flags.
This commit is contained in:
parent
1108975fe0
commit
b4508d7d3f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111976
@ -1087,7 +1087,9 @@ thread_statclock(int user)
|
||||
return (-1);
|
||||
if (user) {
|
||||
/* Current always do via ast() */
|
||||
mtx_lock_spin(&sched_lock);
|
||||
td->td_flags |= (TDF_USTATCLOCK|TDF_ASTPENDING);
|
||||
mtx_unlock_spin(&sched_lock);
|
||||
td->td_uuticks++;
|
||||
} else {
|
||||
if (td->td_mailbox != NULL)
|
||||
|
@ -1087,7 +1087,9 @@ thread_statclock(int user)
|
||||
return (-1);
|
||||
if (user) {
|
||||
/* Current always do via ast() */
|
||||
mtx_lock_spin(&sched_lock);
|
||||
td->td_flags |= (TDF_USTATCLOCK|TDF_ASTPENDING);
|
||||
mtx_unlock_spin(&sched_lock);
|
||||
td->td_uuticks++;
|
||||
} else {
|
||||
if (td->td_mailbox != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user