Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1766 → Rev 1765

/kernel/trunk/generic/src/mm/frame.c
931,7 → 931,7
* @return Physical address of the allocated frame.
*
*/
void * frame_alloc_generic(__u8 order, int flags, int *pzone)
void * frame_alloc_generic(__u8 order, int flags, int *status, int *pzone)
{
ipl_t ipl;
int freed;
967,8 → 967,12
*/
interrupts_restore(ipl);
 
if (flags & FRAME_ATOMIC)
if (flags & FRAME_ATOMIC) {
ASSERT(status != NULL);
if (status)
*status = FRAME_NO_MEMORY;
return 0;
}
panic("Sleep not implemented.\n");
goto loop;
980,6 → 984,9
spinlock_unlock(&zone->lock);
interrupts_restore(ipl);
 
if (status)
*status = FRAME_OK;
 
if (flags & FRAME_KA)
return (void *)PA2KA(PFN2ADDR(v));
return (void *)PFN2ADDR(v);