MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dpcpu_copy

Function dpcpu_copy

freebsd/kern/subr_pcpu.c:249–265  ·  view source on GitHub ↗

* Initialize the per-cpu storage from an updated linker-set region. */

Source from the content-addressed store, hash-verified

247 * Initialize the per-cpu storage from an updated linker-set region.
248 */
249void
250dpcpu_copy(void *s, int size)
251{
252#ifdef SMP
253 uintptr_t dpcpu;
254 int i;
255
256 CPU_FOREACH(i) {
257 dpcpu = dpcpu_off[i];
258 if (dpcpu == 0)
259 continue;
260 memcpy((void *)(dpcpu + (uintptr_t)s), s, size);
261 }
262#else
263 memcpy((void *)(dpcpu_off[0] + (uintptr_t)s), s, size);
264#endif
265}
266
267/*
268 * Destroy a struct pcpu.

Callers 3

link_elf_link_preloadFunction · 0.85
link_elf_load_fileFunction · 0.85
parse_dpcpuFunction · 0.85

Calls 1

memcpyFunction · 0.50

Tested by

no test coverage detected