Changeset 8a64e81e in mainline
- Timestamp:
- 2012-07-06T13:31:02Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0d56712
- Parents:
- 518dd43
- Location:
- kernel
- Files:
-
- 9 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/Makefile
r518dd43 r8a64e81e 252 252 generic/src/synch/waitq.c \ 253 253 generic/src/synch/futex.c \ 254 generic/src/synch/workqueue.c \ 254 255 generic/src/synch/rcu.c \ 255 256 generic/src/smp/ipi.c \ … … 303 304 test/synch/semaphore1.c \ 304 305 test/synch/semaphore2.c \ 306 test/synch/workqueue1.c \ 307 test/synch/workqueue2.c \ 308 test/synch/workqueue3.c \ 305 309 test/print/print1.c \ 306 310 test/print/print2.c \ -
kernel/generic/include/proc/thread.h
r518dd43 r8a64e81e 180 180 /** Thread ID. */ 181 181 thread_id_t tid; 182 183 /** Work queue this thread belongs to or NULL. Immutable. */ 184 struct work_queue *workq; 185 /** Links work queue threads. Protected by workq->lock. */ 186 link_t workq_link; 187 /** True if the worker was blocked and is not running. 188 * 189 * Protected by thread->lock. 190 */ 191 bool workq_blocked; 192 /** True if the worker will block in order to become idle. 193 * 194 * Protected by workq->lock. 195 */ 196 bool workq_idling; 182 197 183 198 /** Architecture-specific data. */ -
kernel/generic/src/console/cmd.c
r518dd43 r8a64e81e 68 68 #include <sysinfo/sysinfo.h> 69 69 #include <symtab.h> 70 #include <synch/workqueue.h> 70 71 #include <errno.h> 71 72 … … 447 448 .argc = 1, 448 449 .argv = &zone_argv 450 }; 451 452 /* Data and methods for the 'workq' command */ 453 static int cmd_workq(cmd_arg_t *argv); 454 static cmd_info_t workq_info = { 455 .name = "workq", 456 .description = "Show global workq information.", 457 .func = cmd_workq, 458 .argc = 0 449 459 }; 450 460 … … 522 532 &uptime_info, 523 533 &version_info, 534 &workq_info, 524 535 &zones_info, 525 536 &zone_info, … … 1015 1026 } 1016 1027 1028 /** Prints information about the global work queue. 1029 * 1030 * @param argv Ignores 1031 * 1032 * @return Always 1 1033 */ 1034 int cmd_workq(cmd_arg_t *argv) 1035 { 1036 workq_global_print_info(); 1037 return 1; 1038 } 1039 1040 1017 1041 /** Command for listing memory zones 1018 1042 * -
kernel/generic/src/main/kinit.c
r518dd43 r8a64e81e 77 77 #include <synch/waitq.h> 78 78 #include <synch/spinlock.h> 79 #include <synch/workqueue.h> 79 80 80 81 #define ALIVE_CHARS 4 … … 103 104 */ 104 105 thread_detach(THREAD); 105 106 106 107 interrupts_disable(); 108 109 /* 110 * Start processing work queue items. Some may have been queued during boot. 111 */ 112 workq_global_worker_init(); 107 113 108 114 #ifdef CONFIG_SMP -
kernel/generic/src/main/main.c
r518dd43 r8a64e81e 75 75 #include <synch/waitq.h> 76 76 #include <synch/futex.h> 77 #include <synch/workqueue.h> 77 78 #include <smp/smp_call.h> 78 79 #include <arch/arch.h> … … 249 250 250 251 smp_call_init(); 252 workq_global_init(); 251 253 clock_counter_init(); 252 254 timeout_init(); -
kernel/generic/src/proc/scheduler.c
r518dd43 r8a64e81e 52 52 #include <atomic.h> 53 53 #include <synch/spinlock.h> 54 #include <synch/workqueue.h> 54 55 #include <config.h> 55 56 #include <context.h> … … 126 127 static void after_thread_ran(void) 127 128 { 129 workq_after_thread_ran(); 128 130 after_thread_ran_arch(); 129 131 } -
kernel/generic/src/proc/thread.c
r518dd43 r8a64e81e 46 46 #include <synch/spinlock.h> 47 47 #include <synch/waitq.h> 48 #include <synch/workqueue.h> 48 49 #include <cpu.h> 49 50 #include <str.h> … … 260 261 } 261 262 263 /** Invoked right before thread_ready() readies the thread. thread is locked. */ 264 static void before_thread_is_ready(thread_t *thread) 265 { 266 ASSERT(irq_spinlock_locked(&thread->lock)); 267 workq_before_thread_is_ready(thread); 268 } 269 262 270 /** Make thread ready 263 271 * … … 273 281 ASSERT(thread->state != Ready); 274 282 283 before_thread_is_ready(thread); 284 275 285 int i = (thread->priority < RQ_COUNT - 1) ? 276 286 ++thread->priority : thread->priority; … … 378 388 379 389 thread->task = task; 390 391 thread->workq = NULL; 380 392 381 393 thread->fpu_context_exists = false; -
kernel/test/test.c
r518dd43 r8a64e81e 50 50 #include <synch/semaphore1.def> 51 51 #include <synch/semaphore2.def> 52 #include <synch/workqueue1.def> 53 #include <synch/workqueue2.def> 54 #include <synch/workqueue3.def> 52 55 #include <print/print1.def> 53 56 #include <print/print2.def> -
kernel/test/test.h
r518dd43 r8a64e81e 76 76 extern const char *test_thread1(void); 77 77 extern const char *test_smpcall1(void); 78 extern const char *test_workqueue1(void); 79 extern const char *test_workqueue2(void); 80 extern const char *test_workqueue2stop(void); 81 extern const char *test_workqueue3(void); 82 extern const char *test_workqueue3quit(void); 83 78 84 79 85 extern test_t tests[];
Note:
See TracChangeset
for help on using the changeset viewer.