NULLOP(9)
π NULLOP(9) β like, the kernel's built-in do nothing squad
okay bestie so this is a Kernel Developer's Manual page, section 9, and it's literally about functions that do absolutely nothing (or fail on purpose). no cap, that's the whole vibe. π
β¨ NAME β¨
nullop β dummy functions π«Ά
πΈ SYNOPSIS πΈ
#include <sys/systm.h>
int
nullop(void *v);
void
voidop(void);
int
enodev(void);
int
enxio(void);
int
enoioctl(void);
int
enosys(void);
int
eopnotsupp(void);
π¦ DESCRIPTION π¦
k so, nullop() is the original "null operation" β a generic one. it always returns the value 0. that's it. that's the whole job. iconic honestly. β¨
voidop() takes no arguments and does nothing. queen of minding her own business π
and then we have the fail squad β enodev(), enxio(), enoioctl(), enosys(), and eopnotsupp(). these always fail, and they return ENODEV, ENXIO, ENOTTY, ENOSYS, and EOPNOTSUPP, respectively. yes, in that exact order, don't mix them up bestie π
ngl the mapping is the whole point:enoioctl()hands backENOTTY(notENOIOCTL, which isn't a thing), so keep your eyes on that one π
π₯ EXAMPLES π₯
here's a case where nullop() genuinely comes in clutch:
uint64_t xc;
...
xc = xc_broadcast(0, (xcfunc_t)nullop, NULL, NULL);
xc_wait(xc);
like, you need a function pointer and you've got nothing to actually do? boom. nullop. main character energy π
π that's the whole page babes π this is from the Debian edition, dated July 25, 2010 β vintage, honestly. go forth and return 0 π§ββοΈπΈ
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2010 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms