File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,13 @@ extern "C" {
62
62
*/
63
63
typedef int16_t device_handle_t ;
64
64
65
+ /*
66
+ * The build assert will fail if device_handle_t changes size, which
67
+ * means the alignment directives in the linker scripts and in
68
+ * `gen_handles.py` must be updated.
69
+ */
70
+ BUILD_ASSERT (sizeof (device_handle_t ) == 2 , "fix the linker scripts" );
71
+
65
72
/** @brief Flag value used in lists of device handles to separate
66
73
* distinct groups.
67
74
*
@@ -870,12 +877,7 @@ static inline bool z_impl_device_is_ready(const struct device *dev)
870
877
* files, which will be retained in subsequent links both wasting
871
878
* space and resulting in aggregate size changes relative to pass2
872
879
* when all objects will be in the same input section.
873
- *
874
- * The build assert will fail if device_handle_t changes size, which
875
- * means the alignment directives in the linker scripts and in
876
- * `gen_handles.py` must be updated.
877
880
*/
878
- BUILD_ASSERT (sizeof (device_handle_t ) == 2 , "fix the linker scripts" );
879
881
#define Z_DEVICE_HANDLES_DEFINE (node_id , dev_id , ...) \
880
882
extern Z_DEVICE_HANDLES_CONST device_handle_t \
881
883
Z_DEVICE_HANDLE_NAME(node_id, dev_id)[]; \
You can’t perform that action at this time.
0 commit comments