zouboan commented on issue #6012: URL: https://github.com/apache/nuttx/issues/6012#issuecomment-1793402243
I tried use rwlock_t in #10776 to solve this issue, but unfortunately, there are some compilation errors: ``` CXX: libcxxmini/libxx_delete.cxx In file included from /home/zouboan/d/FeedForward/nuttx/include/nuttx/spinlock.h:36, from /home/zouboan/d/FeedForward/nuttx/include/nuttx/fs/fs.h:42, from /home/zouboan/d/FeedForward/nuttx/include/nuttx/lib/lib.h:30, from libcxxmini/libxx_delete.cxx:26: /home/zouboan/gcc-arm-none-eabi-10-2020-q4-major/lib/gcc/arm-none-eabi/10.2.1/include/stdatomic.h:40:9: error: '_Atomic' does not name a type ``` because c++ file can't include stdatomic.h, which result spinlock.h can't be included by c++ file. I tried solve this problem by: ``` #if defined(__cplusplus) #include <atomic> # define Atomic(X) std::atomic< X > #else #include <stdatomic.h> #endif ``` but it leads to another compilation errors: ``` CXX: libcxxmini/libxx_delete.cxx In file included from /home/zouboan/d/FeedForward/nuttx/include/nuttx/fs/fs.h:42, from /home/zouboan/d/FeedForward/nuttx/include/nuttx/lib/lib.h:30, from libcxxmini/libxx_delete.cxx:26: /home/zouboan/d/FeedForward/nuttx/include/nuttx/spinlock.h:37:10: fatal error: atomic: No such file or directory 37 | #include <atomic> ``` -- 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