xiaoxiang781216 commented on code in PR #6965:
URL: https://github.com/apache/incubator-nuttx/pull/6965#discussion_r989383161


##########
wireless/ieee802154/mac802154_internal.h:
##########
@@ -510,62 +511,12 @@ void mac802154_notify(FAR struct ieee802154_privmac_s 
*priv,
 
 /* General helpers **********************************************************/
 
-#define mac802154_givesem(s) nxsem_post(s)
-
-static inline int mac802154_takesem(sem_t *sem, bool allowinterrupt)
-{
-  if (allowinterrupt)
-    {
-      return nxsem_wait(sem);
-    }
-  else
-    {
-      return nxsem_wait_uninterruptible(sem);
-    }
-}
-
-#ifdef CONFIG_MAC802154_LOCK_VERBOSE
-#define mac802154_unlock(dev) \
-  mac802154_givesem(&dev->exclsem); \
-  wlinfo("MAC unlocked\n");
-#else
-#define mac802154_unlock(dev) \
-  mac802154_givesem(&dev->exclsem);
-#endif
-
-#define mac802154_lock(dev, allowinterrupt) \
-  mac802154_lockpriv(dev, allowinterrupt, __FUNCTION__)
-
-static inline int
-mac802154_lockpriv(FAR struct ieee802154_privmac_s *dev,
-                   bool allowinterrupt, FAR const char *funcname)
-{

Review Comment:
   Yes, I think it's very dangerous to allow user cancel the kernel work and 
then remove the possibility.



-- 
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