使用共享锁来标记环形缓冲区是否正在被使用
This commit is contained in:
@@ -129,12 +129,7 @@ int main(int argc, char **argv)
|
||||
break ;
|
||||
}
|
||||
}
|
||||
if(tmp_ovw->status == MESA_SHM_RING_QUEUE_USED || tmp_ovw->status == MESA_SHM_RING_QUEUE_HALF_IDLE){
|
||||
MESA_shm_write_ring_queue_to_file(log_file_fd, ring_queue_head[i]);
|
||||
if(tmp_ovw->status == MESA_SHM_RING_QUEUE_HALF_IDLE){
|
||||
tmp_ovw->status = MESA_SHM_RING_QUEUE_IDLE;
|
||||
}
|
||||
}
|
||||
MESA_shm_write_ring_queue_to_file(log_file_fd, ring_queue_head[i]);
|
||||
}
|
||||
usleep(5000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user