1
0
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:
David Xu 2003-03-08 04:09:04 +00:00
parent 1108975fe0
commit b4508d7d3f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111976
2 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -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)