| 491 | } |
| 492 | |
| 493 | int bthread_keytable_pool_getstat(bthread_keytable_pool_t* pool, |
| 494 | bthread_keytable_pool_stat_t* stat) { |
| 495 | if (pool == NULL || stat == NULL) { |
| 496 | LOG(ERROR) << "Param[pool] or Param[stat] is NULL"; |
| 497 | return EINVAL; |
| 498 | } |
| 499 | pthread_rwlock_wrlock(&pool->rwlock); |
| 500 | stat->nfree = pool->size; |
| 501 | pthread_rwlock_unlock(&pool->rwlock); |
| 502 | return 0; |
| 503 | } |
| 504 | |
| 505 | int get_thread_local_keytable_list_length(bthread_keytable_pool_t* pool) { |
| 506 | if (pool == NULL) { |
no outgoing calls