Commit Graph

7 Commits

Author SHA1 Message Date
Gregory Nutt 0558aa0a78 "Uninterruptible" semaphore waits must return when canceled.
nxsem_timedwait_uninterruptible() must return -ECANCELED if the thread is canceled:

        include/nuttx/semaphore.h:  Return if nxsem_wait() returns ECANCELED meaning that the thread waiting for the semaphore has been canceled.
        sched/semaphore/sem_timedwait.c:  Same change (the inline version is in semaphore.h, the non-inlined version is in sem_tickwait.c).
        drivers/sensors/lps25h.c and drivers/wireless/bluetooth/bt_uart_bcm4343x.c:  Make sure that the caller deals correctly with the -ECANCELED return value.

    Refer to issue 619.
2020-03-29 11:58:28 -03:00
Xiang Xiao 5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Xiang Xiao 6a3c2aded6 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
2020-01-02 10:54:43 -06:00
Xiang Xiao 3187dde36c fix sim:bluetooth compiler error (#18)
wireless/bluetooth/bt_null.c:274:10: warning: implicit declaration of function 'bt_driver_register'; did you mean 'bt_netdev_register'? [-Wimplicit-function-declaration]

   return bt_driver_register(&g_bt_null);

sim_bringup.c:324:9: error: too few arguments to function 'bt_netdev_register'

   ret = bt_netdev_register();
2019-12-31 09:30:44 -06:00
Gregory Nutt 504b0e8b5b drivers/wireless: Run all wireless drivers through tools/nxstyle, correcting as many complaints as possible. 2019-12-05 11:49:12 -06:00
Dave Marples 83e458873f drivers/wireless/bluetooth/bt_uart_bcm4343x.c: Fix small a small bug
found during testing.
drivers/wireless/bluetooth/bt_uart_shim.c:  Change the task tname for
the HCI receiver task to bring it into line with the transmitter task.
2019-10-08 07:55:47 -06:00
Dave Marples de70e689cd drivers/wireless/bluetooth/bt_uart_bcm4343x.c: BCM4343x HCIUART support. 2019-10-04 09:29:51 -06:00