Changeset c2efbb4 in mainline for kernel/generic
- Timestamp:
- 2010-02-20T20:54:53Z (16 years ago)
- 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. - Location:
- kernel/generic
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/atomic.h
rf516bc2 rc2efbb4 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 36 36 #define KERN_ATOMIC_H_ 37 37 38 #include <arch/types.h> 39 38 40 typedef struct atomic { 39 volatile longcount;41 volatile atomic_count_t count; 40 42 } atomic_t; 41 43 42 44 #include <arch/atomic.h> 43 45 44 static inline void atomic_set(atomic_t *val, longi)46 static inline void atomic_set(atomic_t *val, atomic_count_t i) 45 47 { 46 48 val->count = i; 47 49 } 48 50 49 static inline longatomic_get(atomic_t *val)51 static inline atomic_count_t atomic_get(atomic_t *val) 50 52 { 51 53 return val->count; -
kernel/generic/include/console/console.h
rf516bc2 rc2efbb4 41 41 extern indev_t *stdin; 42 42 extern outdev_t *stdout; 43 extern bool silent;44 43 45 44 extern indev_t *stdin_wire(void); -
kernel/generic/include/ipc/ipc.h
rf516bc2 rc2efbb4 227 227 #ifdef KERNEL 228 228 229 #define IPC_MAX_PHONES 16229 #define IPC_MAX_PHONES 32 230 230 231 231 #include <synch/spinlock.h> -
kernel/generic/include/panic.h
rf516bc2 rc2efbb4 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 36 36 #define KERN_PANIC_H_ 37 37 38 #include <typedefs.h> 38 39 #include <stacktrace.h> 39 40 #include <print.h> … … 42 43 # define panic(format, ...) \ 43 44 do { \ 45 silent = false; \ 44 46 printf("Kernel panic in %s() at %s:%u.\n", \ 45 47 __func__, __FILE__, __LINE__); \ … … 50 52 #else 51 53 # 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) 53 58 #endif 59 60 extern bool silent; 54 61 55 62 extern void panic_printf(char *fmt, ...) __attribute__((noreturn)); -
kernel/generic/include/smp/ipi.h
rf516bc2 rc2efbb4 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 37 37 38 38 #ifdef CONFIG_SMP 39 extern void ipi_broadcast(int ipi); 40 extern void ipi_broadcast_arch(int ipi); 39 40 extern void ipi_broadcast(int); 41 extern void ipi_broadcast_arch(int); 42 41 43 #else 42 #define ipi_broadcast(x) ; 44 45 #define ipi_broadcast(ipi) 46 43 47 #endif /* CONFIG_SMP */ 44 48 -
kernel/generic/src/console/console.c
rf516bc2 rc2efbb4 45 45 #include <ipc/irq.h> 46 46 #include <arch.h> 47 #include <panic.h> 47 48 #include <print.h> 48 49 #include <putchar.h> -
kernel/generic/src/ddi/ddi.c
rf516bc2 rc2efbb4 146 146 (btree_key_t) pf, &nodep); 147 147 148 if ((!parea) || (parea->frames < pages)) 148 if ((!parea) || (parea->frames < pages)) { 149 spinlock_unlock(&parea_lock); 149 150 goto err; 151 } 150 152 151 153 spinlock_unlock(&parea_lock); … … 153 155 } 154 156 157 spinlock_unlock(&zones.lock); 155 158 err: 156 spinlock_unlock(&zones.lock);157 159 interrupts_restore(ipl); 158 160 return ENOENT; -
kernel/generic/src/proc/scheduler.c
rf516bc2 rc2efbb4 542 542 { 543 543 thread_t *t; 544 int count, average, j, k = 0; 544 int count; 545 atomic_count_t average; 545 546 unsigned int i; 547 int j; 548 int k = 0; 546 549 ipl_t ipl; 547 550 -
kernel/generic/src/smp/ipi.c
rf516bc2 rc2efbb4 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 33 33 /** 34 34 * @file 35 * @brief 35 * @brief Generic IPI interface. 36 36 */ 37 37 38 38 #ifdef CONFIG_SMP 39 39 40 40 #include <smp/ipi.h> 41 41 #include <config.h> 42 43 42 44 43 /** Broadcast IPI message … … 49 48 * 50 49 * @bug The decision whether to actually send the IPI must be based 51 * 52 * 53 * 50 * on a different criterion. The current version has 51 * problems when some of the detected CPUs are marked 52 * disabled in machine configuration. 54 53 */ 55 54 void ipi_broadcast(int ipi) … … 60 59 * - if there is only one CPU but the kernel was compiled with CONFIG_SMP 61 60 */ 62 61 63 62 if ((config.cpu_active > 1) && (config.cpu_active == config.cpu_count)) 64 63 ipi_broadcast_arch(ipi);
Note:
See TracChangeset
for help on using the changeset viewer.