voidenum_pairs_free(struct enum_pairs *headp){structenum_pair*e;if(headp ==NULL)return;while((e = STAILQ_FIRST(headp)) !=NULL) {STAILQ_REMOVE_HEAD(headp, link);if(e->enum_str)free(e->enum_str);free(e); }free(headp); } 开发者ID:coyizumi,项目名称:cs111,代码行数:18,代码...
STAILQ_REMOVE_HEAD(3EXT) Name queue, SLIST_HEAD, SLIST_HEAD_INITIALIZER, SLIST_ENTRY, SLIST_INIT, SLIST_INSERT_AFTER, SLIST_INSERT_HEAD, SLIST_REMOVE_HEAD, SLIST_REMOVE, SLIST_FOREACH, SLIST_EMPTY, SLIST_FIRST, SLIST_NEXT, SIMPLEQ_HEAD, SIMPLEQ_HEAD_INITIALIZER, SIMPLEQ_ENTRY, ...
static void *server_worker(void *arg) { struct request *req; while (1) { pthread_mutex_lock(&req_mutex); while (STAILQ_EMPTY(&requestq)) { pthread_cond_wait(&req_cond, &req_mutex); } req = STAILQ_FIRST(&requestq); STAILQ_REMOVE_HEAD(&requestq, link); pthread_mutex_unlock(&...