[Spice-devel] [PATCH spice-server] Rename self field to thread_id
Christophe Fergeau
cfergeau at redhat.com
Thu Nov 24 11:47:27 UTC 2016
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
On Thu, Nov 24, 2016 at 10:48:23AM +0000, Frediano Ziglio wrote:
> 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
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161124/1d09d239/attachment.sig>
More information about the Spice-devel
mailing list