Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1076 → Rev 1077

/kernel/trunk/arch/amd64/src/proc/scheduler.c
34,6 → 34,7
#include <arch/asm.h>
#include <arch/debugger.h>
 
#include <print.h>
void before_thread_runs_arch(void)
{
CPU->arch.tss->rsp0 = (__address) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA];
44,14 → 45,12
(__u64)&THREAD->kstack);
swapgs();
 
 
#ifdef CONFIG_DEBUG_AS_WATCHPOINT
/* Set watchpoint on AS to ensure that nobody sets it to zero */
static int old_slot = -1;
if (old_slot >=0)
breakpoint_del(old_slot);
old_slot = breakpoint_add(&((the_t *) THREAD->kstack)->as,
BKPOINT_WRITE | BKPOINT_CHECK_ZERO);
if (CPU->id < BKPOINTS_MAX)
breakpoint_add(&((the_t *) THREAD->kstack)->as,
BKPOINT_WRITE | BKPOINT_CHECK_ZERO,
CPU->id);
#endif
}