Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • F firmware
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 74
    • Issues 74
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 29
    • Merge requests 29
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • card10card10
  • firmware
  • Merge requests
  • !240

Perform serial prints in a critical section

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Rahix requested to merge rahix/fix-serial into master Aug 24, 2019
  • Overview 1
  • Commits 1
  • Pipelines 6
  • Changes 1

Sometimes during initialization, one log_msg() intercepts another one, leading to a whole lot of weird issues in other modules (like I2C). I suspect this to be memory corruption of some kind. The issues can be fixed by performing serial prints in a critical section, thus ensuring atomicity of prints. Note that this does not mean log messages will not interleave.

A possible downside of this approach is that prints can take quite some time. We did not notice any issues with that so far though. Apart from that, not many prints happen anyway.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: rahix/fix-serial