Changeset 62b6d17 in mainline for kernel/generic/src/console/cmd.c
- Timestamp:
- 2006-12-14T16:47:36Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aeaebcc
- Parents:
- 55cc9bc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/cmd.c
r55cc9bc r62b6d17 57 57 #include <mm/tlb.h> 58 58 #include <arch/mm/tlb.h> 59 #include <mm/as.h>60 59 #include <mm/frame.h> 61 60 #include <main/version.h> … … 860 859 } 861 860 862 static void test_wrapper(void *arg)863 { 864 test_t *test = (test_t *) arg;861 static bool run_test(const test_t *test) 862 { 863 printf("%s\t\t%s\n", test->name, test->desc); 865 864 866 865 /* Update and read thread accounting … … 886 885 if (ret == NULL) { 887 886 printf("Test passed\n"); 888 // return true; 889 return; 887 return true; 890 888 } 891 889 892 890 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; 921 892 } 922 893
Note:
See TracChangeset
for help on using the changeset viewer.