curr = list_entry (entry, struct pthread, header.data.list);
curr = list_entry (entry, struct pthread, list);
hidden_def (__stack_user)/* Number of threads created.  */static unsigned int nptl_ncreated;/* Check whether the stack is still used or not.  */#define FREE_P(descr) ((descr)->tid == 0)/* We create a double linked list of all cache entries.  Double linked   because this allows removing entries from the end.  *//* Get a stack frame from the cache.  We have to match by size since   some blocks might be too small or far too large.  */static struct pthread *get_cached_stack (size_t *sizep, void **memp){  size_t size = *sizep;  struct pthread *result = NULL;  list_t *entry;  lll_lock (stack_cache_lock);  /* Search the cache for a matching entry.  We search for the     smallest stack which has at least the required size.  Note that     in normal situations the size of all allocated stacks is the     same.  As the very least there are only a few different sizes.     Therefore this loop will exit early most of the time with an     exact match.  */  list_for_each (entry, &stack_cache)    {      struct pthread *curr;      curr = list_entry (entry, struct pthread, header.data.list);      if (FREE_P (curr) && curr->stackblock_size >= size)	{	  if (curr->stackblock_size == size)	    {	      result = curr;	      break;	    }	  if (result == NULL	      || result->stackblock_size > curr->stackblock_size)	    result = curr;	}    }  if (__builtin_expect (result == NULL, 0)      /* Make sure the size difference is not too excessive.  In that	 case we do not use the block.  */      || __builtin_expect (result->stackblock_size > 4 * size, 0))    {      /* Release the lock.  */      lll_unlock (stack_cache_lock);      return NULL;    }  /* Dequeue the entry.  */  list_del (&result->header.data.list);  /* And add to the list of stacks in use.  */  list_add (&result->header.data.list, &stack_used);  /* And decrease the cache size.  */  stack_cache_actsize -= result->stackblock_size;  /* Release the lock early.  */  lll_unlock (stack_cache_lock);  /* Report size and location of the stack to the caller.  */  *sizep = result->stackblock_size;  *memp = result->stackblock;  /* Cancellation handling is back to the default.  */  result->cancelhandling = 0;  result->cleanup = NULL;  /* No pending event.  */  result->nextevent = NULL;  /* Clear the DTV.  */  dtv_t *dtv = GET_DTV (result);  memset (dtv, '\0', (dtv[-1].counter + 1) * sizeof (dtv_t));  /* Re-initialize the TLS.  */  return _dl_allocate_tls_init (result);}