summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-12-17 12:42:19 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-12-17 15:03:41 +0000
commit03bc7397194c171287252fce92d5c43611347a69 (patch)
tree7afb4f8b95a0ed62270998f24244c4722cf56021 /lib
parent70f0700e60d66f8b25e33c8f5efe57cb3d4eb534 (diff)
lib/sw_sync: Rename sync_fence_create()
It takes a sw_sync_timeline and returns a fence (it is a factory), so call it sw_sync_timeline_create_fence() for better self-documentation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib')
-rw-r--r--lib/sw_sync.c9
-rw-r--r--lib/sw_sync.h5
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/sw_sync.c b/lib/sw_sync.c
index 4977ef17..017a1394 100644
--- a/lib/sw_sync.c
+++ b/lib/sw_sync.c
@@ -127,10 +127,9 @@ int sw_sync_timeline_create(void)
return fd;
}
-int __sw_sync_fence_create(int fd, uint32_t seqno)
+int __sw_sync_timeline_create_fence(int fd, uint32_t seqno)
{
- struct int_sync_create_fence_data data = {};
- data.value = seqno;
+ struct int_sync_create_fence_data data = { .value = seqno};
if (igt_ioctl(fd, INT_SYNC_IOC_CREATE_FENCE, &data))
return -errno;
@@ -138,9 +137,9 @@ int __sw_sync_fence_create(int fd, uint32_t seqno)
return data.fence;
}
-int sw_sync_fence_create(int fd, uint32_t seqno)
+int sw_sync_timeline_create_fence(int fd, uint32_t seqno)
{
- int fence = __sw_sync_fence_create(fd, seqno);
+ int fence = __sw_sync_timeline_create_fence(fd, seqno);
igt_assert_f(sw_sync_fd_is_valid(fence), "Created invalid fence\n");
diff --git a/lib/sw_sync.h b/lib/sw_sync.h
index d7629241..1724d6b6 100644
--- a/lib/sw_sync.h
+++ b/lib/sw_sync.h
@@ -34,10 +34,11 @@
void igt_require_sw_sync(void);
int sw_sync_timeline_create(void);
-int __sw_sync_fence_create(int fd, uint32_t seqno);
-int sw_sync_fence_create(int fd, uint32_t seqno);
void sw_sync_timeline_inc(int fd, uint32_t count);
+int __sw_sync_timeline_create_fence(int fd, uint32_t seqno);
+int sw_sync_timeline_create_fence(int fd, uint32_t seqno);
+
int sync_fence_merge(int fd1, int fd2);
int sync_fence_wait(int fence, int timeout);
int sync_fence_count(int fd);