@@ -44,7 +44,7 @@ static unsigned int sizes[LARGEST_ID];
4444void item_stats_reset (void ) {
4545 mutex_lock (& cache_lock );
4646 memset (itemstats , 0 , sizeof (itemstats ));
47- pthread_mutex_unlock (& cache_lock );
47+ mutex_unlock (& cache_lock );
4848}
4949
5050
@@ -125,7 +125,7 @@ item *do_item_alloc(char *key, const size_t nkey, const int flags, const rel_tim
125125 } else if ((it = slabs_alloc (ntotal , id )) == NULL ) {
126126 if (settings .evict_to_free == 0 ) {
127127 itemstats [id ].outofmemory ++ ;
128- pthread_mutex_unlock (& cache_lock );
128+ mutex_unlock (& cache_lock );
129129 return NULL ;
130130 }
131131 itemstats [id ].evicted ++ ;
@@ -181,7 +181,7 @@ item *do_item_alloc(char *key, const size_t nkey, const int flags, const rel_tim
181181 search -> refcount = 1 ;
182182 do_item_unlink_nolock (search , hash (ITEM_key (search ), search -> nkey , 0 ));
183183 }
184- pthread_mutex_unlock (& cache_lock );
184+ mutex_unlock (& cache_lock );
185185 return NULL ;
186186 }
187187
@@ -192,7 +192,7 @@ item *do_item_alloc(char *key, const size_t nkey, const int flags, const rel_tim
192192 * been removed from the slab LRU.
193193 */
194194 it -> refcount = 1 ; /* the caller will have a reference */
195- pthread_mutex_unlock (& cache_lock );
195+ mutex_unlock (& cache_lock );
196196 it -> next = it -> prev = it -> h_next = 0 ;
197197 it -> slabs_clsid = id ;
198198
@@ -298,7 +298,7 @@ int do_item_link(item *it, const uint32_t hv) {
298298 assoc_insert (it , hv );
299299 item_link_q (it );
300300 refcount_incr (& it -> refcount );
301- pthread_mutex_unlock (& cache_lock );
301+ mutex_unlock (& cache_lock );
302302
303303 return 1 ;
304304}
@@ -316,7 +316,7 @@ void do_item_unlink(item *it, const uint32_t hv) {
316316 item_unlink_q (it );
317317 do_item_remove (it );
318318 }
319- pthread_mutex_unlock (& cache_lock );
319+ mutex_unlock (& cache_lock );
320320}
321321
322322/* FIXME: Is it necessary to keep this copy/pasted code? */
@@ -354,7 +354,7 @@ void do_item_update(item *it) {
354354 it -> time = current_time ;
355355 item_link_q (it );
356356 }
357- pthread_mutex_unlock (& cache_lock );
357+ mutex_unlock (& cache_lock );
358358 }
359359}
360360
@@ -413,7 +413,7 @@ void item_stats_evictions(uint64_t *evicted) {
413413 for (i = 0 ; i < LARGEST_ID ; i ++ ) {
414414 evicted [i ] = itemstats [i ].evicted ;
415415 }
416- pthread_mutex_unlock (& cache_lock );
416+ mutex_unlock (& cache_lock );
417417}
418418
419419void do_item_stats (ADD_STAT add_stats , void * c ) {
@@ -505,7 +505,7 @@ item *do_item_get(const char *key, const size_t nkey, const uint32_t hv) {
505505 it = NULL ;
506506 }
507507 }
508- pthread_mutex_unlock (& cache_lock );
508+ mutex_unlock (& cache_lock );
509509 int was_found = 0 ;
510510
511511 if (settings .verbose > 2 ) {
0 commit comments