pkarashchenko commented on a change in pull request #5962:
URL: https://github.com/apache/incubator-nuttx/pull/5962#discussion_r841115942



##########
File path: arch/risc-v/src/common/riscv_percpu.h
##########
@@ -39,9 +39,9 @@
  ****************************************************************************/
 
 #ifdef __ASSEMBLY__
-#define SCRATCH_HARTID_OFFSET   (0 * INT_REG_SIZE)
+#define RISCV_HARTID_OFFSET   (0 * INT_REG_SIZE)
 #else
-#define SCRATCH_HARTID_OFFSET   offsetof(riscv_percpu_s, hartid)
+#define RISCV_HARTID_OFFSET   offsetof(riscv_percpu_s, hartid)

Review comment:
       What about??
   ```
   #define RISCV_HARTID_OFFSET (0)
   #ifndef __ASSEMBLY__
   _Static_assert(RISCV_HARTID_OFFSET == offsetof(riscv_percpu_s, hartid), 
"Error");
   #ensif
   ```
   I'm not sure if it works. Maybe static assert can be placed in C file.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to