Lines Matching refs:obj

50 int reservation_object_reserve_shared(struct reservation_object *obj)  in reservation_object_reserve_shared()  argument
55 old = reservation_object_get_list(obj); in reservation_object_reserve_shared()
60 kfree(obj->staged); in reservation_object_reserve_shared()
61 obj->staged = NULL; in reservation_object_reserve_shared()
72 fobj = krealloc(obj->staged, offsetof(typeof(*fobj), shared[max]), in reservation_object_reserve_shared()
77 obj->staged = fobj; in reservation_object_reserve_shared()
84 reservation_object_add_shared_inplace(struct reservation_object *obj, in reservation_object_add_shared_inplace() argument
93 write_seqcount_begin(&obj->seq); in reservation_object_add_shared_inplace()
99 reservation_object_held(obj)); in reservation_object_add_shared_inplace()
104 write_seqcount_end(&obj->seq); in reservation_object_add_shared_inplace()
119 write_seqcount_end(&obj->seq); in reservation_object_add_shared_inplace()
124 reservation_object_add_shared_replace(struct reservation_object *obj, in reservation_object_add_shared_replace() argument
152 reservation_object_held(obj)); in reservation_object_add_shared_replace()
167 write_seqcount_begin(&obj->seq); in reservation_object_add_shared_replace()
172 RCU_INIT_POINTER(obj->fence, fobj); in reservation_object_add_shared_replace()
173 write_seqcount_end(&obj->seq); in reservation_object_add_shared_replace()
187 void reservation_object_add_shared_fence(struct reservation_object *obj, in reservation_object_add_shared_fence() argument
190 struct reservation_object_list *old, *fobj = obj->staged; in reservation_object_add_shared_fence()
192 old = reservation_object_get_list(obj); in reservation_object_add_shared_fence()
193 obj->staged = NULL; in reservation_object_add_shared_fence()
197 reservation_object_add_shared_inplace(obj, old, fence); in reservation_object_add_shared_fence()
199 reservation_object_add_shared_replace(obj, old, fobj, fence); in reservation_object_add_shared_fence()
203 void reservation_object_add_excl_fence(struct reservation_object *obj, in reservation_object_add_excl_fence() argument
206 struct fence *old_fence = reservation_object_get_excl(obj); in reservation_object_add_excl_fence()
210 old = reservation_object_get_list(obj); in reservation_object_add_excl_fence()
218 write_seqcount_begin(&obj->seq); in reservation_object_add_excl_fence()
220 RCU_INIT_POINTER(obj->fence_excl, fence); in reservation_object_add_excl_fence()
223 write_seqcount_end(&obj->seq); in reservation_object_add_excl_fence()
229 reservation_object_held(obj))); in reservation_object_add_excl_fence()
236 int reservation_object_get_fences_rcu(struct reservation_object *obj, in reservation_object_get_fences_rcu() argument
250 seq = read_seqcount_begin(&obj->seq); in reservation_object_get_fences_rcu()
254 fobj = rcu_dereference(obj->fence); in reservation_object_get_fences_rcu()
278 fence_excl = rcu_dereference(obj->fence_excl); in reservation_object_get_fences_rcu()
280 retry = read_seqcount_retry(&obj->seq, seq); in reservation_object_get_fences_rcu()
322 long reservation_object_wait_timeout_rcu(struct reservation_object *obj, in reservation_object_wait_timeout_rcu() argument
331 return reservation_object_test_signaled_rcu(obj, wait_all); in reservation_object_wait_timeout_rcu()
336 seq = read_seqcount_begin(&obj->seq); in reservation_object_wait_timeout_rcu()
341 rcu_dereference(obj->fence); in reservation_object_wait_timeout_rcu()
346 if (read_seqcount_retry(&obj->seq, seq)) in reservation_object_wait_timeout_rcu()
369 struct fence *fence_excl = rcu_dereference(obj->fence_excl); in reservation_object_wait_timeout_rcu()
371 if (read_seqcount_retry(&obj->seq, seq)) in reservation_object_wait_timeout_rcu()
419 bool reservation_object_test_signaled_rcu(struct reservation_object *obj, in reservation_object_test_signaled_rcu() argument
427 seq = read_seqcount_begin(&obj->seq); in reservation_object_test_signaled_rcu()
434 rcu_dereference(obj->fence); in reservation_object_test_signaled_rcu()
439 if (read_seqcount_retry(&obj->seq, seq)) in reservation_object_test_signaled_rcu()
461 struct fence *fence_excl = rcu_dereference(obj->fence_excl); in reservation_object_test_signaled_rcu()
463 if (read_seqcount_retry(&obj->seq, seq)) in reservation_object_test_signaled_rcu()