Changeset c2efbb4 in mainline for kernel/generic


Ignore:
Timestamp:
2010-02-20T20:54:53Z (16 years ago)
Author:
Pavel Rimsky <pavel@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
721d4e85, 95c4776
Parents:
f516bc2 (diff), b03a666 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Synchronize with head.

Location:
kernel/generic
Files:
9 edited

Legend:

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

    rf516bc2 rc2efbb4  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3636#define KERN_ATOMIC_H_
    3737
     38#include <arch/types.h>
     39
    3840typedef struct atomic {
    39         volatile long count;
     41        volatile atomic_count_t count;
    4042} atomic_t;
    4143
    4244#include <arch/atomic.h>
    4345
    44 static inline void atomic_set(atomic_t *val, long i)
     46static inline void atomic_set(atomic_t *val, atomic_count_t i)
    4547{
    4648        val->count = i;
    4749}
    4850
    49 static inline long atomic_get(atomic_t *val)
     51static inline atomic_count_t atomic_get(atomic_t *val)
    5052{
    5153        return val->count;
  • kernel/generic/include/console/console.h

    rf516bc2 rc2efbb4  
    4141extern indev_t *stdin;
    4242extern outdev_t *stdout;
    43 extern bool silent;
    4443
    4544extern indev_t *stdin_wire(void);
  • kernel/generic/include/ipc/ipc.h

    rf516bc2 rc2efbb4  
    227227#ifdef KERNEL
    228228
    229 #define IPC_MAX_PHONES  16
     229#define IPC_MAX_PHONES  32
    230230
    231231#include <synch/spinlock.h>
  • kernel/generic/include/panic.h

    rf516bc2 rc2efbb4  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3636#define KERN_PANIC_H_
    3737
     38#include <typedefs.h>
    3839#include <stacktrace.h>
    3940#include <print.h>
     
    4243#       define panic(format, ...) \
    4344                do { \
     45                        silent = false; \
    4446                        printf("Kernel panic in %s() at %s:%u.\n", \
    4547                            __func__, __FILE__, __LINE__); \
     
    5052#else
    5153#       define panic(format, ...) \
    52                 panic_printf("Kernel panic: " format "\n", ##__VA_ARGS__);
     54                do { \
     55                        silent = false; \
     56                        panic_printf("Kernel panic: " format "\n", ##__VA_ARGS__); \
     57                } while (0)
    5358#endif
     59
     60extern bool silent;
    5461
    5562extern void panic_printf(char *fmt, ...) __attribute__((noreturn));
  • kernel/generic/include/smp/ipi.h

    rf516bc2 rc2efbb4  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3737
    3838#ifdef CONFIG_SMP
    39 extern void ipi_broadcast(int ipi);
    40 extern void ipi_broadcast_arch(int ipi);
     39
     40extern void ipi_broadcast(int);
     41extern void ipi_broadcast_arch(int);
     42
    4143#else
    42 #define ipi_broadcast(x)        ;
     44
     45        #define ipi_broadcast(ipi)
     46
    4347#endif /* CONFIG_SMP */
    4448
  • kernel/generic/src/console/console.c

    rf516bc2 rc2efbb4  
    4545#include <ipc/irq.h>
    4646#include <arch.h>
     47#include <panic.h>
    4748#include <print.h>
    4849#include <putchar.h>
  • kernel/generic/src/ddi/ddi.c

    rf516bc2 rc2efbb4  
    146146                    (btree_key_t) pf, &nodep);
    147147               
    148                 if ((!parea) || (parea->frames < pages))
     148                if ((!parea) || (parea->frames < pages)) {
     149                        spinlock_unlock(&parea_lock);
    149150                        goto err;
     151                }
    150152               
    151153                spinlock_unlock(&parea_lock);
     
    153155        }
    154156       
     157        spinlock_unlock(&zones.lock);
    155158err:
    156         spinlock_unlock(&zones.lock);
    157159        interrupts_restore(ipl);
    158160        return ENOENT;
  • kernel/generic/src/proc/scheduler.c

    rf516bc2 rc2efbb4  
    542542{
    543543        thread_t *t;
    544         int count, average, j, k = 0;
     544        int count;
     545        atomic_count_t average;
    545546        unsigned int i;
     547        int j;
     548        int k = 0;
    546549        ipl_t ipl;
    547550
  • kernel/generic/src/smp/ipi.c

    rf516bc2 rc2efbb4  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3333/**
    3434 * @file
    35  * @brief       Generic IPI interface.
     35 * @brief Generic IPI interface.
    3636 */
    37  
     37
    3838#ifdef CONFIG_SMP
    3939
    4040#include <smp/ipi.h>
    4141#include <config.h>
    42 
    4342
    4443/** Broadcast IPI message
     
    4948 *
    5049 * @bug The decision whether to actually send the IPI must be based
    51  *      on a different criterion. The current version has
    52  *      problems when some of the detected CPUs are marked
    53  *      disabled in machine configuration.
     50 *      on a different criterion. The current version has
     51 *      problems when some of the detected CPUs are marked
     52 *      disabled in machine configuration.
    5453 */
    5554void ipi_broadcast(int ipi)
     
    6059         * - if there is only one CPU but the kernel was compiled with CONFIG_SMP
    6160         */
    62 
     61       
    6362        if ((config.cpu_active > 1) && (config.cpu_active == config.cpu_count))
    6463                ipi_broadcast_arch(ipi);
Note: See TracChangeset for help on using the changeset viewer.