Re: Kernel code: executing once on each CPU?

Kostik Belousov <[email protected]> Tue, 3 Feb 2009 21:55:48 +0200
Newsgroups gmane.os.freebsd.devel.smp
Message-ID <[email protected]>
--oyUTqETQ0mS9luUI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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?
>=20
> I need to collect some data that's local to the individual CPUs/cores.
>=20
> 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.

--oyUTqETQ0mS9luUI
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkmIoUQACgkQC3+MBN1Mb4gBJwCdE1XHla19zwLZ0AFOWtG4labv
B1AAnjWoUiybp6vIgJTtoiHvu6jF4cky
=eRq4
-----END PGP SIGNATURE-----

--oyUTqETQ0mS9luUI--