From 03bc7397194c171287252fce92d5c43611347a69 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 17 Dec 2016 12:42:19 +0000 Subject: 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 --- lib/sw_sync.c | 9 ++++----- lib/sw_sync.h | 5 +++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'lib') 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); -- cgit v1.2.3