Changeset 2e4e706 in mainline


Ignore:
Timestamp:
2010-05-13T08:51:36Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c964521
Parents:
9929742
Message:

cstyle changes (no change in functionality)

Location:
kernel/generic
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/arch.h

    r9929742 r2e4e706  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    4141#include <mm/as.h>
    4242
    43 #define DEFAULT_CONTEXT         0
     43#define DEFAULT_CONTEXT  0
    4444
    45 #define CPU                     THE->cpu
    46 #define THREAD                  THE->thread
    47 #define TASK                    THE->task
    48 #define AS                      THE->as
    49 #define CONTEXT         (THE->task ? THE->task->context : DEFAULT_CONTEXT)
    50 #define PREEMPTION_DISABLED     THE->preemption_disabled
     45#define CPU                  THE->cpu
     46#define THREAD               THE->thread
     47#define TASK                 THE->task
     48#define AS                   THE->as
     49#define CONTEXT              (THE->task ? THE->task->context : DEFAULT_CONTEXT)
     50#define PREEMPTION_DISABLED  THE->preemption_disabled
    5151
    52 #define context_check(ctx1, ctx2)       ((ctx1) == (ctx2))
     52#define context_check(ctx1, ctx2)  ((ctx1) == (ctx2))
    5353
    5454/**
     
    5858 */
    5959typedef struct {
    60         size_t preemption_disabled;     /**< Preemption disabled counter. */
    61         thread_t *thread;               /**< Current thread. */
    62         task_t *task;                   /**< Current task. */
    63         cpu_t *cpu;                     /**< Executing cpu. */
    64         as_t *as;                       /**< Current address space. */
     60        size_t preemption_disabled;  /**< Preemption disabled counter. */
     61        thread_t *thread;            /**< Current thread. */
     62        task_t *task;                /**< Current task. */
     63        cpu_t *cpu;                  /**< Executing cpu. */
     64        as_t *as;                    /**< Current address space. */
    6565} the_t;
    6666
    6767#define THE  ((the_t * )(get_stack_base()))
    6868
    69 extern void the_initialize(the_t *the);
    70 extern void the_copy(the_t *src, the_t *dst);
     69extern void the_initialize(the_t *);
     70extern void the_copy(the_t *, the_t *);
    7171
    7272extern void arch_pre_mm_init(void);
     
    8080extern void reboot(void);
    8181extern void arch_reboot(void);
    82 extern void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller);
     82extern void *arch_construct_function(fncptr_t *, void *, void *);
    8383
    8484#endif
  • kernel/generic/include/preemption.h

    r9929742 r2e4e706  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
  • kernel/generic/src/preempt/preemption.c

    r9929742 r2e4e706  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
    3232
    3333/**
    34  * @file        preemption.c
    35  * @brief       Preemption control.
     34 * @file preemption.c
     35 * @brief Preemption control.
    3636 */
    37  
     37
    3838#include <preemption.h>
    3939#include <arch.h>
     
    5252void preemption_enable(void)
    5353{
    54         ASSERT(THE->preemption_disabled);
     54        ASSERT(PREEMPTION_DISABLED);
    5555        memory_barrier();
    5656        THE->preemption_disabled--;
  • kernel/generic/src/synch/mutex.c

    r9929742 r2e4e706  
    3333/**
    3434 * @file
    35  * @brief       Mutexes.
     35 * @brief Mutexes.
    3636 */
    37  
     37
    3838#include <synch/mutex.h>
    3939#include <synch/semaphore.h>
     
    4444/** Initialize mutex.
    4545 *
    46  * @param mtx           Mutex.
    47  * @param type          Type of the mutex.
     46 * @param mtx  Mutex.
     47 * @param type Type of the mutex.
    4848 */
    4949void mutex_initialize(mutex_t *mtx, mutex_type_t type)
     
    5757 * Timeout mode and non-blocking mode can be requested.
    5858 *
    59  * @param mtx           Mutex.
    60  * @param usec          Timeout in microseconds.
    61  * @param flags         Specify mode of operation.
     59 * @param mtx   Mutex.
     60 * @param usec  Timeout in microseconds.
     61 * @param flags Specify mode of operation.
    6262 *
    6363 * For exact description of possible combinations of
    6464 * usec and flags, see comment for waitq_sleep_timeout().
    6565 *
    66  * @return              See comment for waitq_sleep_timeout().
     66 * @return See comment for waitq_sleep_timeout().
     67 *
    6768 */
    6869int _mutex_lock_timeout(mutex_t *mtx, uint32_t usec, int flags)
     
    7071        int rc;
    7172
    72         if (mtx->type == MUTEX_PASSIVE && THREAD) {
     73        if ((mtx->type == MUTEX_PASSIVE) && (THREAD)) {
    7374                rc = _semaphore_down_timeout(&mtx->sem, usec, flags);
    7475        } else {
    75                 ASSERT(mtx->type == MUTEX_ACTIVE || !THREAD);
     76                ASSERT((mtx->type == MUTEX_ACTIVE) || (!THREAD));
    7677                ASSERT(usec == SYNCH_NO_TIMEOUT);
    7778                ASSERT(!(flags & SYNCH_FLAGS_INTERRUPTIBLE));
     79               
    7880                do {
    7981                        rc = semaphore_trydown(&mtx->sem);
     
    8789/** Release mutex.
    8890 *
    89  * @param mtx           Mutex.
     91 * @param mtx Mutex.
    9092 */
    9193void mutex_unlock(mutex_t *mtx)
  • kernel/generic/src/synch/waitq.c

    r9929742 r2e4e706  
    261261        int rc;
    262262
    263         ASSERT(!PREEMPTION_DISABLED || PARAM_NON_BLOCKING(flags, usec));
     263        ASSERT((!PREEMPTION_DISABLED) || (PARAM_NON_BLOCKING(flags, usec)));
    264264       
    265265        ipl = waitq_sleep_prepare(wq);
  • kernel/generic/src/time/clock.c

    r9929742 r2e4e706  
    195195                spinlock_unlock(&THREAD->lock);
    196196               
    197                 if (!ticks && !PREEMPTION_DISABLED) {
     197                if ((!ticks) && (!PREEMPTION_DISABLED)) {
    198198#ifdef CONFIG_UDEBUG
    199199                        istate_t *istate;
Note: See TracChangeset for help on using the changeset viewer.