Changes in kernel/generic/src/proc/thread.c [48dcc69:ee42e43] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
r48dcc69 ree42e43 48 48 #include <synch/spinlock.h> 49 49 #include <synch/waitq.h> 50 #include <synch/rwlock.h>51 50 #include <cpu.h> 52 51 #include <str.h> … … 329 328 thread->flags = flags; 330 329 thread->state = Entering; 331 thread->call_me = NULL;332 thread->call_me_with = NULL;333 330 334 331 timeout_initialize(&thread->sleep_timeout); … … 343 340 thread->detached = false; 344 341 waitq_initialize(&thread->join_wq); 345 346 thread->rwlock_holder_type = RWLOCK_NONE;347 342 348 343 thread->task = task; … … 583 578 584 579 (void) waitq_sleep_timeout(&wq, usec, SYNCH_FLAGS_NON_BLOCKING); 585 }586 587 /** Register thread out-of-context invocation588 *589 * Register a function and its argument to be executed590 * on next context switch to the current thread. Must591 * be called with interrupts disabled.592 *593 * @param call_me Out-of-context function.594 * @param call_me_with Out-of-context function argument.595 *596 */597 void thread_register_call_me(void (* call_me)(void *), void *call_me_with)598 {599 irq_spinlock_lock(&THREAD->lock, false);600 THREAD->call_me = call_me;601 THREAD->call_me_with = call_me_with;602 irq_spinlock_unlock(&THREAD->lock, false);603 580 } 604 581
Note:
See TracChangeset
for help on using the changeset viewer.