Date: Sun, 9 Feb 2003 19:21:34 +1100 From: Tim Robbins <tjr@FreeBSD.org> To: Julian Elischer <julian@elischer.org> Cc: Bruce Evans <bde@zeta.org.au>, Julian Elischer <julian@FreeBSD.org>, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys proc.h src/sys/kern kern_clock.c Message-ID: <20030209192134.A10064@dilbert.robbins.dropbear.id.au> In-Reply-To: <200302090606.WAA33546@InterJet.elischer.org>; from julian@elischer.org on Sat, Feb 08, 2003 at 10:06:46PM -0800 References: <200302090606.WAA33546@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 08, 2003 at 10:06:46PM -0800, Julian Elischer wrote: [...] > So it turns out the code is correct. Thanks for the explanation. It seems reasonable now. My other concern is protecting addupc_{intr,task}() from profil() and also protecting addupc_task() from itself. There's an splstatclock() call in profil() which was presumably there to stop profil() from interfering with p_stats->p_prof while addupc_* were running. Maybe we could have a spinlock in struct uprof to synchronise access to it... I'm not entirely comfortable about this piece of code in the presence of multiple threads, either. It looks like it could lose ticks. addr = prof->pr_base + i; if (copyin(addr, &v, sizeof(v)) == 0) { v += ticks; if (copyout(&v, addr, sizeof(v)) == 0) Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030209192134.A10064>