Re: [PATCH] Remove only written lock_count variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Looks like this has never been used since the very first commit in the repo

Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>


On Thu, 2016-06-02 at 09:26 +0100, Frediano Ziglio wrote:
> Possibly used for debugging of an initial recursive lock.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/reds.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/server/reds.c b/server/reds.c
> index f8cfdfb..914d70d 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -146,7 +146,6 @@ static SpiceCoreInterfaceInternal core_interface_adapter =
> {
>  #define REDS_VDI_PORT_NUM_RECEIVE_BUFFS 5
>  
>  static pthread_mutex_t *lock_cs;
> -static long *lock_count;
>  
>  /* TODO while we can technically create more than one server in a process,
>   * the intended use is to support a single server per process */
> @@ -2804,7 +2803,6 @@ static void pthreads_locking_callback(int mode, int
> type, const char *file, int
>  {
>      if (mode & CRYPTO_LOCK) {
>          pthread_mutex_lock(&(lock_cs[type]));
> -        lock_count[type]++;
>      } else {
>          pthread_mutex_unlock(&(lock_cs[type]));
>      }
> @@ -2815,10 +2813,8 @@ static void openssl_thread_setup(void)
>      int i;
>  
>      lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t));
> -    lock_count = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long));
>  
>      for (i = 0; i < CRYPTO_num_locks(); i++) {
> -        lock_count[i] = 0;
>          pthread_mutex_init(&(lock_cs[i]), NULL);
>      }
>  
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]