]> Zhao Yanbai Git Server - minix.git/commitdiff
SMP - CPU and CPU mask for processes
authorTomas Hruby <tom@minix3.org>
Wed, 15 Sep 2010 14:10:16 +0000 (14:10 +0000)
committerTomas Hruby <tom@minix3.org>
Wed, 15 Sep 2010 14:10:16 +0000 (14:10 +0000)
- each process has associated information about the cpu it is currently
  scheduled on and the mask of cpus it is allowed to use.

kernel/proc.h

index dc70a806c321b25e8bcc3ccc4245eabc6e6d57a5..2a9b915790d86282c6f897e99afda6be52651907 100644 (file)
@@ -32,6 +32,12 @@ struct proc {
   unsigned p_quantum_size_ms;  /* assigned time quantum in ms
                                   FIXME remove this */
   struct proc *p_scheduler;    /* who should get out of quantum msg */
+  unsigned p_cpu;              /* what CPU is the process running on */
+#ifdef CONFIG_SMP
+  bitchunk_t p_cpu_mask[BITMAP_CHUNKS(CONFIG_MAX_CPUS)]; /* what CPUs is hte
+                                                           process allowed to
+                                                           run on */
+#endif
 
   struct mem_map p_memmap[NR_LOCAL_SEGS];   /* memory map (T, D, S) */