File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -364,6 +364,12 @@ class CommandQueueMT {
364364 void _flush () {
365365 lock ();
366366
367+ if (unlikely (flush_read_ptr)) {
368+ // Re-entrant call.
369+ unlock ();
370+ return ;
371+ }
372+
367373 WorkerThreadPool::thread_enter_command_queue_mt_flush (this );
368374 while (flush_read_ptr < command_mem.size ()) {
369375 uint64_t size = *(uint64_t *)&command_mem[flush_read_ptr];
@@ -376,13 +382,6 @@ class CommandQueueMT {
376382 sync_sem->sem .post (); // Release in case it needs sync/ret.
377383 }
378384
379- if (unlikely (flush_read_ptr == 0 )) {
380- // A reentrant call flushed.
381- DEV_ASSERT (command_mem.is_empty ());
382- unlock ();
383- return ;
384- }
385-
386385 flush_read_ptr += size;
387386 }
388387 WorkerThreadPool::thread_exit_command_queue_mt_flush ();
You can’t perform that action at this time.
0 commit comments