linux-sysprog · beginner · ~15 min
Compare namespace identifiers.
Namespaces are identified by an inode number. Implement int same_namespace(unsigned long a, unsigned long b) returning 1 if the two namespace ids are equal, else 0.
int same_namespace(unsigned long a, unsigned long b) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.