Lines Matching refs:ret
60 int ret; in wait_event() local
64 ret = read(commfd[pipe], &in, 1); in wait_event()
65 if (ret == -1) in wait_event()
76 int ret; in send_event() local
80 ret = write(commfd[pipe], &event, 1); in send_event()
81 if (ret == -1) in send_event()
89 int ret; in client_auth() local
92 ret = ioctl(drmfd, DRM_IOCTL_GET_MAGIC, &auth); in client_auth()
93 if (ret == -1) in client_auth()
96 ret = write(commfd[0], &auth.magic, sizeof(auth.magic)); in client_auth()
97 if (ret == -1) in client_auth()
105 int ret; in server_auth() local
109 ret = read(commfd[1], &auth.magic, sizeof(auth.magic)); in server_auth()
110 if (ret == -1) in server_auth()
113 ret = ioctl(drmfd, DRM_IOCTL_AUTH_MAGIC, &auth); in server_auth()
114 if (ret == -1) in server_auth()
122 int ret; in test_lock_unlock() local
124 ret = drmGetLock(drmfd, lock1, 0); in test_lock_unlock()
125 if (ret != 0) in test_lock_unlock()
127 ret = drmUnlock(drmfd, lock1); in test_lock_unlock()
128 if (ret != 0) in test_lock_unlock()
136 int ret; in test_unlock_unlocked() local
138 ret = drmUnlock(drmfd, lock1); in test_unlock_unlocked()
139 if (ret == 0) in test_unlock_unlocked()
147 int ret; in test_unlock_unowned() local
149 ret = drmGetLock(drmfd, lock1, 0); in test_unlock_unowned()
150 assert(ret == 0); in test_unlock_unowned()
151 ret = drmUnlock(drmfd, lock2); in test_unlock_unowned()
152 if (ret == 0) in test_unlock_unowned()
154 ret = drmUnlock(drmfd, lock1); in test_unlock_unowned()
155 assert(ret == 0); in test_unlock_unowned()
164 int ret, tempfd; in test_open_close_locked() local
166 ret = drmGetLock(drmfd, lock1, 0); in test_open_close_locked()
167 assert(ret == 0); in test_open_close_locked()
171 ret = drmUnlock(drmfd, lock1); in test_open_close_locked()
172 if (ret != 0) in test_open_close_locked()
178 int drmfd, ret; in client() local
193 ret = drmGetLock(drmfd, lock2, 0); in client()
195 if (ret != 0) in client()
201 ret = write(commfd[0], &time, sizeof(time)); in client()
209 int drmfd, tempfd, ret; in server() local
225 ret = drmGetLock(drmfd, lock1, 0); in server()
226 assert(ret == 0); in server()
230 ret = drmUnlock(drmfd, lock1); in server()
231 assert(ret == 0); in server()
235 ret = read(commfd[1], &client_time, sizeof(client_time)); in server()
236 if (ret == -1) in server()
247 int ret; in main() local
250 ret = pipe(commfd); in main()
251 if (ret == -1) in main()
254 ret = fork(); in main()
255 if (ret == -1) in main()
257 if (ret == 0) in main()