Subversion Repositories HelenOS

Rev

Rev 2309 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2309 Rev 2330
Line 118... Line 118...
118
        tasklet_do();
118
        tasklet_do();
119
#ifdef CONFIG_SMP
119
#ifdef CONFIG_SMP
120
        if (config.cpu_active>1) {
120
        if (config.cpu_active>1) {
121
            current_cpu = CPU->id;
121
            current_cpu = CPU->id;
122
            //find the first cpu with nonempty tasklet_list 
122
            //find the first cpu with nonempty tasklet_list 
123
            for (new_cpu = (current_cpu + 1) % config.cpu_active; new_cpu!=current_cpu && tasklet_list[new_cpu]==0;
123
            for (new_cpu = (current_cpu + 1) % config.cpu_active; new_cpu!=current_cpu && tasklet_list[new_cpu]==0 && cpus[new_cpu].active;
124
                    new_cpu=(new_cpu + 1)% config.cpu_active);
124
                    new_cpu=(new_cpu + 1)% config.cpu_active);
125
 
125
 
126
            if (new_cpu!=current_cpu) {
126
            if (new_cpu!=current_cpu) {
127
                //we need to migrate this thread to CPU with id new_cpu
127
                //we need to migrate this thread to CPU with id new_cpu
128
                cpu = &cpus[new_cpu];
128
                cpu = &cpus[new_cpu];