本文整理汇总了C++中LL_DELETE函数的典型用法代码示例。如果您正苦于以下问题:C++ LL_DELETE函数的具体用法?C++ LL_DELETE怎么用?C++ LL_DELETE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LL_DELETE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: DeleteAmaclList
void DeleteAmaclList(OicSecAmacl_t* amacl)
{
if (amacl)
{
OicSecAmacl_t *amaclTmp1 = NULL, *amaclTmp2 = NULL;
LL_FOREACH_SAFE(amacl, amaclTmp1, amaclTmp2)
{
unsigned int i = 0;
LL_DELETE(amacl, amaclTmp1);
// Clean Resources
for (i = 0; i < amaclTmp1->resourcesLen; i++)
{
OICFree(amaclTmp1->resources[i]);
}
OICFree(amaclTmp1->resources);
// Clean Amss
OICFree(amaclTmp1->amss);
// Clean Owners
OICFree(amaclTmp1->owners);
// Clean Amacl node itself
OICFree(amaclTmp1);
}
}
开发者ID:Lyoncore,项目名称:iotivity-demo-uc15,代码行数:28,代码来源:amaclresource.c
示例2: perf_free
Mavlink::~Mavlink()
{
perf_free(_loop_perf);
perf_free(_txerr_perf);
if (_task_running) {
/* task wakes up every 10ms or so at the longest */
_task_should_exit = true;
/* wait for a second for the task to quit at our request */
unsigned i = 0;
do {
/* wait 20ms */
usleep(20000);
/* if we have given up, kill it */
if (++i > 50) {
//TODO store main task handle in Mavlink instance to allow killing task
//task_delete(_mavlink_task);
break;
}
} while (_task_running);
}
if (_mavlink_instances) {
LL_DELETE(_mavlink_instances, this);
}
}
开发者ID:hll4fork,项目名称:Firmware-old,代码行数:29,代码来源:mavlink_main.cpp
示例3: TWDeleteTWSock
TWResultCode TWDeleteTWSock(TWSock * sock)
{
if(!sock)
{
return TW_RESULT_ERROR_INVALID_PARAMS;
}
TWSock * out = NULL;
TWSock * tmp = NULL;
LL_FOREACH_SAFE(g_twSockList, out, tmp)
{
if(out == sock)
{
LL_DELETE(g_twSockList, out);
}
}
OICFree(sock->buffer);
OICFree(sock->eui);
TWFreeQueue(sock->plugin);
int mutexRet = pthread_mutex_destroy(&(sock->mutex));
if(mutexRet != 0)
{
OC_LOG_V(ERROR, TAG, "Failed to destroy mutex. Error: %d", mutexRet);
return TW_RESULT_ERROR;
}
TWResultCode result = TWCloseTWSock(sock);
return result;
}
开发者ID:KonexyIoT,项目名称:iotivity,代码行数:30,代码来源:twsocketlist.c
示例4: profiler_start
void profiler_start(void)
{
profiler_block_t *b, *tmp;
LL_FOREACH_SAFE(g_blocks, b, tmp) {
b->count = b->tot_time = b->self_time = b->depth = 0;
LL_DELETE(g_blocks, b);
}
开发者ID:AbdelghaniDr,项目名称:goxel,代码行数:7,代码来源:profiler.c
示例5: LL_FOREACH_SAFE
/**
* Invoke all pending actions prior to specified timestamp
*/
void EventQueue::executeAll(uint64_t now) {
scheduling_s * current, *tmp;
scheduling_s * executionList = NULL;
int counter = 0;
// we need safe iteration because we are removing elements inside the loop
LL_FOREACH_SAFE(head, current, tmp)
{
if (++counter > QUEUE_LENGTH_LIMIT) {
firmwareError("Is this list looped?");
return;
}
if (current->momentUs <= now) {
LL_DELETE(head, current);
LL_PREPEND(executionList, current);
}
}
/*
* we need safe iteration here because 'callback' might change change 'current->next'
* while re-inserting it into the queue from within the callback
*/
LL_FOREACH_SAFE(executionList, current, tmp)
current->callback(current->param);
}
开发者ID:rus084,项目名称:rusefi,代码行数:30,代码来源:event_queue.cpp
示例6: lowlevel_scan_free
void lowlevel_scan_free()
{
if (!devinfo_list)
return;
struct lowlevel_device_info *info, *tmp;
struct lowlevel_device_info *info2, *tmp2;
LL_FOREACH_SAFE(devinfo_list, info, tmp)
{
LL_DELETE(devinfo_list, info);
LL_FOREACH_SAFE2(info, info2, tmp2, same_devid_next)
{
LL_DELETE(info, info2);
lowlevel_devinfo_free(info2);
}
开发者ID:end18,项目名称:avalon,代码行数:16,代码来源:lowlevel.c
示例7: destroyControlledLeds
ControlledLeds destroyControlledLeds(ControlledLeds leds) {
if (IsValid(leds)) {
LL_DELETE(controlled_leds, LEDS);
cleanUnderlyingLeds(leds);
free(LEDS);
}
return Invalid(ControlledLeds);
}
开发者ID:antongulenko,项目名称:TankOS,代码行数:8,代码来源:led_control.c
示例8: clear_list
void clear_list(struct fw_rule_node* list) {
struct fw_rule_node* curr;
LL_FOREACH(list, curr) {
LL_DELETE(list, curr);
free(curr->rule.name);
free(curr);
}
开发者ID:mikael0,项目名称:RuleParser,代码行数:8,代码来源:utils.c
示例9: gnrc_netreg_unregister
void gnrc_netreg_unregister(gnrc_nettype_t type, gnrc_netreg_entry_t *entry)
{
if (_INVALID_TYPE(type)) {
return;
}
LL_DELETE(netreg[type], entry);
}
开发者ID:deepfryed,项目名称:RIOT,代码行数:8,代码来源:gnrc_netreg.c
示例10: reduceRefcount
static void reduceRefcount(LedList element) {
if (element->references > 0)
element->references--;
if (element->references == 0) {
LL_DELETE(underlying_leds, element);
free(element);
}
}
开发者ID:antongulenko,项目名称:TankOS,代码行数:8,代码来源:led_control.c
示例11: finalizeObject
static void finalizeObject(Env* env, Object* obj) {
// TRACEF("finalizeObject: %p (%s)\n", obj, obj->clazz->name);
rvmLockMutex(&referentsLock);
void* key = (void*) GC_HIDE_POINTER(obj);
ReferentEntry* referentEntry;
HASH_FIND_PTR(referents, &key, referentEntry);
assert(referentEntry != NULL);
if (referentEntry->references == NULL) {
// The object is not referenced by any type of reference and can never be resurrected.
HASH_DEL(referents, referentEntry);
rvmUnlockMutex(&referentsLock);
return;
}
Object* softReferences = NULL;
Object* weakReferences = NULL;
Object* finalizerReferences = NULL;
Object* phantomReferences = NULL;
Object* clearedReferences = NULL;
ReferenceList* refNode;
while (referentEntry->references != NULL) {
refNode = referentEntry->references;
LL_DELETE(referentEntry->references, refNode);
Object** list = NULL;
Object* reference = refNode->reference;
if (rvmIsSubClass(java_lang_ref_SoftReference, reference->clazz)) {
list = &softReferences;
} else if (rvmIsSubClass(java_lang_ref_WeakReference, reference->clazz)) {
list = &weakReferences;
} else if (rvmIsSubClass(java_lang_ref_FinalizerReference, reference->clazz)) {
list = &finalizerReferences;
} else if (rvmIsSubClass(java_lang_ref_PhantomReference, reference->clazz)) {
list = &phantomReferences;
}
enqueuePendingReference(env, reference, list);
}
assert(referentEntry->references == NULL);
clearAndEnqueueReferences(env, &softReferences, &clearedReferences);
clearAndEnqueueReferences(env, &weakReferences, &clearedReferences);
enqueueFinalizerReferences(env, &finalizerReferences, &clearedReferences);
clearAndEnqueueReferences(env, &phantomReferences, &clearedReferences);
// Reregister for finalization. If no new references have been added to the list of references for the referent the
// next time it gets finalized we know it will never be resurrected.
GC_REGISTER_FINALIZER_NO_ORDER(obj, _finalizeObject, NULL, NULL, NULL);
rvmUnlockMutex(&referentsLock);
if (clearedReferences != NULL) {
rvmCallVoidClassMethod(env, java_lang_ref_ReferenceQueue, java_lang_ref_ReferenceQueue_add, clearedReferences);
assert(rvmExceptionOccurred(env) == NULL);
}
}
开发者ID:TimurTarasenko,项目名称:robovm,代码行数:58,代码来源:memory.c
示例12: close_modules
static void close_modules(module *list) {
module *m,*mt;
LL_FOREACH_SAFE(list,m,mt) {
LL_DELETE(list,m);
if (m->destroy != NULL) m->destroy();
dlclose(m->handle);
free(m);
}
开发者ID:sgmesservey,项目名称:cepa,代码行数:9,代码来源:main.c
示例13: free_pubsub_urls
void free_pubsub_urls()
{
struct pubsub_url *ps_url, *tmp;
LL_FOREACH_SAFE(pubsub_urls, ps_url, tmp) {
LL_DELETE(pubsub_urls, ps_url);
free(ps_url->address);
free(ps_url);
}
开发者ID:LevinLin,项目名称:simplehttp,代码行数:9,代码来源:ps_to_http.c
示例14: clear_rules
/* Clear rules loaded into memory */
void clear_rules()
{
rule * elt, *tmp;
/* delete each elemen using the safe iterator */
LL_FOREACH_SAFE(rules,elt,tmp) {
LL_DELETE(rules,elt);
free(elt->host);
free(elt);
}
开发者ID:gjedeer,项目名称:tuntox,代码行数:10,代码来源:main.c
示例15: ps2_command_alloc
struct ps2_async_command * ps2_command_alloc() {
struct ps2_async_command * cmd;
if(_ps2_free_commands) {
cmd = _ps2_free_commands;
LL_DELETE(_ps2_free_commands, cmd);
} else {
cmd = (struct ps2_async_command *)kmalloc(sizeof(struct ps2_async_command));
}
return cmd;
}
开发者ID:cmsd2,项目名称:ChrisOS,代码行数:10,代码来源:ps2.c
示例16: coap_remove_async
int coap_remove_async(coap_context_t *context, coap_tid_t id, coap_async_state_t **s)
{
coap_async_state_t *tmp = coap_find_async(context, id);
if (tmp)
LL_DELETE(context->async_state, tmp);
*s = tmp;
return tmp != NULL;
}
开发者ID:WojciechLuczkow,项目名称:iotivity,代码行数:10,代码来源:async.c
示例17: DeleteServerResponse
/**
* Delete a server response from the server response list
*
* @param serverResponse - server response to delete
*/
static void DeleteServerResponse(OCServerResponse * serverResponse)
{
if(serverResponse)
{
LL_DELETE(serverResponseList, serverResponse);
OCPayloadDestroy(serverResponse->payload);
OICFree(serverResponse);
OIC_LOG(INFO, TAG, "Server Response Removed!!");
}
}
开发者ID:Frank-KunLi,项目名称:iotivity,代码行数:15,代码来源:ocserverrequest.c
示例18: DeleteServerRequest
/**
* Delete a server request from the server request list
*
* @param serverRequest - server request to delete
*/
static void DeleteServerRequest(OCServerRequest * serverRequest)
{
if(serverRequest)
{
LL_DELETE(serverRequestList, serverRequest);
OICFree(serverRequest->requestToken);
OICFree(serverRequest);
serverRequest = NULL;
OIC_LOG(INFO, TAG, "Server Request Removed!!");
}
}
开发者ID:Frank-KunLi,项目名称:iotivity,代码行数:16,代码来源:ocserverrequest.c
示例19: DeleteCredList
void DeleteCredList(OicSecCred_t* cred)
{
if (cred)
{
OicSecCred_t *credTmp1 = NULL, *credTmp2 = NULL;
LL_FOREACH_SAFE(cred, credTmp1, credTmp2)
{
LL_DELETE(cred, credTmp1);
FreeCred(credTmp1);
}
}
开发者ID:TianyouLi,项目名称:iotivity,代码行数:11,代码来源:credresource.c
示例20: PDMDestoryOicUuidLinkList
void PDMDestoryOicUuidLinkList(OCUuidList_t* ptr)
{
if(ptr)
{
OCUuidList_t *tmp1 = NULL,*tmp2=NULL;
LL_FOREACH_SAFE(ptr, tmp1, tmp2)
{
LL_DELETE(ptr, tmp1);
OICFree(tmp1);
}
}
开发者ID:rzr,项目名称:iotivity-1,代码行数:11,代码来源:provisioningdatabasemanager.c
注:本文中的LL_DELETE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论