src/lib/occlib/ipc_core.c
///////////////////////////////////////////////////////////////////////////////
/// Removes messages from the circular buffer for the processor associated with
/// sender_id and processes them one at a time.
/// This function is for internal use only!
///
Removes messages from the circular buffer for the processor associated with
sender_id and processes them one at a time.
This function is for internal use only!
Removes messages from the circular buffer for the processor associated with sender_id and processes them one at a time . This function is for internal use only!
void ipc_process_cbuf(uint32_t sender_id)
{
    ipc_target_t*            my_cbufs = &OSD_PTR->ipc_data.targets[OCCHW_INST_ID_SELF];
    uint8_t*                 read_count = &my_cbufs->counts.reads.counts8[sender_id];
    uint8_t*                 write_count = &my_cbufs->counts.writes.counts8[sender_id];
    ipc_msg_t**               msg_ptrs = &my_cbufs->cbufs[sender_id][0];
    ipc_msg_t*               cur_msg;
    while(*read_count != *write_count)
    {
        cur_msg = msg_ptrs[*read_count % IPC_CBUF_SIZE];
        (*read_count)++;
        ipc_process_msg(cur_msg);
    }
}
void ipc_process_cbuf ( uint32_t sender_id ) { ipc_target_t * my_cbufs = & OSD_PTR -> ipc_data . targets [ OCCHW_INST_ID_SELF ] ; uint8_t * read_count = & my_cbufs -> counts . reads . counts8 [ sender_id ] ; uint8_t * write_count = & my_cbufs -> counts . writes . counts8 [ sender_id ] ; ipc_msg_t * * msg_ptrs = & my_cbufs -> cbufs [ sender_id ] [ 0 ] ; ipc_msg_t * cur_msg ; while ( * read_count != * write_count ) { cur_msg = msg_ptrs [ * read_count % IPC_CBUF_SIZE ] ; ( * read_count ) ++ ; ipc_process_msg ( cur_msg ) ; } }
Removes messages from the circular buffer for the processor associated with
sender_id and processes them one at a time.
Removes messages from the circular buffer for the processor associated with sender_id and processes them one at a time .
// extract the message pointer // increment the read count