pkarashchenko commented on PR #7649: URL: https://github.com/apache/incubator-nuttx/pull/7649#issuecomment-1324082320
What about this code: ``` /* Loop until we successfully take the spinlock (i.e., until the previous * state of the spinlock was SP_UNLOCKED). * NOTE that the test/set operation is performed via boardctl() to avoid a * variety of issues. An option might be to move the implementation of * up_testset() to libs/libc/machine. */ do { #ifdef CONFIG_BUILD_FLAT ret = up_testset(&lock->sp_lock) == SP_LOCKED ? 1 : 0; #else ret = boardctl(BOARDIOC_TESTSET, (uintptr_t)&lock->sp_lock); #endif } while (ret == 1); ``` should it be modified now? -- 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