Kernel code: executing once on each CPU?

Kostik Belousov kostikbel at gmail.com
Tue Feb 3 12:35:13 PST 2009


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-smp/attachments/20090203/a0ac6afe/attachment.pgp


More information about the freebsd-smp mailing list