Changeset 683 for trunk/kernel/libk/remote_fifo.c
- Timestamp:
- Jan 13, 2021, 12:36:17 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/remote_fifo.c
r657 r683 42 42 fifo->wr_id = 0; 43 43 fifo->rd_id = 0; 44 for( slot = 0 ; slot < CONFIG_R EMOTE_FIFO_SLOTS ; slot++ )44 for( slot = 0 ; slot < CONFIG_RPC_FIFO_SLOTS ; slot++ ) 45 45 { 46 46 fifo->valid[slot] = 0; … … 69 69 70 70 // wait until allocated slot is empty in remote FIFO 71 // max retry = CONFIG_R EMOTE_FIFO_MAX_ITERATIONS71 // max retry = CONFIG_RPC_FIFO_MAX_ITERATIONS 72 72 // return error if watchdog is reached 73 73 while( 1 ) 74 74 { 75 75 // return error if contention detected by watchdog 76 if( watchdog > CONFIG_R EMOTE_FIFO_MAX_ITERATIONS ) return EBUSY;76 if( watchdog > CONFIG_RPC_FIFO_MAX_ITERATIONS ) return EBUSY; 77 77 78 78 // read remote rd_id value … … 84 84 85 85 // exit waiting loop as soon as fifo not full 86 if ( nslots < CONFIG_R EMOTE_FIFO_SLOTS ) break;86 if ( nslots < CONFIG_RPC_FIFO_SLOTS ) break; 87 87 88 88 // retry later if fifo full: … … 97 97 98 98 // compute actual write slot pointer 99 ptw = wr_id % CONFIG_R EMOTE_FIFO_SLOTS;99 ptw = wr_id % CONFIG_RPC_FIFO_SLOTS; 100 100 101 101 // copy item to fifo … … 123 123 124 124 // compute actual read slot pointer 125 uint32_t ptr = rd_id % CONFIG_R EMOTE_FIFO_SLOTS;125 uint32_t ptr = rd_id % CONFIG_RPC_FIFO_SLOTS; 126 126 127 127 // wait slot filled by the writer … … 158 158 else nslots = (0xFFFFFFFF - rd_id) + wr_id; 159 159 160 return ( nslots >= CONFIG_R EMOTE_FIFO_SLOTS );160 return ( nslots >= CONFIG_RPC_FIFO_SLOTS ); 161 161 } 162 162
Note: See TracChangeset
for help on using the changeset viewer.