buffer: check if buffer fd already readable (#10894)
check if buffer fd is already readable, to avoid a lot of unnecessery systemcalls and churn.
This commit is contained in:
parent
f464dfbefa
commit
9adacef70b
1 changed files with 3 additions and 0 deletions
|
|
@ -118,6 +118,9 @@ CFileDescriptor CDMABuffer::exportSyncFile() {
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (CFileDescriptor::isReadable(fd))
|
||||||
|
continue;
|
||||||
|
|
||||||
dma_buf_export_sync_file request{
|
dma_buf_export_sync_file request{
|
||||||
.flags = DMA_BUF_SYNC_READ,
|
.flags = DMA_BUF_SYNC_READ,
|
||||||
.fd = -1,
|
.fd = -1,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue