Пример #1
0
 private static AppMain.AMS_AME_RUNTIME _amCreateRuntimeParticle(
     AppMain.AMS_AME_CREATE_PARAM param)
 {
     AppMain.AMS_AME_RUNTIME runtime = AppMain._amAllocRuntime();
     runtime.ecb              = param.ecb;
     runtime.node             = param.node;
     runtime.state            = 16384;
     runtime.child_head.next  = runtime.child_tail;
     runtime.child_tail.prev  = runtime.child_head;
     runtime.work_head.next   = runtime.work_tail;
     runtime.work_tail.prev   = runtime.work_head;
     runtime.active_head.next = runtime.active_tail;
     runtime.active_tail.prev = runtime.active_head;
     for (AppMain.AMS_AME_NODE node = param.node.child; node != null; node = node.sibling)
     {
         if (AppMain.AMD_AME_IS_PARTICLE(node))
         {
             runtime.spawn_runtime = AppMain._amCreateRuntimeGroup(param.ecb, node);
             break;
         }
     }
     AppMain._amAddEntry(param.ecb, runtime);
     param.runtime = runtime;
     AppMain._amCreateParticle(param);
     return(runtime);
 }
Пример #2
0
 public static AppMain.AMS_AME_RUNTIME _amCreateRuntimeGroup(
     AppMain.AMS_AME_ECB ecb,
     AppMain.AMS_AME_NODE node)
 {
     AppMain.AMS_AME_RUNTIME runtime = AppMain._amAllocRuntime();
     runtime.ecb              = ecb;
     runtime.node             = node;
     runtime.child_head.next  = runtime.child_tail;
     runtime.child_tail.prev  = runtime.child_head;
     runtime.work_head.next   = runtime.work_tail;
     runtime.work_tail.prev   = runtime.work_head;
     runtime.active_head.next = runtime.active_tail;
     runtime.active_tail.prev = runtime.active_head;
     for (AppMain.AMS_AME_NODE node1 = node.child; node1 != null; node1 = node1.sibling)
     {
         if (AppMain.AMD_AME_IS_PARTICLE(node1))
         {
             runtime.spawn_runtime = AppMain._amCreateRuntimeGroup(ecb, node1);
             break;
         }
     }
     AppMain._amAddEntry(ecb, runtime);
     return(runtime);
 }