mm/iob and sched/semaphore: Work around some issues with the IOB throttle semaphore. It has some odd behaviors that can cause assertions in sem_post(). Also, it seems to get outside of its range occasionally. Need to REVISIT this.
This commit is contained in:
parent
53930763f4
commit
39df7ed0c0
@ -105,7 +105,7 @@ use either the VCOM or an external RS-232 driver. Here are some options.
|
|||||||
|
|
||||||
EDBG VCOM Interface
|
EDBG VCOM Interface
|
||||||
---------------- --------- --------------------------
|
---------------- --------- --------------------------
|
||||||
EDBG Singal SAME70
|
EDBG Signal SAME70
|
||||||
---------------- --------- --------------------------
|
---------------- --------- --------------------------
|
||||||
EDBG_CDC_UART_RX TXD1 PB4
|
EDBG_CDC_UART_RX TXD1 PB4
|
||||||
EDBG_CDC_UART_TX RXD1 PA21
|
EDBG_CDC_UART_TX RXD1 PA21
|
||||||
@ -1416,7 +1416,7 @@ Configuration sub-directories
|
|||||||
CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048
|
CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048
|
||||||
CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048
|
CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048
|
||||||
|
|
||||||
3. NSH built-in applications are supported. There are, however, not
|
3. NSH built-in applications are supported. There are, however, no
|
||||||
enabled built-in applications.
|
enabled built-in applications.
|
||||||
|
|
||||||
Binary Formats:
|
Binary Formats:
|
||||||
|
@ -133,8 +133,14 @@ FAR struct iob_s *iob_free(FAR struct iob_s *iob)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
nxsem_post(&g_iob_sem);
|
nxsem_post(&g_iob_sem);
|
||||||
|
DEBUGASSERT(g_iob_sem.semcount <= CONFIG_IOB_NBUFFERS);
|
||||||
|
|
||||||
#if CONFIG_IOB_THROTTLE > 0
|
#if CONFIG_IOB_THROTTLE > 0
|
||||||
nxsem_post(&g_throttle_sem);
|
nxsem_post(&g_throttle_sem);
|
||||||
|
|
||||||
|
#if 0 /* REVISIT: This assertion fires! */
|
||||||
|
DEBUGASSERT(g_throttle_sem.semcount <= (CONFIG_IOB_NBUFFERS - CONFIG_IOB_THROTTLE));
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_IOB_NOTIFIER
|
#ifdef CONFIG_IOB_NOTIFIER
|
||||||
|
@ -114,8 +114,8 @@ int nxsem_post(FAR sem_t *sem)
|
|||||||
* not possible to know which thread/holder should be released.
|
* not possible to know which thread/holder should be released.
|
||||||
*
|
*
|
||||||
* For this reason, it is recommended that priority inheritance be
|
* For this reason, it is recommended that priority inheritance be
|
||||||
* disabled via nxsem_setprotocol(SEM_PRIO_NONE) when the semahore is
|
* disabled via nxsem_setprotocol(SEM_PRIO_NONE) when the semaphore is
|
||||||
* initialixed if the semaphore is to used for signaling purposes.
|
* initialized if the semaphore is to used for signaling purposes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DEBUGASSERT(sem->semcount < SEM_VALUE_MAX);
|
DEBUGASSERT(sem->semcount < SEM_VALUE_MAX);
|
||||||
@ -165,12 +165,14 @@ int nxsem_post(FAR sem_t *sem)
|
|||||||
|
|
||||||
up_unblock_task(stcb);
|
up_unblock_task(stcb);
|
||||||
}
|
}
|
||||||
|
#if 0 /* REVISIT: This can fire on IOB throttle semaphore */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* This should not happen. */
|
/* This should not happen. */
|
||||||
|
|
||||||
DEBUGPANIC();
|
DEBUGPANIC();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if we need to drop the priority of any threads holding
|
/* Check if we need to drop the priority of any threads holding
|
||||||
|
Loading…
Reference in New Issue
Block a user