Thread (30 messages) 30 messages, 7 authors, 2021-10-25

Re: [dpdk-dev] [RFC v2] eal: simplify the implementation of rte_ctrl_thread_create

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2021-08-25 21:58:00

On Wed, 25 Aug 2021 15:23:08 +0000
Honnappa Nagarahalli [off-list ref] wrote:
<snip>
quoted
On 2021-08-02 07:16, Honnappa Nagarahalli wrote:  
quoted
The current described behaviour of rte_ctrl_thread_create is rigid
which makes the implementation of the function complex.
The behavior is abstracted to allow for simplified implementation.
 
Have you considered using a POSIX condition variable instead of atomics for
synchronization?  
No, I have not considered. The current implementation is complex because of the error handling of pthread_barrier_xxx APIs. I am thinking similar complexity will come in with the condition variable functions.

I am using atomic variable in this patch to synchronize which does not need much error handling which simplifies the implementation.

<snip>
The problem with condition variables is that it then adds a mutex
as well.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help