Changeset 4e7d3dd in mainline


Ignore:
Timestamp:
2011-01-27T15:06:07Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0843f02
Parents:
bf75e3cb
Message:

cstyle (no change in functionality)

File:
1 edited

Legend:

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

    rbf75e3cb r4e7d3dd  
    6363#include <debug.h>
    6464
    65 static void before_task_runs(void);
    66 static void before_thread_runs(void);
    67 static void after_thread_ran(void);
    6865static void scheduler_separated_stack(void);
    6966
     
    7168
    7269/** Carry out actions before new task runs. */
    73 void before_task_runs(void)
     70static void before_task_runs(void)
    7471{
    7572        before_task_runs_arch();
     
    8582 *
    8683 */
    87 void before_thread_runs(void)
     84static void before_thread_runs(void)
    8885{
    8986        before_thread_runs_arch();
     87       
    9088#ifdef CONFIG_FPU_LAZY
    9189        if(THREAD == CPU->fpu_owner)
     
    113111 *
    114112 */
    115 void after_thread_ran(void)
     113static void after_thread_ran(void)
    116114{
    117115        after_thread_ran_arch();
     
    391389         * possible destruction should thread_destroy() be called on this or any
    392390         * other processor while the scheduler is still using them.
    393          *
    394391         */
    395392        if (old_task)
     
    417414                                 * The thread structure is kept allocated until
    418415                                 * somebody calls thread_detach() on it.
    419                                  *
    420416                                 */
    421417                                if (!irq_spinlock_trylock(&THREAD->join_wq.lock)) {
    422418                                        /*
    423419                                         * Avoid deadlock.
    424                                          *
    425420                                         */
    426421                                        irq_spinlock_unlock(&THREAD->lock, false);
     
    443438                        /*
    444439                         * Prefer the thread after it's woken up.
    445                          *
    446440                         */
    447441                        THREAD->priority = -1;
     
    451445                         * waitq_sleep(). Address of wq->lock is kept in
    452446                         * THREAD->sleep_queue.
    453                          *
    454447                         */
    455448                        irq_spinlock_unlock(&THREAD->sleep_queue->lock, false);
     
    461454                        /*
    462455                         * Entering state is unexpected.
    463                          *
    464456                         */
    465457                        panic("tid%" PRIu64 ": unexpected state %s.",
     
    480472       
    481473        /*
    482          * If both the old and the new task are the same, lots of work is
    483          * avoided.
    484          *
     474         * If both the old and the new task are the same,
     475         * lots of work is avoided.
    485476         */
    486477        if (TASK != THREAD->task) {
     
    488479               
    489480                /*
    490                  * Note that it is possible for two tasks to share one address
    491                  * space.
    492                  (
     481                 * Note that it is possible for two tasks
     482                 * to share one address space.
    493483                 */
    494484                if (old_as != new_as) {
     
    496486                         * Both tasks and address spaces are different.
    497487                         * Replace the old one with the new one.
    498                          *
    499488                         */
    500489                        as_switch(old_as, new_as);
     
    527516         * necessary, is to be mapped in before_thread_runs(). This
    528517         * function must be executed before the switch to the new stack.
    529          *
    530518         */
    531519        before_thread_runs();
     
    534522         * Copy the knowledge of CPU, TASK, THREAD and preemption counter to
    535523         * thread's stack.
    536          *
    537524         */
    538525        the_copy(THE, (the_t *) THREAD->kstack);
Note: See TracChangeset for help on using the changeset viewer.