Lines Matching defs:libinfo_data
96 struct _li_data_s *libinfo_data;
104 /* Check if this thread already created libinfo_data */
105 libinfo_data = pthread_getspecific(_info_key);
106 if (libinfo_data != NULL) return libinfo_data;
108 libinfo_data = (struct _li_data_s *)calloc(1, sizeof(struct _li_data_s));
109 if (libinfo_data == NULL) return NULL;
111 pthread_setspecific(_info_key, libinfo_data);
112 return libinfo_data;
118 struct _li_data_s *libinfo_data;
122 libinfo_data = _LI_data_get();
123 if (libinfo_data == NULL) return NULL;
125 for (i = 0; i < libinfo_data->icount; i++)
127 if (libinfo_data->ikey[i] == key) return libinfo_data->idata[i];
130 i = libinfo_data->icount;
135 libinfo_data->ikey = (uint32_t *)malloc(sizeof(uint32_t));
136 libinfo_data->idata = (void **)malloc(sizeof(void *));
140 libinfo_data->ikey = (uint32_t *)reallocf(libinfo_data->ikey, n * sizeof(uint32_t));
141 libinfo_data->idata = (void **)reallocf(libinfo_data->idata, n * sizeof(void *));
144 if ((libinfo_data->ikey == NULL) || (libinfo_data->idata == NULL))
146 if (libinfo_data->ikey != NULL) free(libinfo_data->ikey);
147 libinfo_data->ikey = NULL;
149 if (libinfo_data->idata != NULL) free(libinfo_data->idata);
150 libinfo_data->idata = NULL;
158 libinfo_data->ikey[i] = key;
159 libinfo_data->idata[i] = tdata;
160 libinfo_data->icount++;