bsp: Synchronize serial driver access (#29)
The serial driver is used by multiple tasks and not all tasks use the Log APIs to send data to the serial driver. This was causing serial data buffer corruption. Synchronise the access of the serial driver using mutual exclusion to make it thread-safe. This also removes code duplication and fixes return values for the write system call: * Arm GNU Toolchain: On failure, `-1`. On success, total chars written. * Arm Compiler: On failure, a positive number representing the number of chars NOT written or a negative number indicating an error. On success, `0`. Signed-off-by:Devaraj Ranganna <devaraj.ranganna@arm.com> Signed-off-by:
Hugues Kamba-Mpiana <hugues.kambampiana@arm.com> Co-authored-by:
Devaraj Ranganna <devaraj.ranganna@arm.com>
Loading
Please register or sign in to comment