parent
b6e24501a1
commit
2048a9e727
22
xf86drm.c
22
xf86drm.c
|
@ -4225,3 +4225,25 @@ int drmSyncobjExportSyncFile(int fd, uint32_t handle, int *sync_file_fd)
|
|||
*sync_file_fd = args.fd;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int drmSyncobjWait(int fd, uint32_t *handles, unsigned num_handles,
|
||||
int64_t timeout_nsec, unsigned flags,
|
||||
uint32_t *first_signaled)
|
||||
{
|
||||
struct drm_syncobj_wait args;
|
||||
int ret;
|
||||
|
||||
memclear(args);
|
||||
args.handles = (intptr_t)handles;
|
||||
args.timeout_nsec = timeout_nsec;
|
||||
args.count_handles = num_handles;
|
||||
args.flags = flags;
|
||||
|
||||
ret = drmIoctl(fd, DRM_IOCTL_SYNCOBJ_WAIT, &args);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (first_signaled)
|
||||
*first_signaled = args.first_signaled;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -860,6 +860,9 @@ extern int drmSyncobjFDToHandle(int fd, int obj_fd, uint32_t *handle);
|
|||
|
||||
extern int drmSyncobjImportSyncFile(int fd, uint32_t handle, int sync_file_fd);
|
||||
extern int drmSyncobjExportSyncFile(int fd, uint32_t handle, int *sync_file_fd);
|
||||
extern int drmSyncobjWait(int fd, uint32_t *handles, unsigned num_handles,
|
||||
int64_t timeout_nsec, unsigned flags,
|
||||
uint32_t *first_signaled);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue