ne_get_unuse...rom_cpu_pool(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ne_get_unuse...rom_cpu_pool(9) β€” the Kernel API Manual glow-up πŸŽ€

okay bestie, so this is a page from the Kernel API Manual and honestly? It's short, it's sweet, and it's giving "tiny function, big responsibility." Let's get into it ✨


🌸 NAME 🌸

ne_get_unused_core_from_cpu_pool β€” get the id of a full core from the NE CPU pool 🧚

Like, that's literally the whole job. It reaches into the pool and pulls you out a core id. No cap.


✨ SYNOPSIS ✨

int ne_get_unused_core_from_cpu_pool (void );

that's it. that's the whole signature. iconic behavior honestly πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • void β€” no arguments. zero. none. she takes nothing and she gives you a core id (or a -1, we'll get there). main character energy fr 🫢

πŸ”₯ CONTEXT πŸ”₯

This is process context. And listen β€” she is not coming to you free and clear, okay? This function gets called with the ne_enclave and ne_cpu_pool mutexes held. Both of them. So if you're calling this, you better already be holding those locks, bestie πŸ˜­πŸ”’

fr fr do not mess with the locking here, that's the vibes police talking

πŸ‘‘ RETURN πŸ‘‘

  • Core id πŸ’– β€” slay, you got one
  • -1 if no CPU core available in the pool πŸ’€ β€” nope, pool's empty, try again later

🌈 SEE ALSO 🌈

okay this list is LONG and it ATE, so buckle up πŸ“ β€” everything here is a sibling in the Nitro Enclaves (NE) universe:

  • Kernel file ./drivers/virt/nitro_enclaves/ne_misc_dev.c β€” Enclave lifetime management driver for Nitro Enclaves (NE).(9)
  • NE_CPUS_SIZE(9)
  • NE_EIF_LOAD_OFFSET(9)
  • NE_MIN_ENCLAVE_MEM_SIZE(9)
  • NE_MIN_MEM_REGION_SIZE(9)
  • NE_PARENT_VM_CID(9)
  • struct ne_cpu_pool(9)
  • struct ne_phys_contig_mem_regions(9)
  • ne_check_enclaves_created(9)
  • ne_setup_cpu_pool(9)
  • ne_teardown_cpu_pool(9)
  • ne_set_kernel_param(9)
  • ne_donated_cpu(9)
  • ne_set_enclave_threads_per_core(9)
  • ne_get_cpu_from_cpu_pool(9)
  • ne_get_vcpu_core_from_cpu_pool(9)
  • ne_check_cpu_in_cpu_pool(9)
  • ne_add_vcpu_ioctl(9)
  • ne_sanity_check_user_mem_region(9)
  • ne_sanity_check_user_mem_region_page(9)
  • ne_sanity_check_phys_mem_region(9)
  • ne_merge_phys_contig_memory_regions(9)
  • ne_set_user_memory_region_ioctl(9)
  • ne_start_enclave_ioctl(9)
  • ne_enclave_ioctl(9)
  • ne_enclave_remove_all_mem_region_entries(9)
  • ne_enclave_remove_all_vcpu_id_entries(9)
  • ne_pci_dev_remove_enclave_entry(9)
  • ne_enclave_release(9)
  • ne_enclave_poll(9)
  • ne_create_vm_ioctl(9)
  • ne_ioctl(9)

like I said. she has a whole friend group 😭🫢


πŸ’œ one last thing bestie β€” this page is from ./drivers/virt/nitro_enclaves, October 2026, and it's filed under ne_get_unuse...rom_cpu_pool(9). yeah the title got truncated, we don't talk about it πŸ™ˆ love u, go get that core id πŸ’…βœ¨πŸŽ€
πŸ“¦ where this page comes from