fix thread migration code (i.e., sched_setaffinity())

- moved migration code into idle() process and updated schedule() to detect
  when a thread has moved to another CPU in order to avoid doing housekeeping
  on behalf of the original one
- start CPU head from core 0
- keeps track of nested interrupts
This commit is contained in:
Balazs Gerofi
2015-07-24 19:58:25 +09:00
parent 3988b0fc61
commit 9b1e691588
3 changed files with 22 additions and 13 deletions

View File

@ -79,7 +79,7 @@ Core with BSP HW ID 226 boots next and is given SW-ID of 226.
Core with BSP HW ID 227 boots next and is given SW-ID of 227.
*/
static ihk_spinlock_t cpuid_head_lock = 0;
static int cpuid_head = 1;
static int cpuid_head = 0;
/* archtecture-depended syscall handlers */
int obtain_clone_cpuid() {