diff --git a/ChangeLog b/ChangeLog index 4d8c6feddf..08f1df472d 100755 --- a/ChangeLog +++ b/ChangeLog @@ -10776,7 +10776,7 @@ Based comments from Anton D. Kachalov (2015-07-29). * STM32 F4: Add DMA support to the ADC driver for STM32 F4. From Max Kriegler (2015-07-30). - * sem_tickwait(): Added this furnction for internaluse within the + * sem_tickwait(): Added this function for internal use within the OS. It is a non-standard but more efficient version of sem_timedwait() - for use in higher performance device drviers (2015-08-01). - + for use in higher performance device drivers (2015-08-01). + * drivers/net/slip.c: Fix another compilation error (2015-08-02). diff --git a/arch b/arch index 098a35f7dd..d99e8ced38 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit 098a35f7dd39b6e4546e2b490f18f7d71a338e23 +Subproject commit d99e8ced38440ef61bebfd1507269b9072aba355 diff --git a/drivers/net/slip.c b/drivers/net/slip.c index 0210b47bb1..a8e50343bb 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c @@ -405,8 +405,7 @@ static int slip_transmit(FAR struct slip_driver_s *priv) * callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, or - * 2. When the preceding TX packet send times o ]ut and the interface is reset - * 3. During normal TX polling + * 2. During normal periodic polling * * Parameters: * dev - Reference to the NuttX driver state structure @@ -506,16 +505,22 @@ static void slip_txtask(int argc, FAR char *argv[]) flags = net_lock(); priv->dev.d_buf = priv->txbuf; + /* Has a half second elapsed since the last timer poll? */ + msec_now = clock_systimer() * MSEC_PER_TICK; hsec = (unsigned int)(msec_now - msec_start) / (MSEC_PER_SEC / 2); if (hsec) { + /* Yes, perform the timer poll */ + (void)devif_timer(&priv->dev, slip_txpoll, hsec); msec_start += hsec * (MSEC_PER_SEC / 2); } else { - (void)devif_poll(&priv->dev, slip_uiptxpoll); + /* No, perform the normal TX poll */ + + (void)devif_poll(&priv->dev, slip_txpoll); } net_unlock(flags); diff --git a/sched/semaphore/sem_tickwait.c b/sched/semaphore/sem_tickwait.c index cfc768065b..74de8f054d 100644 --- a/sched/semaphore/sem_tickwait.c +++ b/sched/semaphore/sem_tickwait.c @@ -136,7 +136,7 @@ int sem_tickwait(FAR sem_t *sem, uint32_t start, uint32_t delay) /* Adjust the delay for any time since the delay was calculated */ elapsed = clock_systimer() - start; - if (elapsed >= (UINT32_MAX / 2) || elapsed >= delay) + if (/*elapsed >= (UINT32_MAX / 2) || */ elapsed >= delay) { ret = -ETIMEDOUT; goto errout_with_irqdisabled;