예제 #1
0
/**
 * The init thread's function changes depending on how far along your Weenix is
 * developed. Before VM/FI, you'll probably just want to have this run whatever
 * tests you've written (possibly in a new process). After VM/FI, you'll just
 * exec "/sbin/init".
 *
 * Both arguments are unused.
 *
 * @param arg1 the first argument (unused)
 * @param arg2 the second argument (unused)
 */
static void *
initproc_run(int arg1, void *arg2)
{

  /*     NOT_YET_IMPLEMENTED("PROCS: initproc_run");


        return NULL; */

#ifdef __DRIVERS__

  kshell_add_command("faber",faber,"faber tests");
  kshell_add_command("sunghan",sunghan,"Sunghan tests");
  kshell_add_command("sunghan_deadlock",sunghan_deadlock,"Sunghan Deadlock tests");
  /*kshell_add_command("foo", do_foo, "invoke do_foo() to print a message...");

*/
  kshell_t *kshell = kshell_create(0);

  if (NULL == kshell) panic("init: Couldn't create kernel shell\n");
  dbg(DBG_PRINT,"(GRADING1B)\n");
  while (kshell_execute_next(kshell));
  kshell_destroy(kshell);


#endif

return NULL;




}
예제 #2
0
파일: kmain.c 프로젝트: Alicehang/bubble
/**
 * The init thread's function changes depending on how far along your Weenix is
 * developed. Before VM/FI, you'll probably just want to have this run whatever
 * tests you've written (possibly in a new process). After VM/FI, you'll just
 * exec "/sbin/init".
 *
 * Both arguments are unused.
 *
 * @param arg1 the first argument (unused)
 * @param arg2 the second argument (unused)
 */
static void *
initproc_run(int arg1, void *arg2)
{
        /*NOT_YET_IMPLEMENTED("PROCS: initproc_run");*/
        kshell_add_command("fabertest", do_fabertest, "invoke do_fabertest() to test.");
        kshell_add_command("sunghan", do_sunghan, "invoke sunghan_test() to test.");
        kshell_add_command("deadlock", do_deadlock, "invoke sunghan_deadlock_test() to test.");
        kshell_t *kshell = kshell_create(0);
        if (NULL == kshell) panic("init: Couldn't create kernel shell\n");
        while (kshell_execute_next(kshell))
        {
            while(!list_empty(&curproc->p_children))
                do_waitpid(-1,0,0);
        }
        kshell_destroy(kshell);
        return NULL;
}
예제 #3
0
파일: kmain.c 프로젝트: dan-boa/kernel2
/**
 * The init thread's function changes depending on how far along your Weenix is
 * developed. Before VM/FI, you'll probably just want to have this run whatever
 * tests you've written (possibly in a new process). After VM/FI, you'll just
 * exec "/bin/init".
 *
 * Both arguments are unused.
 *
 * @param arg1 the first argument (unused)
 * @param arg2 the second argument (unused)
 */
static void *
initproc_run(int arg1, void *arg2)
{
       
#ifdef __DRIVERS__
	
        kshell_add_command("Sunghan test", Sunghantest, "\n");
	kshell_add_command("Faber Test",fabertest,"\n");
	kshell_add_command("deadlock test",Sunghandeadlock,"\n");
	kshell_add_command("vfstest_main", vfstestmain,"\n");

        kshell_t *kshell = kshell_create(0);
        if (NULL == kshell) panic("init: Couldn't create kernel shell\n");
        while(kshell_execute_next(kshell));
        kshell_destroy(kshell);

#endif /* __DRIVERS__ */
	
    /*   dbg(DBG_INIT, "\n..........RUNNING INITPROC AWESOMELY .......\n");*/
        return NULL;
}
예제 #4
0
/**
 * The init thread's function changes depending on how far along your Weenix is
 * developed. Before VM/FI, you'll probably just want to have this run whatever
 * tests you've written (possibly in a new process). After VM/FI, you'll just
 * exec "/sbin/init".
 *
 * Both arguments are unused.
 *
 * @param arg1 the first argument (unused)
 * @param arg2 the second argument (unused)
 */
static void *
initproc_run(int arg1, void *arg2)
{
	 #ifdef __DRIVERS__
        /*All Kshell commands*/
        kshell_add_command("faber", faberTest, "Run faber_thread_test().");
        kshell_add_command("sunghan", sunghanTest, "Run sunghan_test().");
        kshell_add_command("deadlock", sunghandeadlocktest, "Run sunghan_deadlock_test().");
      
          kshell_t *kshell = kshell_create(0);
             
if (NULL == kshell) panic("init: Couldn't create kernel shell\n");

dbg(DBG_PRINT,"(GRADING1B) Kshell created successfully") ;
while (kshell_execute_next(kshell));

kshell_destroy(kshell);
dbg(DBG_PRINT,"(GRADING1B) Kshell destroyed") ;
#endif /* __DRIVERS__ */ 
    return NULL;
}
예제 #5
0
파일: kmain.c 프로젝트: BarFox/gitDir
/**
 * The init thread's function changes depending on how far along your Weenix is
 * developed. Before VM/FI, you'll probably just want to have this run whatever
 * tests you've written (possibly in a new process). After VM/FI, you'll just
 * exec "/sbin/init".
 *
 * Both arguments are unused.
 *
 * @param arg1 the first argument (unused)
 * @param arg2 the second argument (unused)
 */
static void *
initproc_run(int arg1, void *arg2)
{
        /* do nothing for now -- shuts down the kernel 
           run the kshell -- infinite loop, prompt user for command -- exit = return */
        dbg(DBG_PRINT, "(GRADING1B)\n");
#ifdef __DRIVERS__

        kshell_add_command("faber", do_faber, "invock do_faber()");
        kshell_add_command("sunghan", do_sunghan, "invock do_sunghan()");
        kshell_add_command("deadlock", do_deadlock, "invock do_deadlock()");

        kshell_t *kshell = kshell_create(0);
        if (NULL == kshell) panic("init: Couldn't create kernel shell\n");
        while (kshell_execute_next(kshell));
        kshell_destroy(kshell);

#endif /* __DRIVERS__ */

     /*   NOT_YET_IMPLEMENTED("PROCS: initproc_run"); */

        return NULL;
}