Merge branch 'ci-hwloc-job' of https://github.com/bertwesarg/htop into bertwesarg-ci-hwloc-job

This commit is contained in:
Nathan Scott
2020-08-26 10:15:00 +10:00
parent d0f31ede56
commit 728b04bbb5
14 changed files with 529 additions and 63 deletions

View File

@ -318,10 +318,11 @@ static Htop_Reaction actionSetAffinity(State* st) {
if (!p) return HTOP_OK;
Affinity* affinity1 = Affinity_get(p, st->pl);
if (!affinity1) return HTOP_OK;
Panel* affinityPanel = AffinityPanel_new(st->pl, affinity1);
int width;
Panel* affinityPanel = AffinityPanel_new(st->pl, affinity1, &width);
Affinity_delete(affinity1);
void* set = Action_pickFromVector(st, affinityPanel, 15, true);
void* set = Action_pickFromVector(st, affinityPanel, width, true);
if (set) {
Affinity* affinity2 = AffinityPanel_getAffinity(affinityPanel, st->pl);
bool ok = MainPanel_foreachProcess((MainPanel*)panel, (MainPanel_ForeachProcessFn) Affinity_set, (Arg){ .v = affinity2 }, NULL);