[SCM] Samba Shared Repository - branch master updated
Ralph Böhme
slow at samba.org
Fri Nov 17 11:44:03 UTC 2017
The branch, master has been updated
via 993fa57 lib: tevent: Minor cleanup. wakeup_fd can always be gotten from the event context.
from 3b16bfe pthreadpool: create a tevent_threaded_context per registered event context
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 993fa5793fd6a95173eda574562661ab8959c544
Author: Jeremy Allison <jra at samba.org>
Date: Fri Nov 10 19:26:55 2017 -0800
lib: tevent: Minor cleanup. wakeup_fd can always be gotten from the event context.
We don't need to store it. I prefer this as it shows that we must always
get wakeup_fd from the event context at time of use, rather than possibly
storing an out-of-date variable.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Fri Nov 17 12:43:01 CET 2017 on sn-devel-144
-----------------------------------------------------------------------
Summary of changes:
lib/tevent/tevent_internal.h | 1 -
lib/tevent/tevent_threads.c | 4 +---
2 files changed, 1 insertion(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/tevent/tevent_internal.h b/lib/tevent/tevent_internal.h
index 47ea39b..ec3955e 100644
--- a/lib/tevent/tevent_internal.h
+++ b/lib/tevent/tevent_internal.h
@@ -235,7 +235,6 @@ struct tevent_threaded_context {
pthread_mutex_t event_ctx_mutex;
#endif
struct tevent_context *event_ctx;
- int wakeup_fd;
};
struct tevent_debug_ops {
diff --git a/lib/tevent/tevent_threads.c b/lib/tevent/tevent_threads.c
index 2e83f1b..2c6e66b 100644
--- a/lib/tevent/tevent_threads.c
+++ b/lib/tevent/tevent_threads.c
@@ -424,7 +424,6 @@ struct tevent_threaded_context *tevent_threaded_context_create(
return NULL;
}
tctx->event_ctx = ev;
- tctx->wakeup_fd = ev->wakeup_fd;
ret = pthread_mutex_init(&tctx->event_ctx_mutex, NULL);
if (ret != 0) {
@@ -489,14 +488,13 @@ void _tevent_threaded_schedule_immediate(struct tevent_threaded_context *tctx,
}
DLIST_ADD_END(ev->scheduled_immediates, im);
+ wakeup_fd = ev->wakeup_fd;
ret = pthread_mutex_unlock(&ev->scheduled_mutex);
if (ret != 0) {
abort();
}
- wakeup_fd = tctx->wakeup_fd;
-
ret = pthread_mutex_unlock(&tctx->event_ctx_mutex);
if (ret != 0) {
abort();
--
Samba Shared Repository
More information about the samba-cvs
mailing list