diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-03-30 09:17:46 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-03-30 09:17:46 +0100 |
commit | 4f0bfe0fb8dc608a94fe429c5ddb12e58997e1ce (patch) | |
tree | fc81407d959370278dfdb53da69c5ab8b3fef55c /sys/src/9/port/dtracytimer.c | |
parent | ac3147a9c58f339f9b978ab087464912c16bc8f8 (diff) |
dtracy: avoid dmachlock() race
between being commited to a machno and having acquired the lock, the
scheduler could come in an schedule us on a different processor. the
solution is to have dtmachlock() take a special -1 argument to mean
"current mach" and return the actual mach number after the lock has
been acquired and interrupts being disabled.
Diffstat (limited to 'sys/src/9/port/dtracytimer.c')
-rw-r--r-- | sys/src/9/port/dtracytimer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/port/dtracytimer.c b/sys/src/9/port/dtracytimer.c index 0c39a1042..7ca89c1a6 100644 --- a/sys/src/9/port/dtracytimer.c +++ b/sys/src/9/port/dtracytimer.c @@ -17,7 +17,7 @@ dtracytimer(void *) memset(&info, 0, sizeof(info)); for(;;){ tsleep(&up->sleep, return0, nil, 1000); - dtptrigger(timerprobe, m->machno, &info); + dtptrigger(timerprobe, &info); } } |