Changeset f619ec11 in mainline for kernel/generic/src/ddi/ddi.c


Ignore:
Timestamp:
2007-02-03T21:26:54Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cf5ddf6
Parents:
80bcaed
Message:

When clock() is called by an external interrupt dispatched by the IRQ dispatcher,
no spinlock can be held or the kernel will not be preemptive. This fixes Ticket #24.

Formating and indentation fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ddi/ddi.c

    r80bcaed rf619ec11  
    131131        parea = btree_search(&parea_btree, (btree_key_t) pf, &nodep);
    132132        if (!parea || parea->frames < pages || ((flags & AS_AREA_CACHEABLE) &&
    133                 !parea->cacheable) || (!(flags & AS_AREA_CACHEABLE) &&
    134                 parea->cacheable)) {
     133            !parea->cacheable) || (!(flags & AS_AREA_CACHEABLE) &&
     134            parea->cacheable)) {
    135135                /*
    136136                 * This physical memory area cannot be mapped.
     
    235235 * @return 0 on success, otherwise it returns error code found in errno.h
    236236 */
    237 unative_t sys_physmem_map(unative_t phys_base, unative_t virt_base, unative_t
    238         pages, unative_t flags)
     237unative_t sys_physmem_map(unative_t phys_base, unative_t virt_base,
     238    unative_t pages, unative_t flags)
    239239{
    240240        return (unative_t) ddi_physmem_map(ALIGN_DOWN((uintptr_t) phys_base,
    241                 FRAME_SIZE), ALIGN_DOWN((uintptr_t) virt_base, PAGE_SIZE),
    242                 (count_t) pages, (int) flags);
     241            FRAME_SIZE), ALIGN_DOWN((uintptr_t) virt_base, PAGE_SIZE),
     242            (count_t) pages, (int) flags);
    243243}
    244244
     
    259259               
    260260        return (unative_t) ddi_iospace_enable((task_id_t) arg.task_id,
    261                 (uintptr_t) arg.ioaddr, (size_t) arg.size);
     261            (uintptr_t) arg.ioaddr, (size_t) arg.size);
    262262}
    263263
     
    272272unative_t sys_preempt_control(int enable)
    273273{
    274         if (! cap_get(TASK) & CAP_PREEMPT_CONTROL)
     274        if (!cap_get(TASK) & CAP_PREEMPT_CONTROL)
    275275                return EPERM;
    276276        if (enable)
Note: See TracChangeset for help on using the changeset viewer.