Changeset 8a64e81e in mainline for kernel/generic/src/proc


Ignore:
Timestamp:
2012-07-06T13:31:02Z (13 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0d56712
Parents:
518dd43
Message:

workq: Add work queues: allow blocking work items, queuing items from interrupt handlers.

Location:
kernel/generic/src/proc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/proc/scheduler.c

    r518dd43 r8a64e81e  
    5252#include <atomic.h>
    5353#include <synch/spinlock.h>
     54#include <synch/workqueue.h>
    5455#include <config.h>
    5556#include <context.h>
     
    126127static void after_thread_ran(void)
    127128{
     129        workq_after_thread_ran();
    128130        after_thread_ran_arch();
    129131}
  • kernel/generic/src/proc/thread.c

    r518dd43 r8a64e81e  
    4646#include <synch/spinlock.h>
    4747#include <synch/waitq.h>
     48#include <synch/workqueue.h>
    4849#include <cpu.h>
    4950#include <str.h>
     
    260261}
    261262
     263/** Invoked right before thread_ready() readies the thread. thread is locked. */
     264static 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
    262270/** Make thread ready
    263271 *
     
    273281        ASSERT(thread->state != Ready);
    274282
     283        before_thread_is_ready(thread);
     284       
    275285        int i = (thread->priority < RQ_COUNT - 1) ?
    276286            ++thread->priority : thread->priority;
     
    378388       
    379389        thread->task = task;
     390       
     391        thread->workq = NULL;
    380392       
    381393        thread->fpu_context_exists = false;
Note: See TracChangeset for help on using the changeset viewer.