Page 1 of 1

strange thing in fifo code

Posted: Sun Oct 17, 2010 10:35 am
by z.g
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?

Re: strange thing in fifo code

Posted: Wed Nov 10, 2010 12:16 am
by WinterMute
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.