Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 614 → Rev 615

/kernel/trunk/generic/include/func.h
32,7 → 32,7
#include <arch/types.h>
#include <typedefs.h>
 
extern __u32 haltstate;
extern volatile __u32 haltstate;
 
extern void halt(void);
 
/kernel/trunk/generic/include/panic.h
35,6 → 35,6
# define panic(format, ...) panic_printf("Kernel panic: " format, ##__VA_ARGS__);
#endif
 
extern void panic_printf(char *fmt, ...);
extern void panic_printf(char *fmt, ...) __attribute__((noreturn)) ;
 
#endif
/kernel/trunk/generic/src/main/kinit.c
84,7 → 84,7
* not mess together with kcpulb threads.
* Just a beautification.
*/
if (t = thread_create(kmp, NULL, TASK, 0)) {
if ((t = thread_create(kmp, NULL, TASK, 0))) {
spinlock_lock(&t->lock);
t->flags |= X_WIRED;
t->cpu = &cpus[0];
112,7 → 112,7
*/
for (i = 0; i < config.cpu_count; i++) {
 
if (t = thread_create(kcpulb, NULL, TASK, 0)) {
if ((t = thread_create(kcpulb, NULL, TASK, 0))) {
spinlock_lock(&t->lock);
t->flags |= X_WIRED;
t->cpu = &cpus[i];
133,7 → 133,7
/*
* Create kernel console.
*/
if (t = thread_create(kconsole, "kconsole", TASK, 0))
if ((t = thread_create(kconsole, "kconsole", TASK, 0)))
thread_ready(t);
else panic("thread_create/kconsole\n");
 
/kernel/trunk/generic/src/synch/waitq.c
76,7 → 76,7
 
grab_locks:
spinlock_lock(&t->lock);
if (wq = t->sleep_queue) { /* assignment */
if ((wq = t->sleep_queue)) { /* assignment */
if (!spinlock_trylock(&wq->lock)) {
spinlock_unlock(&t->lock);
goto grab_locks; /* avoid deadlock */
/kernel/trunk/generic/src/debug/print.c
55,7 → 55,7
int i = 0;
char c;
while (c = str[i++])
while ((c = str[i++]))
putchar(c);
}
 
290,7 → 290,7
irqpri = interrupts_disable();
spinlock_lock(&printflock);
 
while (c = fmt[i++]) {
while ((c = fmt[i++])) {
switch (c) {
 
/* control character */
/kernel/trunk/generic/src/lib/func.c
34,7 → 34,7
#include <typedefs.h>
#include <console/kconsole.h>
 
__u32 haltstate = 0; /**< Halt flag */
__u32 volatile haltstate = 0; /**< Halt flag */
 
 
/** Halt wrapper
/kernel/trunk/generic/src/mm/frame.c
409,7 → 409,7
if (is_left) {
index = (FRAME_INDEX(zone, frame)) + (1 << frame->buddy_order);
} else if (is_right) {
} else { // if (is_right)
index = (FRAME_INDEX(zone, frame)) - (1 << frame->buddy_order);
}
/kernel/trunk/generic/src/mm/heap.c
100,7 → 100,8
y->prev = x;
y->next = NULL;
if (z = x->next) {
z = x->next;
if (z) {
z->prev = y;
y->next = z;
}
/kernel/trunk/generic/src/time/clock.c
92,7 → 92,7
spinlock_unlock(&CPU->lock);
spinlock_lock(&THREAD->lock);
if (ticks = THREAD->ticks)
if ((ticks = THREAD->ticks))
THREAD->ticks--;
spinlock_unlock(&THREAD->lock);
/kernel/trunk/arch/mips32/src/exception.c
111,6 → 111,7
tlb_invalid(pstate);
}
 
#ifdef CONFIG_FPU_LAZY
static void cpuns_exception(int n, void *data)
{
if (cp0_cause_coperr(cp0_cause_read()) == fpu_cop_id)
118,6 → 119,7
else
panic("unhandled Coprocessor Unusable Exception\n");
}
#endif
 
static void interrupt_exception(int n, void *pstate)
{
/kernel/trunk/arch/mips32/src/fmath.c
43,7 → 43,7
 
double fmath_get_decimal_exponent(double num)
{ //TODO:
double value;
// double value;
// log10(2)*log2(x) => log10(x)
/* __asm__ __volatile__ ( \
"fldlg2 #load log10(2) \n\t" \
50,7 → 50,7
"fxch %%st(1) \n\t" \
"fyl2x #count st(0)*log2(st(1))->st(1); pop st(0) \n\t" \
: "=t" (value) : "0"(num) );
*/ return value;
*/ return 1.0;
}
 
/kernel/trunk/arch/mips32/src/debugger.c
231,7 → 231,7
(!cur->executing && pstate->epc==cur->address+sizeof(__native)))
panic("Weird breakpoint state.\n");
if (!cur->executing) {
printf("***Breakpoint %d: %p in %s.\n", i,
printf("***Breakpoint %d: 0x%p in %s.\n", i,
pstate->epc,symbol);
/* Return first instruction back */
((__u32 *)cur->address)[0] = cur->instruction;
248,7 → 248,7
return;
}
} else {
printf("***Breakpoint %p in %s.\n", pstate->epc, symbol);
printf("***Breakpoint 0x%p in %s.\n", pstate->epc, symbol);
/* Move on to next instruction */
pstate->epc += 4;
}
/kernel/trunk/arch/ia32/src/smp/mps.c
322,7 → 322,7
static int io_apic_count = 0;
 
/* this ioapic is marked unusable */
if (ioa->io_apic_flags & 1 == 0)
if ((ioa->io_apic_flags & 1) == 0)
return;
if (io_apic_count++ > 0) {