/trunk/kernel/generic/include/mm/as.h |
---|
167,7 → 167,9 |
mutex_t lock; |
/** Containing address space. */ |
as_t *as; |
/** Flags related to the memory represented by the address space area. */ |
/** |
* Flags related to the memory represented by the address space area. |
*/ |
int flags; |
/** Attributes related to the address space area itself. */ |
int attributes; |
179,8 → 181,8 |
btree_t used_space; |
/** |
* If the address space area has been shared, this pointer will reference |
* the share info structure. |
* If the address space area has been shared, this pointer will |
* reference the share info structure. |
*/ |
share_info_t *sh_info; |
/trunk/kernel/generic/src/ddi/ddi.c |
---|
234,8 → 234,8 |
* |
* @return 0 on success, otherwise it returns error code found in errno.h |
*/ |
unative_t sys_physmem_map(unative_t phys_base, unative_t virt_base, unative_t |
pages, unative_t flags) |
unative_t sys_physmem_map(unative_t phys_base, unative_t virt_base, |
unative_t pages, unative_t flags) |
{ |
return (unative_t) ddi_physmem_map(ALIGN_DOWN((uintptr_t) phys_base, |
FRAME_SIZE), ALIGN_DOWN((uintptr_t) virt_base, PAGE_SIZE), |
/trunk/kernel/generic/src/ddi/irq.c |
---|
302,10 → 302,10 |
spinlock_lock(&irq->lock); |
if (devno == -1) { |
/* Invoked by irq_dispatch(). */ |
/* Invoked by irq_dispatch_and_lock(). */ |
rv = ((irq->inr == inr) && (irq->claim() == IRQ_ACCEPT)); |
} else { |
/* Invoked by irq_find(). */ |
/* Invoked by irq_find_and_lock(). */ |
rv = ((irq->inr == inr) && (irq->devno == devno)); |
} |
361,10 → 361,10 |
spinlock_lock(&irq->lock); |
if (devno == -1) { |
/* Invoked by irq_dispatch() */ |
/* Invoked by irq_dispatch_and_lock() */ |
rv = (irq->claim() == IRQ_ACCEPT); |
} else { |
/* Invoked by irq_find() */ |
/* Invoked by irq_find_and_lock() */ |
rv = (irq->devno == devno); |
} |
/trunk/kernel/arch/sparc64/src/drivers/tick.c |
---|
99,8 → 99,8 |
drift -= CPU->arch.clock_frequency / HZ; |
CPU->missed_clock_ticks++; |
} |
CPU->arch.next_tick_cmpr = tick_read() + (CPU->arch.clock_frequency / |
HZ) - drift; |
CPU->arch.next_tick_cmpr = tick_read() + |
(CPU->arch.clock_frequency / HZ) - drift; |
tick_compare_write(CPU->arch.next_tick_cmpr); |
clock(); |
} |
/trunk/kernel/arch/ia64/src/ia64.c |
---|
82,8 → 82,6 |
} |
void arch_post_mm_init(void) |
{ |
irq_init(INR_COUNT, INR_COUNT); |
/trunk/kernel/arch/ia64/src/drivers/it.c |
---|
114,7 → 114,13 |
itm_write(m); |
srlz_d(); /* propagate changes */ |
/* |
* We are holding a lock which prevents preemption. |
* Release the lock, call clock() and reacquire the lock again. |
*/ |
spinlock_unlock(&irq->lock); |
clock(); |
spinlock_lock(&irq->lock); |
} |
/** @} |
/trunk/kernel/arch/mips32/src/interrupt.c |
---|
113,7 → 113,14 |
} |
nextcount = cp0_count_read() + cp0_compare_value - drift; |
cp0_compare_write(nextcount); |
/* |
* We are holding a lock which prevents preemption. |
* Release the lock, call clock() and reacquire the lock again. |
*/ |
spinlock_unlock(&irq->lock); |
clock(); |
spinlock_lock(&irq->lock); |
if (virtual_timer_fnc != NULL) |
virtual_timer_fnc(); |
/trunk/kernel/arch/ia32/src/interrupt.c |
---|
140,8 → 140,7 |
static void simd_fp_exception(int n, istate_t *istate) |
{ |
uint32_t mxcsr; |
asm |
( |
asm ( |
"stmxcsr %0;\n" |
:"=m"(mxcsr) |
); |
/trunk/kernel/arch/ia32/src/drivers/i8254.c |
---|
68,7 → 68,15 |
static void i8254_irq_handler(irq_t *irq, void *arg, ...) |
{ |
/* |
* This IRQ is responsible for kernel preemption. |
* Nevertheless, we are now holding a spinlock which prevents |
* preemption. For this particular IRQ, we don't need the |
* lock. We just release it, call clock() and then reacquire it again. |
*/ |
spinlock_unlock(&irq->lock); |
clock(); |
spinlock_lock(&irq->lock); |
} |
void i8254_init(void) |
136,7 → 144,9 |
o2 = inb(CLK_PORT1); |
o2 |= inb(CLK_PORT1) << 8; |
CPU->delay_loop_const = ((MAGIC_NUMBER*LOOPS)/1000) / ((t1-t2)-(o1-o2)) + (((MAGIC_NUMBER*LOOPS)/1000) % ((t1-t2)-(o1-o2)) ? 1 : 0); |
CPU->delay_loop_const = |
((MAGIC_NUMBER * LOOPS) / 1000) / ((t1 - t2) - (o1 - o2)) + |
(((MAGIC_NUMBER * LOOPS) / 1000) % ((t1 - t2) - (o1 - o2)) ? 1 : 0); |
clk1 = get_cycle(); |
delay(1 << SHIFT); |
/trunk/uspace/ipcc/ipcc.c |
---|
212,8 → 212,6 |
printf("error: %d\n", phid); |
} |
int main(void) |
{ |
ipcarg_t phonead; |
227,7 → 225,6 |
printf("***********IPC Tester***********\n"); |
printf("********************************\n"); |
async_set_client_connection(client_connection); |
for (i=TEST_START;i < TEST_START+10;i++) { |
262,12 → 259,15 |
do_answer_msg(); |
break; |
case 'j': |
printf("Entering infinite loop\n"); |
while (1) |
; |
break; |
case 'p': |
printf("Doing page fault\n"); |
*((char *)0) = 1; |
printf("done\n"); |
break; |
case 'u': |
var1=*( (int *) ( ( (char *)(&var) ) + 1 ) ); |
break; |