mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +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:
@@ -149,13 +149,7 @@ static int conn_tx_kthread(int argc, FAR char *argv[])
|
||||
|
||||
wlinfo("calling nxsem_wait\n");
|
||||
|
||||
do
|
||||
{
|
||||
ret = nxsem_wait(&g_btdev.le_pkts_sem);
|
||||
}
|
||||
while (ret == -EINTR);
|
||||
|
||||
DEBUGASSERT(ret == OK);
|
||||
nxsem_wait_uninterruptible(&g_btdev.le_pkts_sem);
|
||||
|
||||
/* Check for disconnection */
|
||||
|
||||
@@ -574,13 +568,7 @@ void bt_conn_set_state(FAR struct bt_conn_s *conn,
|
||||
* zero when we complete this.
|
||||
*/
|
||||
|
||||
do
|
||||
{
|
||||
ret = nxsem_wait(&g_conn_handoff.sync_sem);
|
||||
}
|
||||
while (ret == -EINTR);
|
||||
|
||||
DEBUGASSERT(ret == OK);
|
||||
nxsem_wait_uninterruptible(&g_conn_handoff.sync_sem);
|
||||
|
||||
/* Start the Tx connection kernel thread */
|
||||
|
||||
@@ -595,13 +583,7 @@ void bt_conn_set_state(FAR struct bt_conn_s *conn,
|
||||
* sem_count at -1. It will be zero again when we continue.
|
||||
*/
|
||||
|
||||
do
|
||||
{
|
||||
ret = nxsem_wait(&g_conn_handoff.sync_sem);
|
||||
}
|
||||
while (ret == -EINTR);
|
||||
|
||||
DEBUGASSERT(ret == OK);
|
||||
nxsem_wait_uninterruptible(&g_conn_handoff.sync_sem);
|
||||
nxsem_post(&g_conn_handoff.sync_sem);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -439,7 +439,7 @@ static void hci_num_completed_packets(FAR struct bt_buf_s *buf)
|
||||
|
||||
while (count--)
|
||||
{
|
||||
sem_post(&g_btdev.le_pkts_sem);
|
||||
nxsem_post(&g_btdev.le_pkts_sem);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -978,13 +978,7 @@ static int hci_tx_kthread(int argc, FAR char *argv[])
|
||||
|
||||
/* Wait until ncmd > 0 */
|
||||
|
||||
do
|
||||
{
|
||||
ret = nxsem_wait(&g_btdev.ncmd_sem);
|
||||
}
|
||||
while (ret == -EINTR);
|
||||
|
||||
DEBUGASSERT(ret >= 0);
|
||||
nxsem_wait_uninterruptible(&g_btdev.ncmd_sem);
|
||||
|
||||
/* Get next command - wait if necessary */
|
||||
|
||||
@@ -1765,13 +1759,7 @@ int bt_hci_cmd_send_sync(uint16_t opcode, FAR struct bt_buf_s *buf,
|
||||
* released while we are waiting.
|
||||
*/
|
||||
|
||||
do
|
||||
{
|
||||
/* The timed wait could also be awakened by a signal */
|
||||
|
||||
ret = nxsem_timedwait(&sync_sem, &abstime);
|
||||
}
|
||||
while (ret == -EINTR);
|
||||
nxsem_timedwait_uninterruptible(&sync_sem, &abstime);
|
||||
}
|
||||
|
||||
sched_unlock();
|
||||
|
||||
@@ -157,7 +157,6 @@ static void btnet_scan_callback(FAR const bt_addr_le_t *addr, int8_t rssi,
|
||||
uint8_t nexttail;
|
||||
uint8_t head;
|
||||
uint8_t tail;
|
||||
int ret;
|
||||
|
||||
if (!g_scanstate.bs_scanning)
|
||||
{
|
||||
@@ -173,14 +172,7 @@ static void btnet_scan_callback(FAR const bt_addr_le_t *addr, int8_t rssi,
|
||||
|
||||
/* Get exclusive access to the scan data */
|
||||
|
||||
while ((ret = nxsem_wait(&g_scanstate.bs_exclsem)) < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
if (ret != -EINTR)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
nxsem_wait_uninterruptible(&g_scanstate.bs_exclsem);
|
||||
|
||||
/* Add the scan data to the cache */
|
||||
|
||||
@@ -260,7 +252,6 @@ static int btnet_scan_result(FAR struct bt_scanresponse_s *result,
|
||||
ret = nxsem_wait(&g_scanstate.bs_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -543,12 +543,12 @@ static void btnet_txpoll_work(FAR void *arg)
|
||||
|
||||
/* Then perform the poll */
|
||||
|
||||
(void)devif_timer(&priv->bd_dev.r_dev, TXPOLL_WDDELAY, btnet_txpoll_callback);
|
||||
devif_timer(&priv->bd_dev.r_dev, TXPOLL_WDDELAY, btnet_txpoll_callback);
|
||||
|
||||
/* Setup the watchdog poll timer again */
|
||||
|
||||
(void)wd_start(priv->bd_txpoll, TXPOLL_WDDELAY, btnet_txpoll_expiry, 1,
|
||||
(wdparm_t)priv);
|
||||
wd_start(priv->bd_txpoll, TXPOLL_WDDELAY, btnet_txpoll_expiry, 1,
|
||||
(wdparm_t)priv);
|
||||
net_unlock();
|
||||
}
|
||||
|
||||
@@ -627,8 +627,8 @@ static int btnet_ifup(FAR struct net_driver_s *netdev)
|
||||
|
||||
/* Set and activate a timer process */
|
||||
|
||||
(void)wd_start(priv->bd_txpoll, TXPOLL_WDDELAY, btnet_txpoll_expiry,
|
||||
1, (wdparm_t)priv);
|
||||
wd_start(priv->bd_txpoll, TXPOLL_WDDELAY, btnet_txpoll_expiry,
|
||||
1, (wdparm_t)priv);
|
||||
|
||||
/* The interface is now up */
|
||||
|
||||
@@ -724,7 +724,7 @@ static void btnet_txavail_work(FAR void *arg)
|
||||
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
(void)devif_poll(&priv->bd_dev.r_dev, btnet_txpoll_callback);
|
||||
devif_poll(&priv->bd_dev.r_dev, btnet_txpoll_callback);
|
||||
}
|
||||
|
||||
net_unlock();
|
||||
|
||||
@@ -195,7 +195,7 @@ int mac802154_txdesc_alloc(FAR struct ieee802154_privmac_s *priv,
|
||||
/* MAC is already released */
|
||||
|
||||
wlwarn("WARNING: mac802154_takesem failed: %d\n", ret);
|
||||
return -EINTR;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* If we've taken a count from the semaphore, we have "reserved" the
|
||||
@@ -209,7 +209,7 @@ int mac802154_txdesc_alloc(FAR struct ieee802154_privmac_s *priv,
|
||||
wlwarn("WARNING: mac802154_lock failed: %d\n", ret);
|
||||
|
||||
mac802154_givesem(&priv->txdesc_sem);
|
||||
return -EINTR;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* We can now safely unlink the next free structure from the free list */
|
||||
|
||||
@@ -151,7 +151,7 @@ int mac802154_get_mhrlen(MACHANDLE mac,
|
||||
|
||||
int mac802154_req_data(MACHANDLE mac,
|
||||
FAR const struct ieee802154_frame_meta_s *meta,
|
||||
FAR struct iob_s *frame);
|
||||
FAR struct iob_s *frame, bool allowinterrupt);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mac802154_req_purge
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
int mac802154_req_data(MACHANDLE mac,
|
||||
FAR const struct ieee802154_frame_meta_s *meta,
|
||||
FAR struct iob_s *frame)
|
||||
FAR struct iob_s *frame, bool allowinterrupt)
|
||||
{
|
||||
FAR struct ieee802154_privmac_s *priv =
|
||||
(FAR struct ieee802154_privmac_s *)mac;
|
||||
@@ -156,7 +156,7 @@ int mac802154_req_data(MACHANDLE mac,
|
||||
|
||||
/* From this point on, we need exclusive access to the privmac struct */
|
||||
|
||||
ret = mac802154_lock(priv, true);
|
||||
ret = mac802154_lock(priv, allowinterrupt);
|
||||
if (ret < 0)
|
||||
{
|
||||
/* Should only fail if interrupted by a signal */
|
||||
|
||||
@@ -179,18 +179,7 @@ static const struct file_operations mac802154dev_fops =
|
||||
|
||||
static inline int mac802154dev_takesem(sem_t *sem)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Take the semaphore (perhaps waiting) */
|
||||
|
||||
ret = nxsem_wait(sem);
|
||||
|
||||
/* The only case that an error should occur here is if the wait were
|
||||
* awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ret == OK || ret == -EINTR);
|
||||
return ret;
|
||||
return nxsem_wait(sem);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@@ -440,7 +429,6 @@ static ssize_t mac802154dev_read(FAR struct file *filep, FAR char *buffer,
|
||||
ret = nxsem_wait(&dev->readsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
dev->readpending = false;
|
||||
return ret;
|
||||
}
|
||||
@@ -568,7 +556,7 @@ static ssize_t mac802154dev_write(FAR struct file *filep,
|
||||
|
||||
/* Pass the request to the MAC layer */
|
||||
|
||||
ret = mac802154_req_data(dev->md_mac, &tx->meta, iob);
|
||||
ret = mac802154_req_data(dev->md_mac, &tx->meta, iob, true);
|
||||
if (ret < 0)
|
||||
{
|
||||
iob_free(iob, IOBUSER_WIRELESS_MAC802154_CHARDEV);
|
||||
@@ -681,7 +669,6 @@ static int mac802154dev_ioctl(FAR struct file *filep, int cmd,
|
||||
ret = nxsem_wait(&dev->geteventsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
dev->geteventpending = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -540,27 +540,14 @@ void mac802154_notify(FAR struct ieee802154_privmac_s *priv,
|
||||
|
||||
static inline int mac802154_takesem(sem_t *sem, bool allowinterrupt)
|
||||
{
|
||||
int ret;
|
||||
do
|
||||
if (allowinterrupt)
|
||||
{
|
||||
/* Take a count from the semaphore, possibly waiting */
|
||||
|
||||
ret = nxsem_wait(sem);
|
||||
if (ret < 0)
|
||||
{
|
||||
/* EINTR and ECANCELED are the only errors that we expect */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
|
||||
if (allowinterrupt)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return nxsem_wait(sem);
|
||||
}
|
||||
else
|
||||
{
|
||||
return nxsem_wait_uninterruptible(sem);
|
||||
}
|
||||
while (ret == -EINTR);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MAC802154_LOCK_VERBOSE
|
||||
|
||||
@@ -439,7 +439,7 @@ static void lo_loopback_work(FAR void *arg)
|
||||
/* Perform the loopback */
|
||||
|
||||
net_lock();
|
||||
(void)lo_loopback(&priv->lo_radio.r_dev);
|
||||
lo_loopback(&priv->lo_radio.r_dev);
|
||||
net_unlock();
|
||||
}
|
||||
|
||||
@@ -476,11 +476,11 @@ static void lo_poll_work(FAR void *arg)
|
||||
|
||||
/* Then perform the poll */
|
||||
|
||||
(void)devif_timer(&priv->lo_radio.r_dev, LO_WDDELAY, lo_loopback);
|
||||
devif_timer(&priv->lo_radio.r_dev, LO_WDDELAY, lo_loopback);
|
||||
|
||||
/* Setup the watchdog poll timer again */
|
||||
|
||||
(void)wd_start(priv->lo_polldog, LO_WDDELAY, lo_poll_expiry, 1, priv);
|
||||
wd_start(priv->lo_polldog, LO_WDDELAY, lo_poll_expiry, 1, priv);
|
||||
net_unlock();
|
||||
}
|
||||
|
||||
@@ -582,8 +582,8 @@ static int lo_ifup(FAR struct net_driver_s *dev)
|
||||
|
||||
/* Set and activate a timer process */
|
||||
|
||||
(void)wd_start(priv->lo_polldog, LO_WDDELAY, lo_poll_expiry,
|
||||
1, (wdparm_t)priv);
|
||||
wd_start(priv->lo_polldog, LO_WDDELAY, lo_poll_expiry,
|
||||
1, (wdparm_t)priv);
|
||||
|
||||
priv->lo_bifup = true;
|
||||
return OK;
|
||||
@@ -657,7 +657,7 @@ static void lo_txavail_work(FAR void *arg)
|
||||
priv->lo_radio.r_dev.d_buf = g_iobuffer.rb_buf;
|
||||
#endif
|
||||
|
||||
(void)devif_poll(&priv->lo_radio.r_dev, lo_loopback);
|
||||
devif_poll(&priv->lo_radio.r_dev, lo_loopback);
|
||||
}
|
||||
|
||||
net_unlock();
|
||||
@@ -1118,7 +1118,7 @@ int ieee8021514_loopback(void)
|
||||
* performed.
|
||||
*/
|
||||
|
||||
(void)netdev_register(&priv->lo_radio.r_dev, NET_LL_IEEE802154);
|
||||
netdev_register(&priv->lo_radio.r_dev, NET_LL_IEEE802154);
|
||||
|
||||
/* Put the network in the UP state */
|
||||
|
||||
|
||||
@@ -580,12 +580,12 @@ static void macnet_txpoll_work(FAR void *arg)
|
||||
|
||||
/* Then perform the poll */
|
||||
|
||||
(void)devif_timer(&priv->md_dev.r_dev, TXPOLL_WDDELAY, macnet_txpoll_callback);
|
||||
devif_timer(&priv->md_dev.r_dev, TXPOLL_WDDELAY, macnet_txpoll_callback);
|
||||
|
||||
/* Setup the watchdog poll timer again */
|
||||
|
||||
(void)wd_start(priv->md_txpoll, TXPOLL_WDDELAY, macnet_txpoll_expiry, 1,
|
||||
(wdparm_t)priv);
|
||||
wd_start(priv->md_txpoll, TXPOLL_WDDELAY, macnet_txpoll_expiry, 1,
|
||||
(wdparm_t)priv);
|
||||
net_unlock();
|
||||
}
|
||||
|
||||
@@ -765,8 +765,8 @@ static int macnet_ifup(FAR struct net_driver_s *dev)
|
||||
|
||||
/* Set and activate a timer process */
|
||||
|
||||
(void)wd_start(priv->md_txpoll, TXPOLL_WDDELAY, macnet_txpoll_expiry,
|
||||
1, (wdparm_t)priv);
|
||||
wd_start(priv->md_txpoll, TXPOLL_WDDELAY, macnet_txpoll_expiry,
|
||||
1, (wdparm_t)priv);
|
||||
|
||||
ret = OK;
|
||||
}
|
||||
@@ -861,7 +861,7 @@ static void macnet_txavail_work(FAR void *arg)
|
||||
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
(void)devif_poll(&priv->md_dev.r_dev, macnet_txpoll_callback);
|
||||
devif_poll(&priv->md_dev.r_dev, macnet_txpoll_callback);
|
||||
}
|
||||
|
||||
net_unlock();
|
||||
@@ -1077,7 +1077,6 @@ static int macnet_ioctl(FAR struct net_driver_s *dev, int cmd,
|
||||
ret = nxsem_wait(&priv->md_eventsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
priv->md_eventpending = false;
|
||||
return ret;
|
||||
}
|
||||
@@ -1200,17 +1199,9 @@ static int macnet_req_data(FAR struct radio_driver_s *netdev,
|
||||
framelist = iob->io_flink;
|
||||
iob->io_flink = NULL;
|
||||
|
||||
/* Transfer the frame to the MAC. mac802154_req_data will return
|
||||
* -EINTR if a signal is received during certain phases of processing.
|
||||
* In this context we just need to ignore -EINTR errors and try again.
|
||||
*/
|
||||
|
||||
do
|
||||
{
|
||||
ret = mac802154_req_data(priv->md_mac, pktmeta, iob);
|
||||
}
|
||||
while (ret == -EINTR);
|
||||
/* Transfer the frame to the MAC. */
|
||||
|
||||
ret = mac802154_req_data(priv->md_mac, pktmeta, iob, false);
|
||||
if (ret < 0)
|
||||
{
|
||||
wlerr("ERROR: mac802154_req_data failed: %d\n", ret);
|
||||
@@ -1295,10 +1286,10 @@ static int macnet_properties(FAR struct radio_driver_s *netdev,
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_NET_6LOWPAN_EXTENDEDADDR
|
||||
(void)macnet_coord_eaddr(netdev, properties->sp_hubnode.nv_addr);
|
||||
macnet_coord_eaddr(netdev, properties->sp_hubnode.nv_addr);
|
||||
properties->sp_hubnode.nv_addrlen = IEEE802154_EADDRSIZE;
|
||||
#else
|
||||
(void)macnet_coord_saddr(netdev, properties->sp_hubnode.nv_addr);
|
||||
macnet_coord_saddr(netdev, properties->sp_hubnode.nv_addr);
|
||||
properties->sp_hubnode.nv_addrlen = IEEE802154_SADDRSIZE;
|
||||
#endif
|
||||
#endif
|
||||
@@ -1431,7 +1422,7 @@ int mac802154netdev_register(MACHANDLE mac)
|
||||
|
||||
/* Register the device with the OS so that socket IOCTLs can be performed */
|
||||
|
||||
(void)netdev_register(&priv->md_dev.r_dev, NET_LL_IEEE802154);
|
||||
netdev_register(&priv->md_dev.r_dev, NET_LL_IEEE802154);
|
||||
|
||||
/* Put the network in the DOWN state, let the user decide when to bring it up */
|
||||
|
||||
|
||||
@@ -102,7 +102,6 @@ int mac802154_req_scan(MACHANDLE mac, FAR struct ieee802154_scan_req_s *req)
|
||||
ret = mac802154_takesem(&priv->opsem, true);
|
||||
if (ret < 0)
|
||||
{
|
||||
ret = -EINTR;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@@ -114,7 +113,6 @@ int mac802154_req_scan(MACHANDLE mac, FAR struct ieee802154_scan_req_s *req)
|
||||
if (ret < 0)
|
||||
{
|
||||
mac802154_givesem(&priv->opsem);
|
||||
ret = -EINTR;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
|
||||
@@ -397,7 +397,7 @@ static void lo_loopback_work(FAR void *arg)
|
||||
/* Perform the loopback */
|
||||
|
||||
net_lock();
|
||||
(void)lo_loopback(&priv->lo_radio.r_dev);
|
||||
lo_loopback(&priv->lo_radio.r_dev);
|
||||
net_unlock();
|
||||
}
|
||||
|
||||
@@ -434,11 +434,11 @@ static void lo_poll_work(FAR void *arg)
|
||||
|
||||
/* And perform the poll */
|
||||
|
||||
(void)devif_timer(&priv->lo_radio.r_dev, LO_WDDELAY, lo_loopback);
|
||||
devif_timer(&priv->lo_radio.r_dev, LO_WDDELAY, lo_loopback);
|
||||
|
||||
/* Setup the watchdog poll timer again */
|
||||
|
||||
(void)wd_start(priv->lo_polldog, LO_WDDELAY, lo_poll_expiry, 1, priv);
|
||||
wd_start(priv->lo_polldog, LO_WDDELAY, lo_poll_expiry, 1, priv);
|
||||
net_unlock();
|
||||
}
|
||||
|
||||
@@ -522,8 +522,8 @@ static int lo_ifup(FAR struct net_driver_s *dev)
|
||||
|
||||
/* Set and activate a timer process */
|
||||
|
||||
(void)wd_start(priv->lo_polldog, LO_WDDELAY, lo_poll_expiry,
|
||||
1, (wdparm_t)priv);
|
||||
wd_start(priv->lo_polldog, LO_WDDELAY, lo_poll_expiry,
|
||||
1, (wdparm_t)priv);
|
||||
|
||||
priv->lo_bifup = true;
|
||||
return OK;
|
||||
@@ -599,7 +599,7 @@ static void lo_txavail_work(FAR void *arg)
|
||||
|
||||
/* Then perform the poll */
|
||||
|
||||
(void)devif_poll(&priv->lo_radio.r_dev, lo_loopback);
|
||||
devif_poll(&priv->lo_radio.r_dev, lo_loopback);
|
||||
}
|
||||
|
||||
net_unlock();
|
||||
@@ -1061,7 +1061,7 @@ int pktradio_loopback(void)
|
||||
* performed.
|
||||
*/
|
||||
|
||||
(void)netdev_register(&priv->lo_radio.r_dev, NET_LL_PKTRADIO);
|
||||
netdev_register(&priv->lo_radio.r_dev, NET_LL_PKTRADIO);
|
||||
|
||||
/* Put the network in the UP state */
|
||||
|
||||
|
||||
@@ -150,23 +150,10 @@ FAR struct pktradio_metadata_s *pktradio_metadata_allocate(void)
|
||||
{
|
||||
FAR struct pktradio_metadata_s *metadata;
|
||||
uint8_t pool;
|
||||
int ret;
|
||||
|
||||
/* Get exclusive access to the free list */
|
||||
|
||||
do
|
||||
{
|
||||
/* Take the semaphore (perhaps waiting) */
|
||||
|
||||
ret = nxsem_wait(&g_metadata_sem);
|
||||
|
||||
/* The only case that an error should occur here is if the wait was
|
||||
* awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ret == OK || ret == -EINTR);
|
||||
}
|
||||
while (ret == -EINTR);
|
||||
nxsem_wait_uninterruptible(&g_metadata_sem);
|
||||
|
||||
/* Try the free list first */
|
||||
|
||||
@@ -226,23 +213,9 @@ FAR struct pktradio_metadata_s *pktradio_metadata_allocate(void)
|
||||
|
||||
void pktradio_metadata_free(FAR struct pktradio_metadata_s *metadata)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Get exclusive access to the free list */
|
||||
|
||||
do
|
||||
{
|
||||
/* Take the semaphore (perhaps waiting) */
|
||||
|
||||
ret = nxsem_wait(&g_metadata_sem);
|
||||
|
||||
/* The only case that an error should occur here is if the wait was
|
||||
* awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ret == OK || ret == -EINTR);
|
||||
}
|
||||
while (ret == -EINTR);
|
||||
nxsem_wait_uninterruptible(&g_metadata_sem);
|
||||
|
||||
/* If this is a pre-allocated meta-data structure, then just put it back
|
||||
* in the free list.
|
||||
|
||||
Reference in New Issue
Block a user