enum c7_order {C7_LT, C7_EQ, C7_GT};
instead of a signed int which seems to be the idiomatic way in C? $ git grep -P '^[\t ].*[a-z].*\*[ ]*const\W' v4.9
returns 1,779 matches. Here are some from kernel/ v4.9:kernel/time/posix-cpu-timers.c: struct signal_struct *const sig = tsk->signal;
v4.9:kernel/tracepoint.c: struct tracepoint * const *end)
v4.9:kernel/tracepoint.c: struct tracepoint * const *iter;
v4.9:kernel/tracepoint.c: struct tracepoint * const *end,
v4.9:kernel/tracepoint.c: struct tracepoint * const *iter;
Many of the matches are the same as your "array of string constants" example, but just defined at local scope. And many are just constant local variables which some may not consider worth making const. The ones from tracepoint.c above are probably walking an array of const pointers by pointer instead of by index for example though, which is a common case where pointers to const pointers are used, which are legitimately useful. alarm(1);
// alarm could theoretically be triggered here before read() syscall is executed
read(...);
This sort of problem is what the self pipe trick https://cr.yp.to/docs/selfpipe.html is made to solve. I believe it is not really necessary anymore because there are functions like pselect() which solve this by accepting a sigmask parameter.
The most expensive component, the DWM3001CTR13 Ultra-WideBand module, is $37.77 in single quantities. I don't know much about about UWB, but I wonder if instead putting a BLE beacon on the tracker and using a chip supporting Bluetooth direction finding on the home station could allow the tracker to be a bit smaller and cheaper at the cost of some localization performance for the indoor mode (actually I just saw someone already brought this up in the project Slack).
This isn't including the Home Station part which doesn't seem fully documented yet.It looks like there is more discussion on the project Slack.