您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ vPortFree函数代码示例

51自学网 2021-06-03 09:30:52
  C++
这篇教程C++ vPortFree函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中vPortFree函数的典型用法代码示例。如果您正苦于以下问题:C++ vPortFree函数的具体用法?C++ vPortFree怎么用?C++ vPortFree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了vPortFree函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: XfsTaskSetSpeakTimes

void XfsTaskSetSpeakTimes(int times) {	SpeakMessage *p = (SpeakMessage *)pvPortMalloc(sizeof(SpeakMessage));	p->type = TYPE_SET_SPEAKTIMES;	p->len = times;	if (pdTRUE != xQueueSend(speakQueue, &p, configTICK_RATE_HZ * 5)) {		vPortFree(p);	}}
开发者ID:masuchen,项目名称:stm32_led,代码行数:8,


示例2: XfsTaskSetSpeakPause

void XfsTaskSetSpeakPause(int sec) {	SpeakMessage *p = (SpeakMessage *)pvPortMalloc(sizeof(SpeakMessage));	p->type = TYPE_SET_SPEAKPAUSE;	p->len = sec;	if (pdTRUE != xQueueSend(speakQueue, &p, configTICK_RATE_HZ * 5)) {		vPortFree(p);	}}
开发者ID:masuchen,项目名称:stm32_led,代码行数:8,


示例3: MPU_vPortFree

void MPU_vPortFree( void *pv ){portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();	vPortFree( pv );	portRESET_PRIVILEGE( xRunningPrivileged );}
开发者ID:451506709,项目名称:automated_machine,代码行数:8,


示例4: MPU_vPortFree

	void MPU_vPortFree( void *pv )	{	BaseType_t xRunningPrivileged = xPortRaisePrivilege();		vPortFree( pv );		vPortResetPrivilege( xRunningPrivileged );	}
开发者ID:sean93park,项目名称:freertos,代码行数:8,


示例5: MPU_vPortFree

void MPU_vPortFree( void *pv ){    BaseType_t xRunningPrivileged = prvRaisePrivilege();    vPortFree( pv );    portRESET_PRIVILEGE( xRunningPrivileged );}
开发者ID:RitikaGupta1207,项目名称:freertos,代码行数:8,


示例6: sys_thread_new

/* * Starts a new thread with priority "prio" that will begin its execution in the * function "thread()". The "arg" argument will be passed as an argument to the * thread() function. The argument "ssize" is the requested stack size for the * new thread. The id of the new thread is returned. Both the id and the * priority are system dependent. */sys_thread_tsys_thread_new(char *name, void ( *thread ) ( void *arg ), void *arg, int stacksize, int prio ){    sys_thread_t    thread_hdl = SYS_THREAD_NULL;    int             i;    sys_tcb_t      *p;    /* We disable the FreeRTOS scheduler because it might be the case that the new     * tasks gets scheduled inside the xTaskCreate function. To prevent this we     * disable the scheduling. Note that this can happen although we have interrupts     * disabled because xTaskCreate contains a call to taskYIELD( ).     */    vPortEnterCritical(  );    p = tasks;    i = 0;    /* We are called the first time. Initialize it. */    if( p == NULL )    {        p = (sys_tcb_t *)pvPortMalloc( sizeof( sys_tcb_t ) );        if( p != NULL )        {            tasks = p;        }    }    else    {        /* First task already counter. */        i++;        /* Cycle to the end of the list. */        while( p->next != NULL )        {            i++;            p = p->next;        }        p->next = (sys_tcb_t *)pvPortMalloc( sizeof( sys_tcb_t ) );        p = p->next;    }    if( p != NULL )    {        /* Memory allocated. Initialize the data structure. */        THREAD_INIT( p );        /* Now q points to a free element in the list. */        if( xTaskCreate( thread, (const signed char *)name, stacksize, arg, prio, &p->pid ) == pdPASS )        {            thread_hdl = p;        }        else        {            vPortFree( p );        }    }    vPortExitCritical(  );    return thread_hdl;}
开发者ID:LouisMo,项目名称:New-Balance-Program-Structure,代码行数:65,


示例7: init_httpd_ch

/** * @brief		Initialise the socket & buffer for HTTP server */uint8_t init_httpd_ch(SOCKET s){	uint8_t ret;	ret = 0;	if( getSn_SR(s) != SOCK_CLOSED )	// Check the preferred socket is available,	{		s = getSocket(SOCK_CLOSED, 0);	// otherwise find free socket,		if(s == MAX_SOCK_NUM )        	// If there is no free socket?			ret = 0;	}	else	{		ret = 1;	}	if(!socket(s, Sn_MR_TCP, IP_PORT_HTTP, 0x00)) // initialise the socket for DHCP service	{		xSerialPrintf_P(PSTR("HTTPD socket: %d, initialise fail..!/r/n"),s);		ret = 0;	}#ifdef HTTP_DEBUG	else		xSerialPrintf_P(PSTR("HTTPD socket: %d, initialise success..!/r/n"),s);#endif	if(pHTTPRequest == NULL) // if there is no buffer allocated (pointer is NULL), then allocate request buffer for all HTTP functions.	{		if( !(pHTTPRequest = (HTTP_REQUEST *) pvPortMalloc( sizeof(HTTP_REQUEST) )))		{			xSerialPrint_P(PSTR("HTTP Request Buffer: malloc fail..!/r/n"));			ret = 0;		}#ifdef HTTP_DEBUG		else			xSerialPrint_P(PSTR("HTTP Request Buffer: malloc success..!/r/n"));#endif	}	if(pHTTPResponse == NULL) // if there is no buffer allocated (pointer is NULL), then allocate response buffer for all HTTP functions.	{		if( !(pHTTPResponse = (uint8_t *) pvPortMalloc( sizeof(uint8_t) * (FILE_BUFFER_SIZE + 1) )))		{			xSerialPrint_P(PSTR("HTTP Response Buffer: malloc fail..!/r/n"));			vPortFree(pHTTPRequest);			ret = 0;		}#ifdef HTTP_DEBUG		else			xSerialPrint_P(PSTR("HTTP Response Buffer: malloc success..!/r/n"));#endif	}	HTTPD_SOCK = s;	return ret;}
开发者ID:eddiecastropineda,项目名称:CollegeBound,代码行数:60,


示例8: sensorsBiasFree

static void sensorsBiasFree(BiasObj* bias){  /* unset buffer is full */  bias->bufIsFull = 0;  /* free buffer memory */  vPortFree(bias->bufStart);  bias->bufStart = NULL;  bias->bufPtr = NULL;}
开发者ID:CarlosRDomin,项目名称:crazyflie-firmware,代码行数:9,


示例9: eagle_lwip_if_free

void eagle_lwip_if_free(struct myif_state *state){	if(state->dhcps_if == 0) {		netif_remove(state->myif);//		if(lwip_if_queues[0] != NULL)			vPortFree(lwip_if_queues[0]);	}	else {		if(dhcps_flag) dhcps_stop();		netif_remove(state->myif);//		if(lwip_if_queues[1] != NULL)			vPortFree(lwip_if_queues[1]);	}	if(state->myif != NULL) {		vPortFree(state->myif);		state->myif = NULL;	}}
开发者ID:AlexShadow,项目名称:esp8266web,代码行数:18,


示例10: __sendToNumber

static void __sendToNumber(const char *number, const char *content, int len) {	char *pdu = pvPortMalloc(300);	if (number == NULL) {		return;	}	len = SMSEncodePduUCS2(pdu, number, content, len);	GsmTaskSendSMS(pdu, len);	vPortFree(pdu);}
开发者ID:masuchen,项目名称:chargingmachine,代码行数:9,


示例11: eagle_lwip_if_free

void eagle_lwip_if_free(struct ieee80211_conn *conn){	if(conn->dhcps_if == 0) {		netif_remove(conn->myif);//		if(lwip_if_queues[0] != NULL)			vPortFree(lwip_if_queues[0]);	}	else {		if(dhcps_flag) dhcps_stop();		netif_remove(conn->myif);//		if(lwip_if_queues[1] != NULL)			vPortFree(lwip_if_queues[1]);	}	if(conn->myif != NULL) {		vPortFree(conn->myif);		conn->myif = NULL;	}}
开发者ID:liqinliqin,项目名称:esp8266web,代码行数:18,


示例12: vPortFree

void *pvPortRealloc(void *mem, size_t newsize, const char *file, unsigned line){    if (newsize == 0) {        vPortFree(mem, file, line);        return NULL;    }    void *p;    p = pvPortMalloc(newsize, file, line, false);    if (p) {        /* zero the memory */        if (mem != NULL) {            memcpy(p, mem, newsize);            vPortFree(mem, file, line);        }    }    return p;}
开发者ID:karawin,项目名称:Ka-Radio,代码行数:18,


示例13: xfsSpeak

static void xfsSpeak(const char *s, int len, short type) {	SpeakMessage *p = (SpeakMessage *)pvPortMalloc(sizeof(SpeakMessage) + len);	p->type = type;	p->len = len;	memcpy(&p[1], s, len);	if (pdTRUE != xQueueSend(speakQueue, &p, configTICK_RATE_HZ * 5)) {		vPortFree(p);	}}
开发者ID:masuchen,项目名称:stm32_led,代码行数:9,


示例14: esp_apptrace_dummy_task

static void esp_apptrace_dummy_task(void *p){    esp_apptrace_test_task_arg_t *arg = (esp_apptrace_test_task_arg_t *) p;    int res, flags = 0, i;    timer_isr_handle_t *inth = NULL;    TickType_t tmo_ticks = arg->data.period / (1000 * portTICK_PERIOD_MS);    ESP_APPTRACE_TEST_LOGI("%x: run dummy task (period %u us, %u timers)", xTaskGetCurrentTaskHandle(), arg->data.period, arg->timers_num);    if (arg->timers_num > 0) {        inth = pvPortMalloc(arg->timers_num * sizeof(timer_isr_handle_t));        if (!inth) {            ESP_APPTRACE_TEST_LOGE("Failed to alloc timer ISR handles!");            goto on_fail;        }        memset(inth, 0, arg->timers_num * sizeof(timer_isr_handle_t));        for (int i = 0; i < arg->timers_num; i++) {            esp_apptrace_test_timer_init(arg->timers[i].group, arg->timers[i].id, arg->timers[i].data.period);            res = timer_isr_register(arg->timers[i].group, arg->timers[i].id, arg->timers[i].isr_func, &arg->timers[i], flags, &inth[i]);            if (res != ESP_OK) {                ESP_APPTRACE_TEST_LOGE("Failed to timer_isr_register (%d)!", res);                goto on_fail;            }            *(uint32_t *)arg->timers[i].data.buf = (uint32_t)inth[i] | (1 << 31);            ESP_APPTRACE_TEST_LOGI("%x: start timer %x period %u us", xTaskGetCurrentTaskHandle(), inth[i], arg->timers[i].data.period);            res = timer_start(arg->timers[i].group, arg->timers[i].id);            if (res != ESP_OK) {                ESP_APPTRACE_TEST_LOGE("Failed to timer_start (%d)!", res);                goto on_fail;            }        }    }    i = 0;    while (!arg->stop) {        ESP_APPTRACE_TEST_LOGD("%x: dummy task work %d.%d", xTaskGetCurrentTaskHandle(), xPortGetCoreID(), i++);        if (tmo_ticks) {            vTaskDelay(tmo_ticks);        }    }on_fail:    if (inth) {        for (int i = 0; i < arg->timers_num; i++) {            timer_pause(arg->timers[i].group, arg->timers[i].id);            timer_disable_intr(arg->timers[i].group, arg->timers[i].id);            if (inth[i]) {                esp_intr_free(inth[i]);            }        }        vPortFree(inth);    }    xSemaphoreGive(arg->done);    vTaskDelay(1);    vTaskDelete(NULL);}
开发者ID:altran-nl,项目名称:esp-idf,代码行数:56,


示例15: do_ls_test

static void do_ls_test(const char *pre){    char **dirs, *msg;    int x;    printk("ls %s.../n", pre);    msg = xenbus_ls(XBT_NIL, pre, &dirs);    if (msg) {	printk("Error in xenbus ls: %s/n", msg);	vPortFree(msg);	return;    }    for (x = 0; dirs[x]; x++)     {        printk("ls %s[%d] -> %s/n", pre, x, dirs[x]);        vPortFree(dirs[x]);    }    vPortFree(dirs);}
开发者ID:ScienceXChina,项目名称:FreeRTOS-Xen,代码行数:19,


示例16: freefare_free_tags

/* * Free the provided tag list. */voidfreefare_free_tags (MifareTag *tags){    if (tags) {	for (int i=0; tags[i] && i< MAX_CANDIDATES; i++) {	    freefare_free_tag(tags[i]);	}	vPortFree (tags);    }}
开发者ID:ipTronix,项目名称:SmartTool,代码行数:13,


示例17: usartClose

/*******************************************************************************//*! * /brief Close a connection on a USART * * The buffers allocated to the connection are released.  USART registers are configure to turn off reception and * transmission.  Interrups are also turned off. * @param usartId******************************************************************************************/void usartClose(USART_ID usartId ){	uint8_t ucByte;	/* Turn off the interrupts.  We may also want to delete the queues and/or	re-install the original ISR. */	vPortFree( usartComBuf[usartId].workBuffer );	vPortFree( usartComBuf[usartId].xRxedChars.start );	vPortFree( usartComBuf[usartId].xCharsForTx.start );	portENTER_CRITICAL();   // Turn off interrupts	xmitInterrupt_Off(usartId);	//	ucByte = *usartReg[usartId].ucsrBPtr;	ucByte &= ~RXCIE_BIT;	*usartReg[usartId].ucsrBPtr = ucByte;	portEXIT_CRITICAL();   // Enable interrupts}
开发者ID:NsTremblay,项目名称:real-time2016,代码行数:26,


示例18: _cbSendTaskList

/********************************************************************* * *       _cbSendTaskList()**  Function description*    This function is part of the link between FreeRTOS and SYSVIEW.*    Called from SystemView when asked by the host, it uses SYSVIEW*    functions to send the entire task list to the host.*/static void _cbSendTaskList(void) {  TaskStatus_t*         pxTaskStatusArray;  UBaseType_t           uxArraySize;  UBaseType_t           x;  char                  cStatus;#if INCLUDE_xTaskGetIdleTaskHandle  TaskHandle_t          hIdle;  hIdle = xTaskGetIdleTaskHandle();#endif  /* Take a snapshot of the number of tasks in case it changes while this  function is executing. */  uxArraySize = uxTaskGetNumberOfTasks();  /* Allocate an array index for each task. */  pxTaskStatusArray = pvPortMalloc( uxArraySize * sizeof( TaskStatus_t ) );  if( pxTaskStatusArray != NULL ) {    /* Generate the (binary) data. */    uxArraySize = uxTaskGetSystemState( pxTaskStatusArray, uxArraySize, NULL );#if INCLUDE_xTaskGetIdleTaskHandle    /* only get Idle task handle if scheduler has been started */    if (xTaskGetSchedulerState()!=taskSCHEDULER_NOT_STARTED) {      hIdle = xTaskGetIdleTaskHandle();    } else {      hIdle = NULL;    }#endif        /* Create a human readable table from the binary data. */    for( x = 0; x < uxArraySize; x++ ) {      uint8_t* pStack;#if INCLUDE_pxTaskGetStackStart      pStack = pxTaskGetStackStart(pxTaskStatusArray[x].xHandle);#else      pStack = (uint8_t*)0;#endif#if INCLUDE_xTaskGetIdleTaskHandle      if (pxTaskStatusArray[x].xHandle != hIdle) {        SYSVIEW_SendTaskInfo((unsigned)pxTaskStatusArray[x].xHandle, pxTaskStatusArray[x].pcTaskName, pxTaskStatusArray[x].uxCurrentPriority, (unsigned int)pStack, 0);      }#else      if (memcmp(pxTaskStatusArray[x].pcTaskName, "IDLE", 5) != 0) {        SYSVIEW_SendTaskInfo((unsigned)pxTaskStatusArray[x].xHandle, pxTaskStatusArray[x].pcTaskName, pxTaskStatusArray[x].uxCurrentPriority, (unsigned int)pStack, 0);      }#endif    }    /* Free the array again. */    vPortFree( pxTaskStatusArray );  }}
开发者ID:xueliu,项目名称:nRF51822,代码行数:64,


示例19: udpclient

/***************************udp related*********************************/int udpclient(){	int cli_sockfd;	socklen_t addrlen;	struct sockaddr_in cli_addr;	int loop= 0;	char *buffer ;//	int delay = 2;	if(!g_ulPacketCount)		g_ulPacketCount = 100;	if(!g_cli_buf_size)		g_cli_buf_size = 1500;	buffer = (char*)pvPortMalloc(g_cli_buf_size);		if(NULL == buffer){		printf("/n/rudpclient: Allocate buffer failed./n");		return -1;	}		/*create socket*/	memset(buffer, 0, g_cli_buf_size);	cli_sockfd=socket(AF_INET,SOCK_DGRAM,0);	if (cli_sockfd<0) {		printf("create socket failed/r/n/n");		return 1;	}		/* fill sockaddr_in*/		addrlen=sizeof(struct sockaddr_in);	memset(&cli_addr, 0, addrlen);			cli_addr.sin_family=AF_INET;	cli_addr.sin_addr.s_addr=inet_addr(g_server_ip);	cli_addr.sin_port=htons(5001);	/* send data to server*/	while(loop < g_ulPacketCount && !g_terminate) {		if(sendto(cli_sockfd, buffer, g_cli_buf_size, 0,(struct sockaddr*)&cli_addr, addrlen) < 0) {// Dynamic delay to prevent send fail due to limited skb, this will degrade throughtput//			if(delay < 100)//				delay += 2;		}//		vTaskDelay(delay);		loop++;	}	close(cli_sockfd);	//free buffer	vPortFree(buffer);	return 0;}
开发者ID:feixingzhe9,项目名称:RTL8711--test1,代码行数:56,


示例20: IPMI_HANDLER

/** @brief Handler for IPMI_OEM_CMD_I2C_TRANSFER IPMI command * * Performs a raw I2C master read on the selected bus and return the data * Req data: * [0] - Bus ID @see i2c_mapping.h * [1] - #Chip/Address identification - (0) = ChipID identification on byte 2 *                                      (1) = I2C Address identification on byte 2 * [2] - ChipID/I2C_Address - 8 bit address * [3] - Data Write len (n) * [4] - Data to Write * [4+n] - Data Read len (m) * * @param req[in] * @param rsp[out] * * @return */IPMI_HANDLER(ipmi_oem_cmd_i2c_transfer, NETFN_CUSTOM_OEM, IPMI_OEM_CMD_I2C_TRANSFER, ipmi_msg *req, ipmi_msg* rsp){    uint8_t bus_id = req->data[0];    uint8_t chipid_sel = req->data[1];    uint8_t chipid_i2caddr = req->data[2];    uint8_t write_len = req->data[3];    uint8_t read_len = req->data[4+write_len];    uint8_t *read_data;    uint8_t semph_err;    uint8_t i2c_interf;    uint8_t i2c_addr;    if ( chipid_sel == 0 ) {        /* Use chip id to take the bus */        semph_err = i2c_take_by_chipid( chipid_i2caddr, &i2c_addr, &i2c_interf, (TickType_t)10);    } else {        semph_err = i2c_take_by_busid( bus_id, &i2c_interf, (TickType_t)10 );        i2c_addr = chipid_i2caddr;    }    if ( semph_err == 0 ) {        rsp->completion_code = IPMI_CC_UNSPECIFIED_ERROR;        return;    }    if ( write_len > 0 ) {        if (xI2CMasterWrite( i2c_interf, i2c_addr, &req->data[4], write_len ) == write_len) {            rsp->completion_code = IPMI_CC_OK;        } else {            rsp->completion_code = IPMI_CC_UNSPECIFIED_ERROR;            return;        }    }    if ( read_len > 0 ) {        read_data = pvPortMalloc( read_len );        memset( read_data, read_len, 0 );        if ( xI2CMasterRead( i2c_interf, i2c_addr, read_data, read_len ) == read_len ) {            rsp->data[0] = read_len;            memcpy( &rsp->data[1], read_data, read_len );            rsp->data_len = read_len+1;            rsp->completion_code = IPMI_CC_OK;        } else {            rsp->data_len = 0;            rsp->completion_code = IPMI_CC_UNSPECIFIED_ERROR;        }        vPortFree( read_data );    }    i2c_give( i2c_interf );}
开发者ID:lnls-dig,项目名称:openMMC,代码行数:72,


示例21: vLogTask

static void vLogTask( void *pvParameters ) {	const char *p, *p2;	message_param_t *param;	messageQueue =  xQueueCreate( MESSAGE_Q_SIZE, sizeof(message_t));		for (;;) {			xQueueReceive( messageQueue, &next_msg, portMAX_DELAY);		printf("LOG:");		p=next_msg.msg;		param = next_msg.params;		while(*p) {			if (*p == '%') {				p++;				if (*p == '%') {					p++;					putchar('%');				} else {					if (next_msg.num_params) {						p2 = param->param.string_param;						while(*p2) {							putchar(*p2);							p2++;						}						vPortFree(param->param.string_param);						next_msg.num_params--;						param++;					} else {						/* no params left - output the placeholder */						putchar('%');						putchar(*p);					}					p++;				}			} else {				putchar(*p);				p++;			}		}		vPortFree(param);	}}
开发者ID:BrzTit,项目名称:dangerous-prototypes-open-hardware,代码行数:42,


示例22: vEthernetBufferRelease

void vEthernetBufferRelease( uint8_t *pucEthernetBuffer ){	/* There is space before the Ethernet buffer in which a pointer to the	network buffer that references this Ethernet buffer is stored.  Remove the	space before freeing the buffer. */	if( pucEthernetBuffer != NULL )	{		pucEthernetBuffer -= ipBUFFER_PADDING;		vPortFree( ( void * ) pucEthernetBuffer );	}}
开发者ID:AlexShiLucky,项目名称:freertos,代码行数:11,


示例23: __cmd_IMEI_Handler

static void __cmd_IMEI_Handler(const SMSInfo *p) {	char buf[16];	int len;	char *pdu;	sprintf(buf, "<IMEI>%s", GsmGetIMEI());	pdu = pvPortMalloc(300);	len = SMSEncodePdu8bit(pdu, (const char *)p->number, buf);	GsmTaskSendSMS(pdu, len);	vPortFree(pdu);}
开发者ID:masuchen,项目名称:chargingmachine,代码行数:11,


示例24: odp_uds_freeTPBuffers

void odp_uds_freeTPBuffers(struct TPElement *tpList){    struct TPElement *actElement = tpList;    while (tpList != NULL) {	actElement = tpList->next;	vPortFree(tpList);	tpList = actElement;    }    DEBUGPRINT("remove all Tester Present Buffers/n", "a");}
开发者ID:fkuppens,项目名称:oobd,代码行数:11,


示例25: erts_do_exit_process

void erts_do_exit_process(ErlProcess* p, Eterm reason) {#if (DEBUG_OP == 1)	char buf[45];	sprintf(buf, "process %d exited with reason %d/n", p->id, reason);	debug(buf);#endif	p->flags |= F_EXITING;	//cancel timer;	erts_cancel_timer(&p->timer);	//delete potential interrupts	delete_interrupt(p->id);	//propagate information	if(reason != atom_normal) {		ErtsLink* link = p->links;		Eterm* hp = (Eterm*)pvPortMalloc(4*sizeof(Eterm));		hp[0] = make_arityval(3);		hp[1] = atom_EXIT;		hp[2] = p->id;		hp[3] = reason;		Eterm exit_message = make_tuple(hp);		while(link != NULL) {			ErlProcess* linked = (ErlProcess*)&proc_tab[pid2pix(link->pid)];			if(!(linked->flags & F_EXITING)) {				erts_remove_link(&linked->links, p->id);			}			if(linked->flags & F_TRAP_EXIT && reason != atom_kill) {				erts_send_message(p, link->pid, exit_message, 0);			}			else {				if(!(linked->flags & F_EXITING)) {					erts_do_exit_process(linked, reason);				}			}			link = link->next;		}		vPortFree(hp);	}	//clean flags since they will be reused	free_process(p);	suspended++;	vTaskSuspend(*(p->handle));	continued++;}
开发者ID:astachurski,项目名称:erlang-on-arm,代码行数:54,


示例26: pvPortMalloc

void *pvPortRealloc(void *mem, size_t newsize){     void *p;  	     p = pvPortMalloc(newsize);     if (p) {       /* zero the memory */       memcpy(p, mem, newsize);       vPortFree(mem);     }     return p;     }
开发者ID:ClarePhang,项目名称:ESP8266_MP3_DECODER,代码行数:11,


示例27: do_write_test

static void do_write_test(const char *path, const char *val){    char *msg;    printk("Write %s to %s.../n", val, path);    msg = xenbus_write(XBT_NIL, path, val);    if (msg) {	printk("Result %s/n", msg);	vPortFree(msg);    } else {	printk("Success./n");    }}
开发者ID:ScienceXChina,项目名称:FreeRTOS-Xen,代码行数:12,


示例28: __cmd_LOCATION_Handler

static void __cmd_LOCATION_Handler(const SMSInfo *sms) {	char __touser[80] = {0};	char *pdu = NULL;	int len;	extern char longitude[], latitude[];	sprintf(__touser, "longitude:%.10s,latitude:%.10s", longitude, latitude);	pdu = pvPortMalloc(100);	len = SMSEncodePdu8bit(pdu, sms->number, (char *)__touser);	GsmTaskSendSMS(pdu, len);	vPortFree(pdu);}
开发者ID:masuchen,项目名称:chargingmachine,代码行数:12,


示例29: do_rm_test

static void do_rm_test(const char *path){    char *msg;    printk("rm %s.../n", path);    msg = xenbus_rm(XBT_NIL, path);    if (msg) {	printk("Result %s/n", msg);	vPortFree(msg);    } else {	printk("Success./n");    }}
开发者ID:ScienceXChina,项目名称:FreeRTOS-Xen,代码行数:12,



注:本文中的vPortFree函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ vPortResetPrivilege函数代码示例
C++ vPortExitCritical函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。