diff options
-rw-r--r-- | sys/kern/kern_kse.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_thread.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c index 4c692e5..18b55d5 100644 --- a/sys/kern/kern_kse.c +++ b/sys/kern/kern_kse.c @@ -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) diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 4c692e5..18b55d5 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -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) |