strange thing in fifo code

Post Reply
z.g
Posts: 22
Joined: Thu Dec 18, 2008 8:33 pm

strange thing in fifo code

Post by z.g » Sun Oct 17, 2010 10:35 am

in fifosystem.c:

Code: Select all

      } else if (FIFO_IS_ADDRESS(data)) {

        volatile void * address = FIFO_UNPACK_ADDRESS(data);

        REG_IME=0;
        fifo_receive_queue.head = FIFO_BUFFER_GETNEXT(block);
        if (fifo_address_func[channel]) {
          fifo_freeBlock(block);
          REG_IME=1;
          fifo_address_func[channel]( (void*)address, fifo_address_data[channel] );
        } else {
          FIFO_BUFFER_DATA(block)=(u32)address;
          fifo_queueBlock(&fifo_address_queue[channel],block,block);
        }

      } else if(FIFO_IS_VALUE32(data)) {
so then channel has handler — interrupts enabled, then there is no handler still disabled till we got message for channel with handler or till queue end.
is it planned behavior?

WinterMute
Site Admin
Posts: 1911
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: strange thing in fifo code

Post by WinterMute » Wed Nov 10, 2010 12:16 am

I just still need to do some tests on running that loop with interrupts enabled - there were some odd problems after I refactored the code that I haven't got back to investigating yet. It's on the TODO list but unfortunately some other things have priority atm.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests