ardupilot/libraries/AP_HAL_Linux
Víctor Mayoral Vilches 9f5b4ffca4 AP_HAL_Linux_Class: Correct deadlock, and infinite loop in setup()
(credit to Mitch Miers <mmiers@mmiers.com>):

setup() is attempting to initialize the hardware, and while doing so
is attempting to output some text via the console (and maybe mavlink
data).  The problem is, the output isn't going to complete once a
write buffer is full, because LinuxUARTDriver::_timer_tick() doesn't
perform work until _initialized is true.  So, what happens is,
setup() (and subroutines) call LinuxUARTDriver::_write(uint8_t c),
which loops waiting for buffer space to become available (once the
write buffer is full).  The buffer never gets space, because the
UART thread is waiting for initialization to complete before it
will write out data and drain the buffer, but that doesn't happen
until setup() returns (see AP_HAL_Linux_main.h).

Refer to https://groups.google.com/forum/#!topic/beaglepilot/dQlxse11JNI
2014-07-14 09:02:47 +10:00
..
AnalogIn.cpp HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
AnalogIn.h AP_HAL: added board_voltage AnalogIn method 2014-02-14 21:25:38 +11:00
AP_HAL_Linux_Main.h AP_HAL_Linux_Class: Correct deadlock, and infinite loop in setup() 2014-07-14 09:02:47 +10:00
AP_HAL_Linux_Namespace.h HAL_Linux: removed Console driver 2013-10-05 18:32:57 +10:00
AP_HAL_Linux_Private.h HAL_Linux: removed Console driver 2013-10-05 18:32:57 +10:00
AP_HAL_Linux.h HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
GPIO.cpp HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
GPIO.h AP_HAL_Linux: initial Linux AP_HAL 2013-09-28 21:24:01 +10:00
HAL_Linux_Class.cpp HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
HAL_Linux_Class.h AP_HAL_Linux: initial Linux AP_HAL 2013-09-28 21:24:01 +10:00
I2CDriver.cpp HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
I2CDriver.h AP_HAL_Linux: initial I2C driver implementation 2013-09-28 21:24:02 +10:00
RCInput.cpp HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
RCInput.h AP_HAL: removed RCInput valid_channels() and added new_input() and num_channels() 2014-03-25 14:39:41 +11:00
RCOutput.cpp HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
RCOutput.h AP_HAL: removed unused enable_mask and disable_mask functions 2014-01-16 17:16:17 +11:00
Scheduler.cpp HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
Scheduler.h HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
Semaphores.cpp HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
Semaphores.h HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
SPIDriver.cpp AP_HAL_Linux: Add support for SPIDevice_MPU9250 2014-07-14 09:02:46 +10:00
SPIDriver.h HAL_Linux: added SPI support 2013-09-29 00:57:13 +10:00
Storage.cpp HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
Storage.h HAL_Linux: switched to pthread based scheduling 2013-09-28 21:24:02 +10:00
UARTDriver.cpp HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
UARTDriver.h HAL_Linux: default to hal.console on stdout 2013-10-01 12:49:58 +10:00
Util.cpp HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
Util.h AP_HAL: added support for commandline arguments 2014-02-23 08:15:39 +11:00