projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Docs: improve the documentation of the dynamic buffer interface
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
notification-thread-events.c
diff --git
a/src/bin/lttng-sessiond/notification-thread-events.c
b/src/bin/lttng-sessiond/notification-thread-events.c
index 8e70baed5196f45ef6c94830e8dc23efb1204ba7..0fd97e4e2f1e95172f4c4cb2883d2dd627d18b95 100644
(file)
--- a/
src/bin/lttng-sessiond/notification-thread-events.c
+++ b/
src/bin/lttng-sessiond/notification-thread-events.c
@@
-1110,12
+1110,12
@@
int handle_notification_thread_command(
}
end:
cds_list_del(&cmd->cmd_list_node);
}
end:
cds_list_del(&cmd->cmd_list_node);
-
futex_nto1_wake(&cmd->reply_futex
);
+
lttng_waiter_wake_up(&cmd->reply_waiter
);
pthread_mutex_unlock(&handle->cmd_queue.lock);
return ret;
error_unlock:
/* Wake-up and return a fatal error to the calling thread. */
pthread_mutex_unlock(&handle->cmd_queue.lock);
return ret;
error_unlock:
/* Wake-up and return a fatal error to the calling thread. */
-
futex_nto1_wake(&cmd->reply_futex
);
+
lttng_waiter_wake_up(&cmd->reply_waiter
);
pthread_mutex_unlock(&handle->cmd_queue.lock);
cmd->reply_code = LTTNG_ERR_FATAL;
error:
pthread_mutex_unlock(&handle->cmd_queue.lock);
cmd->reply_code = LTTNG_ERR_FATAL;
error:
@@
-1222,7
+1222,6
@@
int handle_notification_thread_client_connect(
DBG("[notification-thread] Added new notification channel client socket (%i) to poll set",
client->socket);
DBG("[notification-thread] Added new notification channel client socket (%i) to poll set",
client->socket);
- /* Add to ht. */
rcu_read_lock();
cds_lfht_add(state->client_socket_ht,
hash_client_socket(client->socket),
rcu_read_lock();
cds_lfht_add(state->client_socket_ht,
hash_client_socket(client->socket),
@@
-1510,7
+1509,7
@@
int client_dispatch_message(struct notification_client *client,
handshake_client =
(struct lttng_notification_channel_command_handshake *)
client->communication.inbound.buffer.data;
handshake_client =
(struct lttng_notification_channel_command_handshake *)
client->communication.inbound.buffer.data;
-
client->major = handshake_client->major;
+ client->major = handshake_client->major;
client->minor = handshake_client->minor;
if (!client->communication.inbound.creds_received) {
ERR("[notification-thread] No credentials received from client");
client->minor = handshake_client->minor;
if (!client->communication.inbound.creds_received) {
ERR("[notification-thread] No credentials received from client");
@@
-1623,9
+1622,14
@@
int handle_notification_thread_client_in(
}
offset = client->communication.inbound.buffer.size;
}
offset = client->communication.inbound.buffer.size;
+ /*
+ * The buffer's size starts out at the size of the command header.
+ * Once the command is determined, the "bytes_to_receive" are bumped
+ * to fit the remainder of the message being received.
+ */
ret = lttng_dynamic_buffer_set_size(
&client->communication.inbound.buffer,
ret = lttng_dynamic_buffer_set_size(
&client->communication.inbound.buffer,
- client->communication.inbound.bytes_to_receive);
+ client->communication.inbound.bytes_to_receive
+ offset
);
if (ret) {
goto end;
}
if (ret) {
goto end;
}
This page took
0.026326 seconds
and
5
git commands to generate.