Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 630 → Rev 631

/kernel/trunk/arch/mips32/src/debugger.c
256,7 → 256,7
printf("***Type 'exit' to exit kconsole.\n");
/* Umm..we should rather set some 'debugstate' here */
haltstate = 1;
atomic_set(&haltstate,1);
kconsole("debug");
haltstate = 0;
atomic_set(&haltstate,0);
}
/kernel/trunk/arch/ia32/include/atomic.h
31,14 → 31,14
 
#include <arch/types.h>
 
typedef struct { volatile __u32 count; } atomic_t;
typedef struct { volatile __u64 count; } atomic_t;
 
static inline void atomic_set(atomic_t *val, __u32 i)
static inline void atomic_set(atomic_t *val, __u64 i)
{
val->count = i;
}
 
static inline __u32 atomic_get(atomic_t *val)
static inline __u64 atomic_get(atomic_t *val)
{
return val->count;
}
79,7 → 79,7
__asm__ volatile (
"movl $-1, %0\n"
"lock xaddl %0, %1\n"
: "=r" (r), "=m" (*val)
: "=r" (r), "=m" (val->count)
);
return r;