Changeset 338810f in mainline


Ignore:
Timestamp:
2012-11-06T22:19:43Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
692bd3f2
Parents:
efdfebc
Message:

Make km_temporary_page_get() more flexible by accepting more flags.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/km.c

    refdfebc r338810f  
    233233 * @param[inout] framep Pointer to a variable which will receive the physical
    234234 *                      address of the allocated frame.
    235  * @param[in] flags     Frame allocation flags. FRAME_NONE or FRAME_NO_RESERVE.
     235 * @param[in] flags     Frame allocation flags. FRAME_NONE, FRAME_NO_RESERVE
     236 *                      and FRAME_ATOMIC bits are allowed.
    236237 * @return              Virtual address of the allocated frame.
    237238 */
     
    243244        ASSERT(THREAD);
    244245        ASSERT(framep);
    245         ASSERT(!(flags & ~FRAME_NO_RESERVE));
     246        ASSERT(!(flags & ~(FRAME_NO_RESERVE | FRAME_ATOMIC)));
    246247
    247248        /*
     
    255256                ASSERT(page);   // FIXME
    256257        } else {
    257                 frame = (uintptr_t) frame_alloc_noreserve(ONE_FRAME,
    258                     FRAME_LOWMEM);
     258                frame = (uintptr_t) frame_alloc(ONE_FRAME,
     259                    FRAME_LOWMEM | flags);
    259260                page = PA2KA(frame);
    260261        }
Note: See TracChangeset for help on using the changeset viewer.