提交 c1d09e43 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

flag to avoid stealing in the workqueue code, needed to ensure

the exec-cleanup and wait-cleanup handlers run on the right core (disabled by default). forkexectree now shares relatively little with steal_nonexec=0 and wq_steal_others=0.
上级 f58d6070
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#define NSLOTS (1 << WQSHIFT) #define NSLOTS (1 << WQSHIFT)
enum { wq_steal_others = 1 };
class wq { class wq {
public: public:
wq(); wq();
...@@ -187,6 +189,9 @@ wq::pop(int c) ...@@ -187,6 +189,9 @@ wq::pop(int c)
inline work* inline work*
wq::steal(int c) wq::steal(int c)
{ {
if (!wq_steal_others && (c != mycpuid()))
return 0;
struct wqueue *q = &q_[c]; struct wqueue *q = &q_[c];
work *w; work *w;
int i; int i;
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论