diff options
| -rw-r--r-- | meta-networking/recipes-connectivity/samba/samba-4.4.5/internal_tevent_to_0.9.31.patch | 92 | ||||
| -rw-r--r-- | meta-networking/recipes-connectivity/samba/samba_4.4.5.bb | 1 |
2 files changed, 93 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/samba/samba-4.4.5/internal_tevent_to_0.9.31.patch b/meta-networking/recipes-connectivity/samba/samba-4.4.5/internal_tevent_to_0.9.31.patch new file mode 100644 index 0000000000..bd4cd64079 --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba-4.4.5/internal_tevent_to_0.9.31.patch | |||
| @@ -0,0 +1,92 @@ | |||
| 1 | --- samba-4.4.5.orig/lib/tevent/tevent_internal.h 2016-01-26 12:45:46.000000000 +0100 | ||
| 2 | +++ samba-4.4.5/lib/tevent/tevent_internal.h 2016-10-07 06:45:35.000000000 +0200 | ||
| 3 | @@ -228,6 +228,16 @@ | ||
| 4 | void *additional_data; | ||
| 5 | }; | ||
| 6 | |||
| 7 | +struct tevent_threaded_context { | ||
| 8 | + struct tevent_threaded_context *next, *prev; | ||
| 9 | + | ||
| 10 | +#ifdef HAVE_PTHREAD | ||
| 11 | + pthread_mutex_t event_ctx_mutex; | ||
| 12 | +#endif | ||
| 13 | + struct tevent_context *event_ctx; | ||
| 14 | + int wakeup_fd; | ||
| 15 | +}; | ||
| 16 | + | ||
| 17 | struct tevent_debug_ops { | ||
| 18 | void (*debug)(void *context, enum tevent_debug_level level, | ||
| 19 | const char *fmt, va_list ap) PRINTF_ATTRIBUTE(3,0); | ||
| 20 | @@ -241,24 +251,41 @@ | ||
| 21 | /* the specific events implementation */ | ||
| 22 | const struct tevent_ops *ops; | ||
| 23 | |||
| 24 | + /* | ||
| 25 | + * The following three pointers are queried on every loop_once | ||
| 26 | + * in the order in which they appear here. Not measured, but | ||
| 27 | + * hopefully putting them at the top together with "ops" | ||
| 28 | + * should make tevent a *bit* more cache-friendly than before. | ||
| 29 | + */ | ||
| 30 | + | ||
| 31 | + /* list of signal events - used by common code */ | ||
| 32 | + struct tevent_signal *signal_events; | ||
| 33 | + | ||
| 34 | + /* List of threaded job indicators */ | ||
| 35 | + struct tevent_threaded_context *threaded_contexts; | ||
| 36 | + | ||
| 37 | + /* list of immediate events - used by common code */ | ||
| 38 | + struct tevent_immediate *immediate_events; | ||
| 39 | + | ||
| 40 | /* list of fd events - used by common code */ | ||
| 41 | struct tevent_fd *fd_events; | ||
| 42 | |||
| 43 | /* list of timed events - used by common code */ | ||
| 44 | struct tevent_timer *timer_events; | ||
| 45 | |||
| 46 | - /* list of immediate events - used by common code */ | ||
| 47 | - struct tevent_immediate *immediate_events; | ||
| 48 | - | ||
| 49 | - /* list of signal events - used by common code */ | ||
| 50 | - struct tevent_signal *signal_events; | ||
| 51 | + /* List of scheduled immediates */ | ||
| 52 | + pthread_mutex_t scheduled_mutex; | ||
| 53 | + struct tevent_immediate *scheduled_immediates; | ||
| 54 | |||
| 55 | /* this is private for the events_ops implementation */ | ||
| 56 | void *additional_data; | ||
| 57 | |||
| 58 | /* pipe hack used with signal handlers */ | ||
| 59 | - struct tevent_fd *pipe_fde; | ||
| 60 | - int pipe_fds[2]; | ||
| 61 | + struct tevent_fd *wakeup_fde; | ||
| 62 | + int wakeup_fd; /* fd to write into */ | ||
| 63 | +#ifndef HAVE_EVENT_FD | ||
| 64 | + int wakeup_read_fd; | ||
| 65 | +#endif | ||
| 66 | |||
| 67 | /* debugging operations */ | ||
| 68 | struct tevent_debug_ops debug_ops; | ||
| 69 | @@ -282,6 +309,10 @@ | ||
| 70 | * tevent_common_add_timer_v2() | ||
| 71 | */ | ||
| 72 | struct tevent_timer *last_zero_timer; | ||
| 73 | + | ||
| 74 | +#ifdef HAVE_PTHREAD | ||
| 75 | + struct tevent_context *prev, *next; | ||
| 76 | +#endif | ||
| 77 | }; | ||
| 78 | |||
| 79 | const struct tevent_ops *tevent_find_ops_byname(const char *name); | ||
| 80 | @@ -327,6 +358,12 @@ | ||
| 81 | const char *handler_name, | ||
| 82 | const char *location); | ||
| 83 | bool tevent_common_loop_immediate(struct tevent_context *ev); | ||
| 84 | +void tevent_common_threaded_activate_immediate(struct tevent_context *ev); | ||
| 85 | + | ||
| 86 | +bool tevent_common_have_events(struct tevent_context *ev); | ||
| 87 | +int tevent_common_wakeup_init(struct tevent_context *ev); | ||
| 88 | +int tevent_common_wakeup_fd(int fd); | ||
| 89 | +int tevent_common_wakeup(struct tevent_context *ev); | ||
| 90 | |||
| 91 | struct tevent_signal *tevent_common_add_signal(struct tevent_context *ev, | ||
| 92 | TALLOC_CTX *mem_ctx, | ||
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb b/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb index 1d9ed7c845..d0235c1956 100644 --- a/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb +++ b/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb | |||
| @@ -19,6 +19,7 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \ | |||
| 19 | file://21-add-config-option-without-valgrind.patch \ | 19 | file://21-add-config-option-without-valgrind.patch \ |
| 20 | file://0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch \ | 20 | file://0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch \ |
| 21 | file://0006-avoid-using-colon-in-the-checking-msg.patch \ | 21 | file://0006-avoid-using-colon-in-the-checking-msg.patch \ |
| 22 | file://internal_tevent_to_0.9.31.patch \ | ||
| 22 | file://volatiles.03_samba \ | 23 | file://volatiles.03_samba \ |
| 23 | " | 24 | " |
| 24 | SRC_URI_append_libc-musl = " \ | 25 | SRC_URI_append_libc-musl = " \ |
