[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Minios-devel] [UNIKRAFT PATCH v2 3/5] lib/ukschedcoop: Set current thread on platform stack
- To: minios-devel@xxxxxxxxxxxxx
- From: Costin Lupu <costin.lupu@xxxxxxxxx>
- Date: Wed, 29 May 2019 07:56:30 +0300
- Cc: Florian.Schmidt@xxxxxxxxx
- Delivery-date: Wed, 29 May 2019 04:56:52 +0000
- Ironport-phdr: 9a23:Pe7HxxTkRKO/DtjUbQoEuC6ZJtpsv+yvbD5Q0YIujvd0So/mwa6yZhaN2/xhgRfzUJnB7Loc0qyK6vmmADZeqsbe+Fk5M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aFRrwLxd6KfroEYDOkcu3y/qy+5rOaAlUmTaxe7x/IAiroQnLq8Uan4pvJqkyxxbLv3BFZ/lYyWR0KFyJgh3y/N2w/Jlt8yRRv/Iu6ctNWrjkcqo7ULJVEi0oP3g668P3uxbDSxCP5mYHXWUNjhVIGQnF4wrkUZr3ryD3q/By2CiePc3xULA0RTGv5LplRRP0lCsKMSMy/WfKgcJyka1bugqsqRxhzYDJbo+bN/1wcaHTfd4BWWZNQtxcWzBbD4+gc4cCCfcKM+ZCr4n6olsDtQWzBQ63BOPzyz9IgGL906sn0+Q5DAHNwQstEM4JsHTPsNX1NaESXfqxzKnV1TXDcuhb1ivm6ITSahAhvOqDUahqccrW0EQiER7OgFaIqYH9Ij+Y2fkBv3KY4udgT+6jlXArpgNrrjWh3ssgl4bEip8Pxl3H9Sh12pg5KNO2RUJhfNKpH4VcuieHPIVsWMwiWXtnuCMix70Dvp60YTYFxYw8xx7ad/yHa4+I4g//VOqJITd3mnZleLWnihas9Eiv0Oz8Vs2u3FlWtSpJiMHMtm0W2BDJ8MiHTeNx/kan2TmRywDe8vxILE8pmabBKJMswqQ8moQNvUnBBCP7ll36jKqMeUUl/uio5f7nYrLjppKEK4B0jRr+Mrgvmsy5G+g4NhUOX3CG+emnyLLj5lf1QK1XjvItiKXZqpfaKdwBpqGlGw9Vzpoj6xGnAjej0dQYm3gHLFVeeB6ekofmJU/OL+78Dfqkh1SskSxrx+zdPrH7DZTCMH7DnK3mfbZn5E5W0BAzwsxH55JIFrEBJ+r+VE/1tNzfFB85Mha7w+D9BNtgyoweWWePAq6EP6POqlKI4PwgLPWIZIAPoznxMeYq5+O9xUM+zFoce6iuxt4bZW61GtxiIl6Fejz8j9FHFn0F7SQkS+m/o1qZTT9VL1KvR790sjo8E56nC8HHW5iwqLeamj+mFNtMYTYVWRi3DX70etDcCL83YyWIL5o5nw==
- Ironport-sdr: z1y6rVsLksr0Ot2KDLCGfQrBWNcH2KtlDcOUVgd0bcjr2G+XRTETs6aXQjX8AXDYEBWPGL84gW aKwyryiJkJ4g==
- List-id: Mini-os development list <minios-devel.lists.xenproject.org>
As soon as we find a new thread to be scheduled, we set it on the
platform stack as well in order to be accessed from interrupt context.
Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
lib/ukschedcoop/schedcoop.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/ukschedcoop/schedcoop.c b/lib/ukschedcoop/schedcoop.c
index fcb9ac43..e0b116ee 100644
--- a/lib/ukschedcoop/schedcoop.c
+++ b/lib/ukschedcoop/schedcoop.c
@@ -30,6 +30,7 @@
* to Round Robin algorithm.
*/
#include <uk/plat/lcpu.h>
+#include <uk/plat/memory.h>
#include <uk/plat/time.h>
#include <uk/sched.h>
#include <uk/schedcoop.h>
@@ -97,6 +98,7 @@ static void schedcoop_schedule(struct uk_sched *s)
thread_list);
UK_TAILQ_INSERT_TAIL(&prv->thread_list, thread,
thread_list);
+ ukplat_stack_set_current_thread(next);
break;
}
}
--
2.11.0
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|