Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protect tele_ii_tx from interrupts #60

Closed
wants to merge 1 commit into from
Closed

Conversation

@ngwese
Copy link
Member

@ngwese ngwese commented Jan 3, 2017

note: this change is untested and intended primarily for review.

no idea (yet) if this helps with stability/lockups but while working through the ii code to understand how it all works i noticed that the queue manipulation in tele_ii_tx() isn't protected from changes made to the queue (at interrupt level) in handler_IItx().

this change:

  • disables interrupts while filling a queue entry in order to prevent a partially filled queue entry from being transmitted
  • mild reordering of waiting flag handling to reduce potential for partially filled ii queue entries being marked as sendable or marked as available before being sent.
  • guards against a potentially infinite loop/memory corruption case when searching for an available ii queue entry to pack (in tele_ii_tx()).
@ngwese ngwese requested a review from tehn Jan 3, 2017
@ngwese
Copy link
Member Author

@ngwese ngwese commented Jan 5, 2017

....after examining the code more i don't think some of the above changes have any real effect so beyond the protection against an infinite loop and the volatile change the rest is not needed (since the normal event queue provides most of the needed safety).

i'm going to restructure this PR.

@ngwese ngwese closed this Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant