direct-io.hg

changeset 10344:a734745bf058

[MINI-OS] Applications that provide their own app_main need not run the xenbus test.
Signed-of-by: John D. Ramsdell <ramsdell@mitre.org>
author kaf24@firebug.cl.cam.ac.uk
date Tue Jun 13 16:07:16 2006 +0100 (2006-06-13)
parents 2fea03842f40
children b0ba792f3935
files extras/mini-os/kernel.c
line diff
     1.1 --- a/extras/mini-os/kernel.c	Tue Jun 13 15:56:28 2006 +0100
     1.2 +++ b/extras/mini-os/kernel.c	Tue Jun 13 16:07:16 2006 +0100
     1.3 @@ -82,17 +82,6 @@ static shared_info_t *map_shared_info(un
     1.4  }
     1.5  
     1.6  
     1.7 -void test_xenbus(void);
     1.8 -
     1.9 -/* Do initialisation from a thread once the scheduler's available */
    1.10 -static void init_xs(void *ign)
    1.11 -{
    1.12 -    init_xenbus();
    1.13 -
    1.14 -    test_xenbus();
    1.15 -}
    1.16 -
    1.17 -
    1.18  u8 xen_features[XENFEAT_NR_SUBMAPS * 32];
    1.19  
    1.20  void setup_xen_features(void)
    1.21 @@ -111,10 +100,18 @@ void setup_xen_features(void)
    1.22      }
    1.23  }
    1.24  
    1.25 +void test_xenbus(void);
    1.26 +
    1.27 +void xenbus_tester(void *p)
    1.28 +{
    1.29 +    test_xenbus();
    1.30 +}
    1.31 +
    1.32  /* This should be overridden by the application we are linked against. */
    1.33  __attribute__((weak)) int app_main(start_info_t *si)
    1.34  {
    1.35      printk("Dummy main: start_info=%p\n", si);
    1.36 +    create_thread("xenbus_tester", xenbus_tester, si);
    1.37      return 0;
    1.38  }
    1.39  
    1.40 @@ -183,8 +180,8 @@ void start_kernel(start_info_t *si)
    1.41      /* Init scheduler. */
    1.42      init_sched();
    1.43   
    1.44 -    /* Init XenBus from a separate thread */
    1.45 -    create_thread("init_xs", init_xs, NULL);
    1.46 +    /* Init XenBus */
    1.47 +    init_xenbus();
    1.48  
    1.49      /* Call (possibly overridden) app_main() */
    1.50      app_main(&start_info);