if (THREAD_GETMEM(self, p_specific[idx1st]) == NULL) { THREAD_SETMEM(self, p_specific[idx1st], calloc(PTHREAD_KEY_2NDLEVEL_SIZE, sizeof (void *))); if (THREAD_GETMEM(self, p_specific[idx1st]) == NULL)
if (THREAD_GETMEM_NC(self, p_specific[idx1st]) == NULL) { void *newp = calloc(PTHREAD_KEY_2NDLEVEL_SIZE, sizeof (void *)); if (newp == NULL)
int __pthread_setspecific(pthread_key_t key, const void * pointer){  pthread_descr self = thread_self();  unsigned int idx1st, idx2nd;  if (key >= PTHREAD_KEYS_MAX || !pthread_keys[key].in_use)    return EINVAL;  idx1st = key / PTHREAD_KEY_2NDLEVEL_SIZE;  idx2nd = key % PTHREAD_KEY_2NDLEVEL_SIZE;  if (THREAD_GETMEM(self, p_specific[idx1st]) == NULL) {    THREAD_SETMEM(self, p_specific[idx1st],		  calloc(PTHREAD_KEY_2NDLEVEL_SIZE, sizeof (void *)));    if (THREAD_GETMEM(self, p_specific[idx1st]) == NULL)      return ENOMEM;  }  THREAD_GETMEM(self, p_specific[idx1st])[idx2nd] = (void *) pointer;  return 0;}