X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=Documentation%2Fsync_file.txt;h=b63a68531afdedcab0944f9cd9b40742c9deac98;hb=6edc51a8d43b0bb8263fefaa8eb0cf62e8499978;hp=e8e2ebafe5fa0ea350af12b5103788e3d04de268;hpb=d8ea757b25ec82687c497fc90aa83f9bcea24b5b;p=cascardo%2Flinux.git diff --git a/Documentation/sync_file.txt b/Documentation/sync_file.txt index e8e2ebafe5fa..b63a68531afd 100644 --- a/Documentation/sync_file.txt +++ b/Documentation/sync_file.txt @@ -64,6 +64,20 @@ The sync_file fd now can be sent to userspace. If the creation process fail, or the sync_file needs to be released by any other reason fput(sync_file->file) should be used. +Receiving Sync Files from Userspace +----------------------------------- + +When userspace needs to send an in-fence to the driver it passes file descriptor +of the Sync File to the kernel. The kernel can then retrieve the fences +from it. + +Interface: + struct fence *sync_file_get_fence(int fd); + + +The returned reference is owned by the caller and must be disposed of +afterwards using fence_put(). In case of error, a NULL is returned instead. + References: [1] struct sync_file in include/linux/sync_file.h [2] All interfaces mentioned above defined in include/linux/sync_file.h