Changeset 62b6d17 in mainline for kernel/generic/src/console/cmd.c


Ignore:
Timestamp:
2006-12-14T16:47:36Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
aeaebcc
Parents:
55cc9bc
Message:

introduce uncounted threads, whose accounting doesn't affect accumulated task accounting
run tests in kconsole thread again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/console/cmd.c

    r55cc9bc r62b6d17  
    5757#include <mm/tlb.h>
    5858#include <arch/mm/tlb.h>
    59 #include <mm/as.h>
    6059#include <mm/frame.h>
    6160#include <main/version.h>
     
    860859}
    861860
    862 static void test_wrapper(void *arg)
    863 {
    864         test_t *test = (test_t *) arg;
     861static bool run_test(const test_t *test)
     862{
     863        printf("%s\t\t%s\n", test->name, test->desc);
    865864       
    866865        /* Update and read thread accounting
     
    886885        if (ret == NULL) {
    887886                printf("Test passed\n");
    888 //              return true;
    889                 return;
     887                return true;
    890888        }
    891889
    892890        printf("%s\n", ret);
    893 //      return false;
    894 }
    895 
    896 static bool run_test(const test_t *test)
    897 {
    898         printf("%s\t\t%s\n", test->name, test->desc);
    899        
    900         /* Create separate task and thread
    901            for the test */
    902         task_t *ta = task_create(AS_KERNEL, "test");
    903         if (ta == NULL) {
    904                 printf("Unable to create test task\n");
    905                 return false;
    906         }
    907        
    908         thread_t *t = thread_create(test_wrapper, (void *) test, ta, 0, "test_main");
    909         if (t == NULL) {
    910                 printf("Unable to create test main thread\n");
    911                 task_destroy(ta);
    912                 return false;
    913         }
    914        
    915         /* Run the test */
    916         thread_ready(t);
    917         thread_join(t);
    918         thread_detach(t);
    919        
    920         return true;
     891        return false;
    921892}
    922893
Note: See TracChangeset for help on using the changeset viewer.