MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / next_num

Function next_num

src/setcpuaffinity.c:59–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59static int next_num(const char *str, char **end, int *result) {
60 if (!str || *str == '\0' || !isdigit(*str))
61 return -1;
62
63 *result = strtoul(str, end, 10);
64 if (str == *end)
65 return -1;
66
67 return 0;
68}
69
70/* set current thread cpu affinity to cpu list, this function works like
71 * taskset command (actually cpulist parsing logic reference to util-linux).

Callers 1

setcpuaffinityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected