unsigned int need_update;
} kconsumerd_data = {
.fd_list.head = CDS_LIST_HEAD_INIT(kconsumerd_data.fd_list.head),
+ .need_update = 1,
};
/* communication with splice */
* received by the library.
*/
+
/* timeout parameter, to control the polling thread grace period */
static int kconsumerd_poll_timeout = -1;
* kconsumerd_find_session_fd
*
* Find a session fd in the global list.
+ * The kconsumerd_data.lock must be locked during this call
*
* Return 1 if found else 0
*/
{
struct kconsumerd_fd *iter;
- pthread_mutex_lock(&kconsumerd_data.lock);
cds_list_for_each_entry(iter, &kconsumerd_data.fd_list.head, list) {
if (iter->sessiond_fd == fd) {
DBG("Duplicate session fd %d", fd);
return 1;
}
}
- pthread_mutex_unlock(&kconsumerd_data.lock);
return 0;
}
}
switch (DEFAULT_KERNEL_CHANNEL_OUTPUT) {
- case LTTNG_KERNEL_SPLICE:
+ case LTTNG_EVENT_SPLICE:
/* read the whole subbuffer */
err = kernctl_get_padded_subbuf_size(infd, &len);
if (err != 0) {
ERR("Error splicing to tracefile");
}
break;
- case LTTNG_KERNEL_MMAP:
+ case LTTNG_EVENT_MMAP:
/* read the used subbuffer size */
err = kernctl_get_subbuf_size(infd, &len);
if (err != 0) {