Merge branch 'master' of ssh://scm.millennium.berkeley.edu/project/cs/radlab/src...
authorZach Anderson <zra@zra-intrepid.(none)>
Tue, 27 Oct 2009 18:03:24 +0000 (11:03 -0700)
committerZach Anderson <zra@zra-intrepid.(none)>
Tue, 27 Oct 2009 18:03:24 +0000 (11:03 -0700)
Conflicts:
kern/src/process.c
user/apps/roslib/mhello.c

1  2 
kern/include/kmalloc.h
kern/src/env.c
kern/src/kmalloc.c
kern/src/page_alloc.c
kern/src/process.c
kern/src/slab.c
kern/src/testing.c

@@@ -30,9 -33,10 +33,10 @@@ void  (DFREE(addr) kfree)(void *addr)
  struct kmalloc_tag {
        int flags;
        union {
 -              struct kmem_cache *my_cache;
 -              size_t num_pages;
 +              struct kmem_cache *my_cache WHEN(flags == KMALLOC_TAG_CACHE);
 +              size_t num_pages WHEN(flags == KMALLOC_TAG_PAGES);
        };
+       uint32_t canary;
  };
  
  #endif //ROS_KERN_KMALLOC_H
diff --cc kern/src/env.c
Simple merge
Simple merge
Simple merge
@@@ -545,15 -538,14 +544,17 @@@ error_t proc_give_cores(struct proc *SA
                                assert(corelist[i] != core_id()); // sanity
                                /* if we want to allow yielding of vcore0 and restarting it at
                                 * its yield point *while still RUNNING_M*, uncomment this */
+                               // TODO: we don't (VC0)
                                /*
                                if (i == 0)
-                                       send_active_msg_sync(p->vcoremap[0], __startcore,
-                                                            (uint32_t)p, (uint32_t)&p->env_tf, 0);
+                                       send_active_message(p->vcoremap[0], __startcore,
+                                                           (uint32_t)p, (uint32_t)&p->env_tf, 0);
                                else */
 -                              send_active_message(corelist[i], __startcore, p,
 -                                                  (void*)0, (void*)free_vcoreid);
 +                              send_active_msg_sync(corelist[i], __startcore, p,
 +                                                   (struct Trapframe *)0,
 +                                                   (void*SNT)free_vcoreid);
++                              //send_active_message(corelist[i], __startcore, p,
++                              //                    (void*)0, (void*)free_vcoreid);
                        }
                        break;
                default:
@@@ -605,8 -597,7 +606,7 @@@ error_t proc_take_cores(struct proc *SA
                vcoreid = get_vcoreid(p, corelist[i]);
                assert(p->vcoremap[vcoreid] == corelist[i]);
                if (message)
-                       // TODO: careful of active message deadlock (AMDL)
 -                      send_active_message(corelist[i], message, 0, 0, 0);
 +                      send_active_msg_sync(corelist[i], message, arg0, arg1, arg2);
                // give the pcore back to the idlecoremap
                idlecoremap[num_idlecores++] = corelist[i];
                p->vcoremap[vcoreid] = -1;
@@@ -641,9 -631,8 +641,8 @@@ error_t proc_take_allcores(struct proc 
                // find next active vcore
                active_vcoreid = get_busy_vcoreid(p, active_vcoreid);
                if (message)
-                       // TODO: careful of active message deadlock (AMDL)
 -                      send_active_message(p->vcoremap[active_vcoreid], message,
 -                                          (void *SNT)0, (void *SNT)0, (void *SNT)0);
 +                      send_active_msg_sync(p->vcoremap[active_vcoreid], message,
 +                                           arg0, arg1, arg2);
                // give the pcore back to the idlecoremap
                idlecoremap[num_idlecores++] = p->vcoremap[active_vcoreid];
                p->vcoremap[active_vcoreid] = -1;
diff --cc kern/src/slab.c
Simple merge
Simple merge