resource_get_pinned
resource_get_pinned(res[j],
extern int resource_get_pinned(const pool_resource_t *,