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

Notify scheduler if thread in rcving has pending events #199

Closed
wants to merge 1 commit into from

Conversation

phanikishoreg
Copy link
Member

Summary of this PR

cos_sched_rcv to receive notifications and if the scheduling event has pending events, a temporary change, so that scheduler gets to decide whether to run the thread that is rcving. More info in #198

Code Quality

As part of this pull request, I've considered the following:

Style:

  • Comments adhere to the Style Guide (SG)
  • Spacing adhere's to the SG
  • Naming adhere's to the SG
  • All other aspects of the SG are adhered to, or exceptions are justified in this pull request

Code Craftsmanship:

  • I've made an attempt to remove all redundant code
  • I've considered ways in which my changes might impact existing code, and cleaned it up
  • I've formatted the code in an effort to make it easier to read (proper error handling, function use, etc...)
  • I've commented appropriately where code is tricky
  • I agree that there is no "throw-away" code, and that code in this PR is of high quality: This is a temporary fix to a problem described in issue Sending events to RCV end-point and not immediately switching to RCV thread #198

* This is required as current state of thread is not changed when
  a Sender sends notification to a receiving end-point it has
  attached to.
  More info in issue gwsystems#198
@@ -67,7 +67,7 @@ scheduler(void)
VM_BUDGET_FIXED, VM_PRIO_FIXED, TCAP_DELEG_YIELD)) assert(0);
}

while (cos_sched_rcv(BOOT_CAPTBL_SELF_INITRCV_BASE, &tid, &rcving, &cycles)) ;
while (cos_sched_rcv(BOOT_CAPTBL_SELF_INITRCV_BASE, &tid, &rcving, &vm_pending, &cycles)) ;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, now I'm confused why we would have both rcving and vm_pending. Shouldn't the pending just be taken into account in the kernel when returning the rcving variable? Why is this being made more complicated.

The API (as we discussed) is "set this variable to 1 if I can't effectively switch to the thread, set it to 0 if it is runnable". So why now two variables?

@gparmer gparmer closed this Sep 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants