mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling 1. Add semaphore uninterruptible wait function 2 .Replace semaphore wait loop with a single uninterruptible wait 3. Replace all sem_xxx to nxsem_xxx * Unify the void cast usage 1. Remove void cast for function because many place ignore the returned value witout cast 2. Replace void cast for variable with UNUSED macro
This commit is contained in:
@@ -1785,7 +1785,7 @@ void netdev_ifdown(FAR struct net_driver_s *dev)
|
||||
|
||||
/* Notify clients that the network has been taken down */
|
||||
|
||||
(void)devif_dev_event(dev, NULL, NETDEV_DOWN);
|
||||
devif_dev_event(dev, NULL, NETDEV_DOWN);
|
||||
|
||||
#ifdef CONFIG_NETDOWN_NOTIFIER
|
||||
/* Provide signal notifications to threads that want to be
|
||||
|
||||
@@ -81,7 +81,7 @@ void netdev_ipv4_txnotify(in_addr_t lipaddr, in_addr_t ripaddr)
|
||||
{
|
||||
/* Notify the device driver that new TX data is available. */
|
||||
|
||||
(void)dev->d_txavail(dev);
|
||||
dev->d_txavail(dev);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
@@ -115,7 +115,7 @@ void netdev_ipv6_txnotify(FAR const net_ipv6addr_t lipaddr,
|
||||
{
|
||||
/* Notify the device driver that new TX data is available. */
|
||||
|
||||
(void)dev->d_txavail(dev);
|
||||
dev->d_txavail(dev);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
@@ -142,7 +142,7 @@ void netdev_txnotify_dev(FAR struct net_driver_s *dev)
|
||||
{
|
||||
/* Notify the device driver that new TX data is available. */
|
||||
|
||||
(void)dev->d_txavail(dev);
|
||||
dev->d_txavail(dev);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user