Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FW/logging: refactor log_{platform_,}message
This merges the two functions for the most part and makes them use a single write() call to write the content, minimising the race condition in logging platform messages. Unfortunately, it looks like the race condition remains inside the Linux kernel now. The strace shows: [pid 377003] write(8, "BPlatform issue: I> This is an i"..., 86 <unfinished ...> [pid 377005] write(8, "BPlatform issue: I> This is an i"..., 85 <unfinished ...> [pid 377001] write(8, "BPlatform issue: I> This is an i"..., 84 <unfinished ...> [pid 376999] write(8, "BPlatform issue: I> This is an i"..., 86 <unfinished ...> But in at least one run, I got the output: - { level: info, text: 'Platform issue: I> This is an informational platform message from CPU 4 (1726088530)BBPlatform issue: I> This is an informational platform message from CPU 6 (1707520692)BBPlatform issue: I> This is an informational platform message from CPU 3 (1368564819)' } - { level: info, text: 'Platform issue: I> This is an informational platform message from CPU 2 (1799845445)' } This was done with a modified self test to print an extra random number so the messages would have different lengths, showing the problem. Fixes #153. Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
- Loading branch information