Thread (61 messages) 61 messages, 4 authors, 2021-03-09

Re: [igt-dev] [PATCH i-g-t v21 09/35] lib/intel_allocator: Try to stop smoothly instead of deinit

From: Zbigniew Kempczyński <hidden>
Date: 2021-03-08 07:25:43

On Fri, Mar 05, 2021 at 02:16:41PM +0000, Chris Wilson wrote:
quoted
+               /* Thread has stuck somewhere */
+               if (READ_ONCE(allocator_thread_running)) {
+                       /* Deinit, this should stop all blocked syscalls, if any */
+                       channel->deinit(channel);
+                       pthread_join(allocator_thread, NULL);
+               } else {
+                       pthread_join(allocator_thread, NULL);
+                       channel->deinit(channel);
If the allocator thread was known to not be running, wouldn't it be safe
to call channel->deinit() anyway?
-Chris
You're right, we can safely call deinit(). Order is important only 
for first case.

--
Zbigniew
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help