diff --git a/MPSoC/src/syncchannel.c b/MPSoC/src/syncchannel.c index cb506f9d2d2f8bd7c61ca023bc6c2d9eee0d10c4..cd78352a0ac5db2cff4d91d5089879b04a3f0c1c 100755 --- a/MPSoC/src/syncchannel.c +++ b/MPSoC/src/syncchannel.c @@ -29,7 +29,7 @@ void sync_read( struct mwmr_s *fifo, void *_ptr, int lensw ){ debugInt("debug fifo lock \n", fifo->status->lock); i=mwmr_try_read(fifo,_ptr,lensw); if(i>0) - mwmr_read(fifo,_ptr,lensw); + mwmr_read(fifo,_ptr,(lensw-i)); return; }