You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/01/27 15:11:16 UTC

[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8284: spinlock: Move spinlock_init to public macros

xiaoxiang781216 commented on code in PR #8284:
URL: https://github.com/apache/nuttx/pull/8284#discussion_r1089072147


##########
include/nuttx/spinlock.h:
##########
@@ -351,6 +332,25 @@ void spin_clrbit(FAR volatile cpu_set_t *set, unsigned int cpu,
 
 #endif /* CONFIG_SPINLOCK */
 
+/****************************************************************************
+ * Name: spin_initialize
+ *
+ * Description:
+ *   Initialize a non-reentrant spinlock object to its initial,
+ *   unlocked state.
+ *
+ * Input Parameters:
+ *   lock  - A reference to the spinlock object to be initialized.
+ *   state - Initial state of the spinlock {SP_LOCKED or SP_UNLOCKED)
+ *
+ * Returned Value:
+ *   None.
+ *
+ ****************************************************************************/
+
+/* void spin_initialize(FAR spinlock_t *lock, spinlock_t state); */

Review Comment:
   Done.



-- 
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-unsubscribe@nuttx.apache.org

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