-
Notifications
You must be signed in to change notification settings - Fork 4
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
different thread implementation #1
Comments
Hello @M1cha , I used When Moreover, the first thing the function of a thread does is restoring its priority level by calling:
So, the only way to block inside a higher priority function ( |
The problem is that UEFI-Events aren't some high level interrupts, they called from within the Event-Dispatcher loop. So if I'm not completely mistaken, what happens in your code is the following:
So, from the viewpoint of UEFI you're doing the follwing:
I hope, that you understand my explanation. Feel free to correct me if I'm wrong in any point. |
I understand your idea, I would better use |
Commit ba2ae3d |
The thing is that you're not allowed to set a tpl to something lower. Also you have to leave a function with the same tpl with which it was entered. In short it means that you can't do real external scheduling in UEFI. |
I just wanted to let you know about my take on UEFI threads in case you're interested :)
https://github.com/efidroid/uefi_edk2packages_EFIDroidLKLPkg/tree/master/UEFIThreads
I'm basically using TPL_CALLBACKs to schedule threads so there's no need for locking before calling UEFI-API functions.
Also I'd like to know how your CChangeContext callback works because it looks like you're blocking inside a TPL_NOTIFY function there which is not allowed as per UEFI spec.
The text was updated successfully, but these errors were encountered: