summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
f3a5a93)
Change-Id: Icfba7ae9cbf504a8966923eac06c9eb0e11899d2
Signed-off-by: Florin Coras <fcoras@cisco.com>
return (fd - ldp->vlsh_bit_val);
}
return (fd - ldp->vlsh_bit_val);
}
+static void
+ldp_alloc_workers (void)
+{
+ if (ldp->workers)
+ return;
+ pool_alloc (ldp->workers, LDP_MAX_NWORKERS);
+}
+
static inline int
ldp_init (void)
{
static inline int
ldp_init (void)
{
return rv;
}
ldp->vcl_needs_real_epoll = 0;
return rv;
}
ldp->vcl_needs_real_epoll = 0;
- pool_alloc (ldp->workers, LDP_MAX_NWORKERS);
ldpw = ldp_worker_get_current ();
char *env_var_str = getenv (LDP_ENV_DEBUG);
ldpw = ldp_worker_get_current ();
char *env_var_str = getenv (LDP_ENV_DEBUG);
if (ldp->vcl_needs_real_epoll)
{
if (ldp->vcl_needs_real_epoll)
{
+ /* Make sure workers have been allocated */
+ if (!ldp->workers)
+ {
+ ldp_alloc_workers ();
+ ldpw = ldp_worker_get_current ();
+ }
rv = libc_epoll_create1 (flags);
ldp->vcl_needs_real_epoll = 0;
ldpw->vcl_mq_epfd = rv;
rv = libc_epoll_create1 (flags);
ldp->vcl_needs_real_epoll = 0;
ldpw->vcl_mq_epfd = rv;