Changeset e45f81a in mainline for generic/src


Ignore:
Timestamp:
2006-06-26T10:07:05Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7ee0e2f
Parents:
430f12c
Message:

Changed frame_alloc call, cleaned a lot of stuff, fixed some not-perfectly-correct error handling.

Location:
generic/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • generic/src/mm/frame.c

    r430f12c re45f81a  
    932932 *
    933933 */
    934 void * frame_alloc_generic(__u8 order, int flags, int *status, int *pzone)
     934void * frame_alloc_generic(__u8 order, int flags, int *pzone)
    935935{
    936936        ipl_t ipl;
     
    968968                interrupts_restore(ipl);
    969969
    970                 if (flags & FRAME_ATOMIC) {
    971                         ASSERT(status != NULL);
    972                         if (status)
    973                                 *status = FRAME_NO_MEMORY;
     970                if (flags & FRAME_ATOMIC)
    974971                        return 0;
    975                 }
    976972               
    977973                panic("Sleep not implemented.\n");
     
    984980        spinlock_unlock(&zone->lock);
    985981        interrupts_restore(ipl);
    986 
    987         if (status)
    988                 *status = FRAME_OK;
    989982
    990983        if (flags & FRAME_KA)
  • generic/src/mm/slab.c

    r430f12c re45f81a  
    162162        size_t fsize;
    163163        int i;
    164         int status;
    165164        int zone=0;
    166165       
    167         data = frame_alloc_rc_zone(cache->order, FRAME_KA | flags, &status, &zone);
    168         if (status != FRAME_OK) {
     166        data = frame_alloc_generic(cache->order, FRAME_KA | flags, &zone);
     167        if (!data) {
    169168                return NULL;
    170169        }
  • generic/src/proc/thread.c

    r430f12c re45f81a  
    125125{
    126126        thread_t *t = (thread_t *)obj;
    127         int status;
    128127
    129128        spinlock_initialize(&t->lock, "thread_t_lock");
     
    142141#endif 
    143142
    144         t->kstack = frame_alloc_rc(STACK_FRAMES, FRAME_KA | kmflags,&status);
    145         if (status) {
     143        t->kstack = frame_alloc(STACK_FRAMES, FRAME_KA | kmflags);
     144        if (! t->kstack) {
    146145#ifdef ARCH_HAS_FPU
    147146                if (t->saved_fpu_context)
Note: See TracChangeset for help on using the changeset viewer.