[Spice-devel] [PATCH spice-server] Rename self field to thread_id
Frediano Ziglio
fziglio at redhat.com
Thu Nov 24 10:48:23 UTC 2016
self is usually used for GObject, avoid confusion.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/dispatcher.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/dispatcher.c b/server/dispatcher.c
index 44624cc..f0479aa 100644
--- a/server/dispatcher.c
+++ b/server/dispatcher.c
@@ -47,7 +47,7 @@ G_DEFINE_TYPE(Dispatcher, dispatcher, G_TYPE_OBJECT)
struct DispatcherPrivate {
int recv_fd;
int send_fd;
- pthread_t self;
+ pthread_t thread_id;
pthread_mutex_t lock;
DispatcherMessage *messages;
int stage; /* message parser stage - sender has no stages */
@@ -136,7 +136,7 @@ static void dispatcher_constructed(GObject *object)
pthread_mutex_init(&self->priv->lock, NULL);
self->priv->recv_fd = channels[0];
self->priv->send_fd = channels[1];
- self->priv->self = pthread_self();
+ self->priv->thread_id = pthread_self();
self->priv->messages = g_new0(DispatcherMessage,
self->priv->max_message_type);
@@ -420,5 +420,5 @@ int dispatcher_get_recv_fd(Dispatcher *dispatcher)
pthread_t dispatcher_get_thread_id(Dispatcher *self)
{
- return self->priv->self;
+ return self->priv->thread_id;
}
--
2.9.3
More information about the Spice-devel
mailing list