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



##########
File path: arch/risc-v/src/common/riscv_internal.h
##########
@@ -121,6 +150,37 @@
 #define getreg64(a)         (*(volatile uint64_t *)(a))
 #define putreg64(v,a)       (*(volatile uint64_t *)(a) = (v))
 
+#define READ_CSR(reg) \
+  ({ \
+     uintptr_t reg##_val; \

Review comment:
       If needed we can go even more unique with
   ```
   #define __tmpname(name) tmp##name
   #define __uname(name)   __tmpname(name)
   
   uintptr_t __uname(__LINE__);
   ```




-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to