diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-03-08 04:09:04 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-03-08 04:09:04 +0000 |
commit | dd4ead08fe3ba22637eed709529fd9dc6da2b6c6 (patch) | |
tree | 052b6a529dee54df89ccc09b971738a842325857 /sys/kern/kern_thread.c | |
parent | 27d6312bf7b744a7e8485139106650cd6657e76a (diff) | |
download | FreeBSD-src-dd4ead08fe3ba22637eed709529fd9dc6da2b6c6.zip FreeBSD-src-dd4ead08fe3ba22637eed709529fd9dc6da2b6c6.tar.gz |
Lock sched_lock before modifying td_flags.
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) |