1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/lib/pthreadpool
Stefan Metzmacher aa9b64eccf pthreadpool: maintain a list of job_states on each pthreadpool_tevent_glue
We should avoid traversing a linked list within a thread without holding
a mutex!

Using a mutex would be very tricky as we'll likely deadlock with
the mutexes at the raw pthreadpool layer.

So we use somekind of spinlock using atomic_thread_fence in order to
protect the access to job->state->glue->{tctx,ev} in
pthreadpool_tevent_job_signal().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-07-24 17:38:27 +02:00
..
Makefile Move pthreadpool to top of the tree. 2017-02-09 20:04:12 +01:00
pthreadpool_pipe.c Move pthreadpool to top of the tree. 2017-02-09 20:04:12 +01:00
pthreadpool_pipe.h Move pthreadpool to top of the tree. 2017-02-09 20:04:12 +01:00
pthreadpool_sync.c pthreadpool: split out a pthreadpool_stop() from pthreadpool_destroy() 2018-07-12 14:25:19 +02:00
pthreadpool_tevent.c pthreadpool: maintain a list of job_states on each pthreadpool_tevent_glue 2018-07-24 17:38:27 +02:00
pthreadpool_tevent.h pthreadpool: add some lockless coordination between the main and job threads 2018-07-24 17:38:26 +02:00
pthreadpool.c pthreadpool: make sure a pthreadpool is marked as stopped in child processes 2018-07-24 17:38:26 +02:00
pthreadpool.h pthreadpool: split out a pthreadpool_stop() from pthreadpool_destroy() 2018-07-12 14:25:19 +02:00
tests_cmocka.c pthreadpool: replace assert_return_code(ret, 0); with assert_int_equal(ret, 0); 2018-07-24 17:38:26 +02:00
tests.c pthreadpool: explicitly use max_thread=unlimited for pthreadpool_tevent_init() tests 2018-07-12 14:25:18 +02:00
wscript_build pthreadpool: Add test for pthread_create failure 2017-12-08 13:54:20 +01:00