[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 6/8] lib/ukschedcoop: Set current thread on platform stack


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Tue, 23 Apr 2019 13:41:42 +0300
  • Cc: felipe.huici@xxxxxxxxx, Florian.Schmidt@xxxxxxxxx, simon.kuenzer@xxxxxxxxx, yuri.volchkov@xxxxxxxxx, sharan.santhanam@xxxxxxxxx
  • Delivery-date: Tue, 23 Apr 2019 10:42:07 +0000
  • Ironport-phdr: 9a23:m/MIGhe5lMiFBf80gXJEMEZllGMj4u6mDksu8pMizoh2WeGdxc27ZBON2/xhgRfzUJnB7Loc0qyK6vmmBTxLu8/J8ChbNsAVD1ld0YRetjdjKfbNMVf8Iv/uYn5yN+V5f3ghwUuGN1NIEt31fVzYry76xzcTHhLiKVg9fbytScbdgMutyu+95YDYbRlWizqhe7NyKwi9oRnMusUMjoZuN7s9xgHGr3ZLdOha235kLk+Xkxrg+8u85pFu/zlMt/4768JMTaD2dLkkQLJFCzgrL3o779DxuxnZSguP6HocUmEInRdNHgPI8hL0UIrvvyXjruZy1zWUMsPwTbAvRDSt9LxrRwPyiCcGLDE27mfagdFtga1BoRKhoxt/w5PIYIyQKfFzcL/Rcc8cSGFcWMtaSi5PDZ6mb4YXD+QPI/tWoYf+qVUJrxS+CxKhCP/zxjJSmnP7x7E23/gnHArb3AIgBdUOsHHModjrM6cSSvy1zKjOzT7eaf1WxC/96JXVeR0mvf6MWqlwcdbQyUkpDQ/FikiQqZT4Pz6OyusNqHKX7/J9Ve20kWInsQZxryGpy8wxiYfJnpoYxk3L+Clk2oo4Jt21RFRlbdK6EpZcrS+XO5NrTs4tXm1koiU3x70ctZKlciUHxo4rywPQZvCZdYWD/wjtW/yLIThigXJoYLe/hxGv/ke+0uD8Tcy00EpSripCj9nMqmgB1xzN5ciDTftw5lmh2TOV2ADS7uFIO1w7lbHBJ545374/jYAfsV7EHiPumUX2irGZdlk89+S15Onrf6/qq5ycOoNulA3yLKYjltaxDOggNwgBRWmb+eCy1L35+k35Ra1HgeExkqnCrJDaJMIbqrS9Aw9IyoYj9g2yACu90NgChXkHMUlKdAidj4juI13OOuz3De+jg1Swlzdm3/XGPrznApXMKXjDi67tcqtj5E5C1gUzyctS55ZVCrEaPPLzQVX9tdPGAR8/KQC0xPznCNpl3IMERW2PGrOZML/VsVKQ5uwvJ+6MZJUUuDnnLfgp/ePggmM5mV8YfKmmwIcXZWu+Hvt4P0qZZWDjjcwbHWgUowo0VPbqh0GaUT5Pe3ayWLox5j8lB4KiDIfDXp6ijKaB3CemH51ZemFGB0uKEXj2a4qEX+0DZzmILsB/jzwOTaKhRJM51RGyqA/6zKJqLvHU+iICr5Lszt516/fIlR4o8zx0E8Sd3HuLT25um2MFXDk2075jrkx50FiMyrJ0jOJFFdZL/fNGTh86NYLAz+x9E93yQQPBftKOSFagWNmmAiwxQcw3w94PfUl9Ac6vjhbd0CW2B78ajaeECIYq/aLBx3LxPdpyy27a1Kk9iFkrWstONXC8hq5+7QTTGYnJk0GFmKaqdqQc2zDN+XyFzWWQoE5YVBR/Xr7fUX8Be0uF5ej+s0bDSb6pEvErPxVMzeaGK7BWcZv5gFMAQ+3sa/rEZGfksGCrGReOjpeRdJeiL24axzncDg4AjhgO1X2dcxAjDGG7pDSNX3RVCVvzbha0oqFFo3ShQxpswg==
  • Ironport-sdr: tWEZlLfOt9HAZtXmkOdWd+VRqy3d+9NAVXusMoiS6BvDK9KChmWPBp7+dQcQIlHY5c6A+2qHTk at8mcSACttvw==
  • 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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.