mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 02:20:48 +00:00
After a call to pthread_create(), it is indeterminate which thread the caller or the new thread will next execute. Synchronize with the new thread and allow it to initialize (and print to console, before the print can potentially interfere with other prints) before proceeding. BUG=chromium:715011 BRANCH=None TEST=Run 'make runtests', verify 'Console input initialized' is seen before '--- Emulator initialized after reboot ---': ====== Emulator output ====== No flash storage found. Initializing to 0xff. No RAM data found. Initializing to 0x00. Console input initialized --- Emulator initialized after reboot --- Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: Ieb622e9b7eea2d11d4a11a98bb503a44534f676c Reviewed-on: https://chromium-review.googlesource.com/854989 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>