1 /* Copyright (c) 2016 Google Inc.
2 * Barret Rhoden <brho@cs.berkeley.edu>
3 * See LICENSE for details.
5 * Set and query the existence of cpu features.
7 * Note that I didn't provide a "cpu_clr_feat()" yet. These are intended to be
8 * write-once, read-many. */
12 #include <ros/procinfo.h>
15 static inline bool cpu_has_feat(int feature)
17 return test_bit(feature, __proc_global_info.cpu_feats);
20 static inline void cpu_set_feat(int feature)
22 __set_bit(feature, __proc_global_info.cpu_feats);