Date: Tue, 3 Feb 2009 21:55:48 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Martin Cracauer <cracauer@cons.org> Cc: freebsd-smp@freebsd.org Subject: Re: Kernel code: executing once on each CPU? Message-ID: <20090203195548.GA9427@deviant.kiev.zoral.com.ua> In-Reply-To: <20090203175728.GA55080@cons.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Tue, Feb 03, 2009 at 12:57:28PM -0500, Martin Cracauer wrote: > Is there a facility in FreeBSD that allows me to have a piece of code > executed on each processor, then return to the original thread when > that has been completed? > > I need to collect some data that's local to the individual CPUs/cores. > > In Linux there is/was smp_call_function(func, ...). Look at the smp_rendezvous() in the subr_smp.c. Note that the functions are called in quite restricted context. [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmIoUQACgkQC3+MBN1Mb4gBJwCdE1XHla19zwLZ0AFOWtG4labv B1AAnjWoUiybp6vIgJTtoiHvu6jF4cky =eRq4 -----END PGP SIGNATURE-----help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090203195548.GA9427>
