Rev 2292 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2292 | Rev 2307 | ||
---|---|---|---|
Line 41... | Line 41... | ||
41 | { |
41 | { |
42 | printf("cpu%d: %s",CPU->id, data); |
42 | printf("cpu%d: %s",CPU->id, data); |
43 | } |
43 | } |
44 | 44 | ||
45 | bool gquiet; |
45 | bool gquiet; |
- | 46 | #ifdef CONFIG_SMP |
|
46 | 47 | ||
47 | static void running_tasklet(void * data) |
48 | static void running_tasklet(void * data) |
48 | { |
49 | { |
49 | waitq_t wq; |
50 | waitq_t wq; |
50 | waitq_initialize(&wq); |
51 | waitq_initialize(&wq); |
Line 100... | Line 101... | ||
100 | printf("cpu:%d, Freeing...", CPU->id); |
101 | printf("cpu:%d, Freeing...", CPU->id); |
101 | tasklet_free(tasklet_desc); |
102 | tasklet_free(tasklet_desc); |
102 | if (!gquiet) |
103 | if (!gquiet) |
103 | printf("Done!\n"); |
104 | printf("Done!\n"); |
104 | } |
105 | } |
105 | 106 | #endif |
|
106 | char * test_tasklet1(bool quiet) |
107 | char * test_tasklet1(bool quiet) |
107 | { |
108 | { |
108 | gquiet = quiet; |
109 | gquiet = quiet; |
109 | waitq_t wq; |
110 | waitq_t wq; |
110 | waitq_initialize(&wq); |
111 | waitq_initialize(&wq); |
111 | tasklet_descriptor_t *tasklet_desc; |
112 | tasklet_descriptor_t *tasklet_desc; |
112 | thread_t* second_thread = NULL; |
- | |
113 | #ifdef CONFIG_SMP |
113 | #ifdef CONFIG_SMP |
- | 114 | thread_t* second_thread = NULL; |
|
114 | if (!quiet) |
115 | if (!quiet) |
115 | printf("cpus:%d\n", config.cpu_active); |
116 | printf("cpus:%d\n", config.cpu_active); |
116 | 117 | ||
117 | if (config.cpu_active >1) { |
118 | if (config.cpu_active >1) { |
118 | second_thread = thread_create(&running_tasklet, NULL, TASK, THREAD_FLAG_WIRED,"running tasklet", false); |
119 | second_thread = thread_create(&running_tasklet, NULL, TASK, THREAD_FLAG_WIRED,"running tasklet", false); |