本文整理汇总了C++中cw_mutex_unlock函数的典型用法代码示例。如果您正苦于以下问题:C++ cw_mutex_unlock函数的具体用法?C++ cw_mutex_unlock怎么用?C++ cw_mutex_unlock使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cw_mutex_unlock函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: cw_log
/* locate a tone_zone_sound, given the tone_zone. if tone_zone == NULL, use the default tone_zone */
struct tone_zone_sound *cw_get_indication_tone(const struct tone_zone *zone, const char *indication)
{
struct tone_zone_sound *ts;
/* we need some tonezone, pick the first */
if (zone == NULL && current_tonezone)
zone = current_tonezone; /* default country? */
if (zone == NULL && tone_zones)
zone = tone_zones; /* any country? */
if (zone == NULL)
return 0; /* not a single country insight */
if (cw_mutex_lock(&tzlock))
{
cw_log(LOG_WARNING, "Unable to lock tone_zones list\n");
return 0;
}
for (ts = zone->tones; ts; ts = ts->next)
{
if (strcasecmp(indication, ts->name) == 0)
{
/* found indication! */
cw_mutex_unlock(&tzlock);
return ts;
}
}
/* nothing found, sorry */
cw_mutex_unlock(&tzlock);
return 0;
}
开发者ID:wildzero-cw,项目名称:callweaver,代码行数:31,代码来源:indications.c
示例2: config_load
static int config_load(void)
{
struct cw_config *cfg;
char *cat;
struct osp_provider *osp, *prev = NULL, *next;
cw_mutex_lock(&osplock);
osp = providers;
while(osp) {
osp->dead = 1;
osp = osp->next;
}
cw_mutex_unlock(&osplock);
cfg = cw_config_load("osp.conf");
if (cfg) {
if (!initialized) {
cat = cw_variable_retrieve(cfg, "general", "accelerate");
if (cat && cw_true(cat))
if (OSPPInit(1)) {
cw_log(LOG_WARNING, "Failed to enable hardware accelleration, falling back to software mode\n");
OSPPInit(0);
} else
hardware = 1;
else
OSPPInit(0);
initialized = 1;
}
cat = cw_variable_retrieve(cfg, "general", "tokenformat");
if (cat) {
if ((sscanf(cat, "%d", &tokenformat) != 1) || (tokenformat < TOKEN_ALGO_SIGNED) || (tokenformat > TOKEN_ALGO_BOTH)) {
tokenformat = TOKEN_ALGO_SIGNED;
cw_log(LOG_WARNING, "tokenformat should be an integer from 0 to 2, not '%s'\n", cat);
}
}
cat = cw_category_browse(cfg, NULL);
while(cat) {
if (strcasecmp(cat, "general"))
osp_build(cfg, cat);
cat = cw_category_browse(cfg, cat);
}
cw_config_destroy(cfg);
} else
cw_log(LOG_NOTICE, "No OSP configuration found. OSP support disabled\n");
cw_mutex_lock(&osplock);
osp = providers;
while(osp) {
next = osp->next;
if (osp->dead) {
if (prev)
prev->next = next;
else
providers = next;
/* XXX Cleanup OSP structure first XXX */
free(osp);
} else
prev = osp;
osp = next;
}
cw_mutex_unlock(&osplock);
return 0;
}
开发者ID:wildzero-cw,项目名称:callweaver,代码行数:60,代码来源:res_osp.c
示例3: sccp_pbx_indicate
static int sccp_pbx_indicate(struct cw_channel *ast, int ind) {
sccp_channel_t * c = CS_CW_CHANNEL_PVT(ast);
int res = 0;
if (!c)
return -1;
cw_mutex_lock(&c->lock);
sccp_log(10)(VERBOSE_PREFIX_3 "%s: CallWeaver indicate '%d' (%s) condition on channel %s\n", DEV_ID_LOG(c->device), ind, sccp_control2str(ind), ast->name);
if (c->state == SCCP_CHANNELSTATE_CONNECTED) {
/* let's callweaver emulate it */
cw_mutex_unlock(&c->lock);
return -1;
}
/* when the rtp media stream is open we will let callweaver emulate the tones */
if (c->rtp)
res = -1;
switch(ind) {
case CW_CONTROL_RINGING:
sccp_indicate_nolock(c, SCCP_CHANNELSTATE_RINGOUT);
break;
case CW_CONTROL_BUSY:
sccp_indicate_nolock(c, SCCP_CHANNELSTATE_BUSY);
break;
case CW_CONTROL_CONGESTION:
sccp_indicate_nolock(c, SCCP_CHANNELSTATE_CONGESTION);
break;
case CW_CONTROL_PROGRESS:
case CW_CONTROL_PROCEEDING:
sccp_indicate_nolock(c, SCCP_CHANNELSTATE_PROCEED);
res = 0;
break;
/* when the bridged channel hold/unhold the call we are notified here */
case CW_CONTROL_HOLD:
res = 0;
break;
case CW_CONTROL_UNHOLD:
res = 0;
break;
case -1:
break;
default:
cw_log(LOG_WARNING, "SCCP: Don't know how to indicate condition %d\n", ind);
res = -1;
}
cw_mutex_unlock(&c->lock);
return res;
}
开发者ID:wildzero-cw,项目名称:callweaver,代码行数:58,代码来源:sccp_pbx.c
示例4: cw_slinfactory_feed
int cw_slinfactory_feed(struct cw_slinfactory *sf, struct cw_frame *f)
{
struct cw_frame *frame;
if (f == NULL)
return 0;
cw_mutex_lock(&(sf->lock));
if (f->subclass != CW_FORMAT_SLINEAR)
{
if (sf->trans && f->subclass != sf->format)
{
cw_translator_free_path(sf->trans);
sf->trans = NULL;
}
if (sf->trans == NULL)
{
if ((sf->trans = cw_translator_build_path(CW_FORMAT_SLINEAR, 8000, f->subclass, 8000)) == NULL)
{
cw_log(LOG_WARNING, "Cannot build a path from %s to slin\n", cw_getformatname(f->subclass));
cw_mutex_unlock(&(sf->lock));
return 0;
}
sf->format = f->subclass;
}
}
if (sf->trans)
{
if ((frame = cw_translate(sf->trans, f, 0)))
frame = cw_frdup(frame);
}
else
{
frame = cw_frdup(f);
}
if (frame)
{
int x = ++sf->queue.count;
frame->next = NULL;
if (sf->queue.tail)
sf->queue.tail->next = frame;
else
sf->queue.head = frame;
sf->queue.tail = frame;
frame->next = NULL;
sf->size += frame->datalen;
cw_mutex_unlock(&(sf->lock));
return x;
}
cw_mutex_unlock(&(sf->lock));
return 0;
}
开发者ID:mehulsbhatt,项目名称:voip-foip,代码行数:55,代码来源:slinfactory.c
示例5: cw_register_indication
/* add a new indication to a tone_zone. tone_zone must exist. if the indication already
* exists, it will be replaced. */
int cw_register_indication(struct tone_zone *zone, const char *indication, const char *tonelist)
{
struct tone_zone_sound *ts;
struct tone_zone_sound *ps;
/* is it an alias? stop */
if (zone->alias[0])
return -1;
if (cw_mutex_lock(&tzlock))
{
cw_log(LOG_WARNING, "Unable to lock tone_zones list\n");
return -2;
}
for (ps = NULL, ts = zone->tones; ts; ps = ts, ts = ts->next)
{
if (strcasecmp(indication, ts->name) == 0)
{
/* indication already there, replace */
free((void *) ts->name);
free((void *) ts->data);
break;
}
}
if (!ts)
{
/* not there, we have to add */
if ((ts = malloc(sizeof(struct tone_zone_sound))) == NULL)
{
cw_log(LOG_WARNING, "Out of memory\n");
cw_mutex_unlock(&tzlock);
return -2;
}
ts->next = NULL;
}
ts->name = strdup(indication);
ts->data = strdup(tonelist);
if (ts->name == NULL || ts->data == NULL)
{
cw_log(LOG_WARNING, "Out of memory\n");
cw_mutex_unlock(&tzlock);
return -2;
}
if (ps)
ps->next = ts;
else
zone->tones = ts;
cw_mutex_unlock(&tzlock);
return 0;
}
开发者ID:wildzero-cw,项目名称:callweaver,代码行数:52,代码来源:indications.c
示例6: start_conference
struct cw_conference* start_conference( struct cw_conf_member* member )
{
struct cw_conference* conf = NULL ;
// check input
if ( member == NULL )
{
cw_log( LOG_WARNING, "unable to handle null member\n" ) ;
return NULL ;
}
// look for an existing conference
cw_log( CW_CONF_DEBUG, "attempting to find requested conference\n" ) ;
// acquire mutex
cw_mutex_lock( &start_stop_conf_lock ) ;
conf = find_conf( member->id ) ;
// unable to find an existing conference, try to create one
if ( conf == NULL )
{
// create a new conference
cw_log( CW_CONF_DEBUG, "attempting to create requested conference\n" ) ;
// create the new conference with one member
conf = create_conf( member->id, member ) ;
// return an error if create_conf() failed
if ( conf == NULL )
{
cw_log( LOG_ERROR, "unable to find or create requested conference\n" ) ;
cw_mutex_unlock( &start_stop_conf_lock ) ;
return NULL ;
}
}
else
{
// existing conference found, add new member to the conference
// once we call add_member(), this thread
// is responsible for calling delete_member()
//
add_member( conf, member) ;
}
// release mutex
cw_mutex_unlock( &start_stop_conf_lock ) ;
return conf ;
}
开发者ID:mehulsbhatt,项目名称:voip-foip,代码行数:50,代码来源:conference.c
示例7: cw_autoservice_stop
int cw_autoservice_stop(struct cw_channel *chan)
{
int res = -1;
struct asent *as, *prev;
cw_mutex_lock(&autolock);
as = aslist;
prev = NULL;
while(as) {
if (as->chan == chan)
break;
prev = as;
as = as->next;
}
if (as) {
if (prev)
prev->next = as->next;
else
aslist = as->next;
free(as);
if (!chan->_softhangup)
res = 0;
}
if (asthread != CW_PTHREADT_NULL)
pthread_kill(asthread, SIGURG);
cw_mutex_unlock(&autolock);
/* Wait for it to un-block */
while(cw_test_flag(chan, CW_FLAG_BLOCKING))
usleep(1000);
return res;
}
开发者ID:wildzero-cw,项目名称:callweaver,代码行数:30,代码来源:autoservice.c
示例8: sccp_pbx_fixup
static int sccp_pbx_fixup(struct cw_channel *oldchan, struct cw_channel *newchan) {
sccp_channel_t * c = CS_CW_CHANNEL_PVT(newchan);
if (!c) {
cw_log(LOG_WARNING, "sccp_pbx_fixup(old: %s(%p), new: %s(%p)). no SCCP channel to fix\n", oldchan->name, oldchan, newchan->name, newchan);
return -1;
}
cw_mutex_lock(&c->lock);
if (c->owner != oldchan) {
cw_log(LOG_WARNING, "old channel wasn't %p but was %p\n", oldchan, c->owner);
cw_mutex_unlock(&c->lock);
return -1;
}
c->owner = newchan;
cw_mutex_unlock(&c->lock);
return 0;
}
开发者ID:wildzero-cw,项目名称:callweaver,代码行数:16,代码来源:sccp_pbx.c
示例9: cw_autoservice_start
int cw_autoservice_start(struct cw_channel *chan)
{
int res = -1;
struct asent *as;
int needstart;
cw_mutex_lock(&autolock);
needstart = (asthread == CW_PTHREADT_NULL) ? 1 : 0 /* aslist ? 0 : 1 */;
as = aslist;
while(as) {
if (as->chan == chan)
break;
as = as->next;
}
if (!as) {
as = malloc(sizeof(struct asent));
if (as) {
memset(as, 0, sizeof(struct asent));
as->chan = chan;
as->next = aslist;
aslist = as;
res = 0;
if (needstart) {
if (cw_pthread_create(&asthread, NULL, autoservice_run, NULL)) {
cw_log(LOG_WARNING, "Unable to create autoservice thread :(\n");
free(aslist);
aslist = NULL;
res = -1;
} else
pthread_kill(asthread, SIGURG);
}
}
}
cw_mutex_unlock(&autolock);
return res;
}
开发者ID:wildzero-cw,项目名称:callweaver,代码行数:35,代码来源:autoservice.c
示例10: cw_app_group_match_get_count
int cw_app_group_match_get_count(char *groupmatch, char *category)
{
regex_t regexbuf;
struct cw_channel *chan;
int count = 0;
char *test;
char cat[80];
char *s;
if (cw_strlen_zero(groupmatch))
return 0;
/* if regex compilation fails, return zero matches */
if (regcomp(®exbuf, groupmatch, REG_EXTENDED | REG_NOSUB))
return 0;
s = (!cw_strlen_zero(category)) ? category : GROUP_CATEGORY_PREFIX;
cw_copy_string(cat, s, sizeof(cat));
chan = NULL;
while ((chan = cw_channel_walk_locked(chan)) != NULL) {
test = pbx_builtin_getvar_helper(chan, cat);
if (test && !regexec(®exbuf, test, 0, NULL, 0))
count++;
cw_mutex_unlock(&chan->lock);
}
regfree(®exbuf);
return count;
}
开发者ID:wildzero-cw,项目名称:callweaver,代码行数:31,代码来源:app.c
示例11: ogg_vorbis_close
/*!
* \brief Close a OGG/Vorbis filestream.
* \param s A OGG/Vorbis filestream.
*/
static void ogg_vorbis_close(struct cw_filestream *s)
{
if (cw_mutex_lock(&ogg_vorbis_lock)) {
cw_log(LOG_WARNING, "Unable to lock ogg_vorbis list\n");
return;
}
glistcnt--;
cw_mutex_unlock(&ogg_vorbis_lock);
cw_update_use_count();
if (s->writing) {
/* Tell the Vorbis encoder that the stream is finished
* and write out the rest of the data */
vorbis_analysis_wrote(&s->vd, 0);
write_stream(s);
}
ogg_stream_clear(&s->os);
vorbis_block_clear(&s->vb);
vorbis_dsp_clear(&s->vd);
vorbis_comment_clear(&s->vc);
vorbis_info_clear(&s->vi);
if (s->writing) {
ogg_sync_clear(&s->oy);
}
fclose(s->fp);
free(s);
}
开发者ID:wildzero-cw,项目名称:callweaver,代码行数:34,代码来源:format_ogg_vorbis.c
示例12: cw_mutex_lock
static void *database_queue_thread_main(void *data) {
cw_mutex_lock(&db_condition_lock);
for ( ;; ) {
if ( db_list_head ) {
//cw_log(LOG_ERROR,"DB DO SAVE OUR LIST\n");
database_flush_cache();
sleep( CACHE_COMMIT_INTERVAL );
}
else
{
cw_cond_wait(&db_condition_save, &db_condition_lock);
/*
//cw_log(LOG_ERROR,"DB SAVE CONDITION RECEIVED\n");
db_list_t *e = db_list_head;
cw_log(LOG_ERROR,"QUEUE NOW IS:\n");
while ( e ) {
if ( e->sql )
cw_log(LOG_ERROR,"ITEM: %s\n",e->sql);
e = e->next;
}
*/
}
}
cw_mutex_unlock(&db_condition_lock);
return NULL;
}
开发者ID:mehulsbhatt,项目名称:voip-foip,代码行数:31,代码来源:db.c
示例13: conference_stop_sounds
int conference_stop_sounds( struct cw_conf_member *member )
{
struct cw_conf_soundq *sound;
struct cw_conf_soundq *next;
if( member == NULL ) {
cw_log(LOG_WARNING, "Member is null. Cannot play\n");
return 0;
}
// clear all sounds
cw_mutex_lock(&member->lock);
sound = member->soundq;
member->soundq = NULL;
while(sound) {
next = sound->next;
free(sound);
sound = next;
}
cw_mutex_unlock(&member->lock);
cw_log(CW_CONF_DEBUG,"Stopped sounds to member %s\n", member->chan->name);
return 0 ;
}
开发者ID:mehulsbhatt,项目名称:voip-foip,代码行数:30,代码来源:sounds.c
示例14: cw_pbx_outgoing_exten
static void *originate(void *arg) {
struct fast_originate_helper *in = arg;
int reason=0;
int res;
struct cw_channel *chan = NULL;
res = cw_pbx_outgoing_exten(in->tech, CW_FORMAT_SLINEAR, in->data, in->timeout, in->context, in->exten, in->priority, &reason, 1, !cw_strlen_zero(in->cid_num) ? in->cid_num : NULL, !cw_strlen_zero(in->cid_name) ? in->cid_name : NULL, NULL, &chan);
manager_event(EVENT_FLAG_CALL, "Originate",
"ChannelRequested: %s/%s\r\n"
"Context: %s\r\n"
"Extension: %s\r\n"
"Priority: %d\r\n"
"Result: %d\r\n"
"Reason: %d\r\n"
"Reason-txt: %s\r\n",
in->tech,
in->data,
in->context,
in->exten,
in->priority,
res,
reason,
cw_control2str(reason)
);
/* Locked by cw_pbx_outgoing_exten or cw_pbx_outgoing_app */
if (chan) {
cw_mutex_unlock(&chan->lock);
}
free(in);
return NULL;
}
开发者ID:mehulsbhatt,项目名称:voip-foip,代码行数:32,代码来源:app_changrab.c
示例15: cw_log
static struct cw_filestream *au_open(FILE *f)
{
struct cw_filestream *tmp;
if (!(tmp = malloc(sizeof(struct cw_filestream))))
{
cw_log(LOG_ERROR, "Out of memory\n");
return NULL;
}
memset(tmp, 0, sizeof(struct cw_filestream));
if (check_header(f) < 0)
{
free(tmp);
return NULL;
}
if (cw_mutex_lock(&au_lock))
{
cw_log(LOG_WARNING, "Unable to lock au count\n");
free(tmp);
return NULL;
}
tmp->f = f;
cw_fr_init_ex(&tmp->fr, CW_FRAME_VOICE, CW_FORMAT_ULAW, NULL);
tmp->fr.data = tmp->buf;
/* datalen will vary for each frame */
tmp->fr.src = name;
localusecnt++;
cw_mutex_unlock(&au_lock);
cw_update_use_count();
return tmp;
}
开发者ID:wildzero-cw,项目名称:callweaver,代码行数:33,代码来源:format_au.c
示例16: show_osp
static int show_osp(int fd, int argc, char *argv[])
{
struct osp_provider *osp;
char *search = NULL;
int x;
int found = 0;
char *tokenalgo;
if ((argc < 2) || (argc > 3))
return RESULT_SHOWUSAGE;
if (argc > 2)
search = argv[2];
if (!search) {
switch (tokenformat) {
case TOKEN_ALGO_BOTH:
tokenalgo = "Both";
break;
case TOKEN_ALGO_UNSIGNED:
tokenalgo = "Unsigned";
break;
case TOKEN_ALGO_SIGNED:
default:
tokenalgo = "Signed";
break;
}
cw_cli(fd, "OSP: %s %s %s\n", initialized ? "Initialized" : "Uninitialized", hardware ? "Accelerated" : "Normal", tokenalgo);
}
cw_mutex_lock(&osplock);
osp = providers;
while(osp) {
if (!search || !strcasecmp(osp->name, search)) {
if (found)
cw_cli(fd, "\n");
cw_cli(fd, " == OSP Provider '%s' ==\n", osp->name);
cw_cli(fd, "Local Private Key: %s\n", osp->localpvtkey);
cw_cli(fd, "Local Certificate: %s\n", osp->localcert);
for (x=0;x<osp->cacount;x++)
cw_cli(fd, "CA Certificate %d: %s\n", x + 1, osp->cacerts[x]);
for (x=0;x<osp->spcount;x++)
cw_cli(fd, "Service Point %d: %s\n", x + 1, osp->servicepoints[x]);
cw_cli(fd, "Max Connections: %d\n", osp->maxconnections);
cw_cli(fd, "Retry Delay: %d seconds\n", osp->retrydelay);
cw_cli(fd, "Retry Limit: %d\n", osp->retrylimit);
cw_cli(fd, "Timeout: %d milliseconds\n", osp->timeout);
cw_cli(fd, "Source: %s\n", strlen(osp->source) ? osp->source : "<unspecified>");
cw_cli(fd, "OSP Handle: %d\n", osp->handle);
found++;
}
osp = osp->next;
}
cw_mutex_unlock(&osplock);
if (!found) {
if (search)
cw_cli(fd, "Unable to find OSP provider '%s'\n", search);
else
cw_cli(fd, "No OSP providers configured\n");
}
return RESULT_SUCCESS;
}
开发者ID:wildzero-cw,项目名称:callweaver,代码行数:60,代码来源:res_osp.c
示例17: action_setcdruserfield
static int action_setcdruserfield(struct mansession *s, struct message *m)
{
struct cw_channel *c = NULL;
char *userfield = astman_get_header(m, "UserField");
char *channel = astman_get_header(m, "Channel");
char *append = astman_get_header(m, "Append");
if (cw_strlen_zero(channel)) {
astman_send_error(s, m, "No Channel specified");
return 0;
}
if (cw_strlen_zero(userfield)) {
astman_send_error(s, m, "No UserField specified");
return 0;
}
c = cw_get_channel_by_name_locked(channel);
if (!c) {
astman_send_error(s, m, "No such channel");
return 0;
}
if (cw_true(append))
cw_cdr_appenduserfield(c, userfield);
else
cw_cdr_setuserfield(c, userfield);
cw_mutex_unlock(&c->lock);
astman_send_ack(s, m, "CDR Userfield Set");
return 0;
}
开发者ID:wildzero-cw,项目名称:callweaver,代码行数:28,代码来源:app_setcdruserfield.c
示例18: sccp_pbx_write
static int sccp_pbx_write(struct cw_channel *ast, struct cw_frame *frame) {
sccp_channel_t * c = CS_CW_CHANNEL_PVT(ast);
if (!c)
return 0;
int res = 0;
if (frame->frametype != CW_FRAME_VOICE) {
if (frame->frametype == CW_FRAME_IMAGE)
return 0;
else {
cw_log(LOG_WARNING, "%s: Can't send %d type frames with SCCP write on channel %d\n", DEV_ID_LOG(c->device), frame->frametype, (c) ? c->callid : 0);
return 0;
}
} else {
if (!(frame->subclass & ast->nativeformats)) {
cw_log(LOG_WARNING, "%s: Asked to transmit frame type %d, while native formats is %d (read/write = %d/%d)\n",
DEV_ID_LOG(c->device), frame->subclass, ast->nativeformats, ast->readformat, ast->writeformat);
return -1;
}
}
if (c) {
cw_mutex_lock(&c->lock);
if (c->rtp) {
res = cw_rtp_write(c->rtp, frame);
}
cw_mutex_unlock(&c->lock);
}
return res;
}
开发者ID:wildzero-cw,项目名称:callweaver,代码行数:30,代码来源:sccp_pbx.c
示例19: memset
static struct cw_filestream *g726_16_open(FILE *f)
{
/* We don't have any header to read or anything really, but
if we did, it would go here. We also might want to check
and be sure it's a valid file. */
struct cw_filestream *tmp;
if ((tmp = malloc(sizeof(struct cw_filestream)))) {
memset(tmp, 0, sizeof(struct cw_filestream));
if (cw_mutex_lock(&g726_lock)) {
cw_log(LOG_WARNING, "Unable to lock g726 list.\n");
free(tmp);
return NULL;
}
tmp->f = f;
cw_fr_init_ex(&tmp->fr, CW_FRAME_VOICE, CW_FORMAT_G726, name16);
tmp->rate = RATE_16;
tmp->fr.data = tmp->g726;
/* datalen will vary for each frame */
glistcnt++;
if (option_debug)
cw_log(LOG_DEBUG, "Created filestream G.726-%dk.\n",
40 - tmp->rate * 8);
cw_mutex_unlock(&g726_lock);
cw_update_use_count();
}
return tmp;
}
开发者ID:mehulsbhatt,项目名称:voip-foip,代码行数:27,代码来源:format_g726.c
示例20: sched_context_destroy
void sched_context_destroy(struct sched_context *con)
{
struct sched *s, *sl;
if (!pthread_equal(con->tid, CW_PTHREADT_NULL)) {
pthread_cancel(con->tid);
pthread_join(con->tid, NULL);
cw_cond_destroy(&con->service);
}
cw_mutex_lock(&con->lock);
#ifdef SCHED_MAX_CACHE
/* Eliminate the cache */
s = con->schedc;
while(s) {
sl = s;
s = s->next;
free(sl);
}
#endif
/* And the queue */
s = con->schedq;
while(s) {
sl = s;
s = s->next;
free(sl);
}
/* And the context */
cw_mutex_unlock(&con->lock);
cw_mutex_destroy(&con->lock);
free(con);
}
开发者ID:mehulsbhatt,项目名称:voip-foip,代码行数:34,代码来源:sched.c
注:本文中的cw_mutex_unlock函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论