docstring
stringlengths
22
576
signature
stringlengths
9
317
prompt
stringlengths
57
886
code
stringlengths
20
1.36k
repository
stringclasses
49 values
language
stringclasses
2 values
license
stringclasses
9 values
stars
int64
15
21.3k
/* param base DMA peripheral base address. param channel DMA channel number. param trigger trigger configuration. */
void DMA_ConfigureChannelTrigger(DMA_Type *base, uint32_t channel, dma_channel_trigger_t *trigger)
/* param base DMA peripheral base address. param channel DMA channel number. param trigger trigger configuration. */ void DMA_ConfigureChannelTrigger(DMA_Type *base, uint32_t channel, dma_channel_trigger_t *trigger)
{ assert(FSL_FEATURE_DMA_NUMBER_OF_CHANNELSn(base) != -1); assert((channel < (uint32_t)FSL_FEATURE_DMA_NUMBER_OF_CHANNELSn(base)) && (NULL != trigger)); uint32_t tmpReg = (DMA_CHANNEL_CFG_HWTRIGEN_MASK | DMA_CHANNEL_CFG_TRIGPOL_MASK | DMA_CHANNEL_CFG_TRIGTYPE_MASK | DMA_CHANNEL_CFG_TRIGBURST_MASK | DMA_CHANNEL_CFG_BURSTPOWER_MASK | DMA_CHANNEL_CFG_SRCBURSTWRAP_MASK | DMA_CHANNEL_CFG_DSTBURSTWRAP_MASK); tmpReg = base->CHANNEL[channel].CFG & (~tmpReg); tmpReg |= (uint32_t)(trigger->type) | (uint32_t)(trigger->burst) | (uint32_t)(trigger->wrap); base->CHANNEL[channel].CFG = tmpReg; }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* Return: 0 if all went well, else returns appropriate error value. */
static int ti_sci_cmd_idle_clock(const struct ti_sci_handle *handle, u32 dev_id, u8 clk_id)
/* Return: 0 if all went well, else returns appropriate error value. */ static int ti_sci_cmd_idle_clock(const struct ti_sci_handle *handle, u32 dev_id, u8 clk_id)
{ return ti_sci_set_clock_state(handle, dev_id, clk_id, 0, MSG_CLOCK_SW_STATE_UNREQ); }
4ms/stm32mp1-baremetal
C++
Other
137
/* Performs read operation to Omer analog register specified. */
static s32 ixgbe_read_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 *val)
/* Performs read operation to Omer analog register specified. */ static s32 ixgbe_read_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 *val)
{ u32 core_ctl; IXGBE_WRITE_REG(hw, IXGBE_CORECTL, IXGBE_CORECTL_WRITE_CMD | (reg << 8)); IXGBE_WRITE_FLUSH(hw); udelay(10); core_ctl = IXGBE_READ_REG(hw, IXGBE_CORECTL); *val = (u8)core_ctl; return 0; }
robutest/uclinux
C++
GPL-2.0
60
/* Used by the connect code to tell the multi_socket code that one of the sockets we were using is about to be closed. This function will then remove it from the sockethash for this handle to make the multi_socket API behave properly, especially for the case when libcurl will create another socket again and it gets the same file descriptor number. */
void Curl_multi_closed(struct Curl_easy *data, curl_socket_t s)
/* Used by the connect code to tell the multi_socket code that one of the sockets we were using is about to be closed. This function will then remove it from the sockethash for this handle to make the multi_socket API behave properly, especially for the case when libcurl will create another socket again and it gets the same file descriptor number. */ void Curl_multi_closed(struct Curl_easy *data, curl_socket_t s)
{ if(data) { struct Curl_multi *multi = data->multi; if(multi) { struct Curl_sh_entry *entry = sh_getentry(&multi->sockhash, s); if(entry) { if(multi->socket_cb) multi->socket_cb(data, s, CURL_POLL_REMOVE, multi->socket_userp, entry->socketp); sh_delentry(&multi->sockhash, s); } } } }
alibaba/AliOS-Things
C++
Apache License 2.0
4,536
/* UART MSP Initialization This function configures the hardware resources used in this example. */
void HAL_UART_MspInit(UART_HandleTypeDef *huart)
/* UART MSP Initialization This function configures the hardware resources used in this example. */ void HAL_UART_MspInit(UART_HandleTypeDef *huart)
{ GPIO_InitTypeDef GPIO_InitStruct = {0}; if(huart->Instance==USART2) { __HAL_RCC_USART2_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE(); GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_15; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.Alternate = GPIO_AF7_USART2; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); } }
feaser/openblt
C++
GNU General Public License v3.0
601
/* Returns the measurement values for all the channels. */
int32_t BSP_LIGHT_SENSOR_GetValues(uint32_t Instance, uint32_t *pResult)
/* Returns the measurement values for all the channels. */ int32_t BSP_LIGHT_SENSOR_GetValues(uint32_t Instance, uint32_t *pResult)
{ int32_t ret; if (Instance >= LIGHT_SENSOR_INSTANCES_NBR) { ret = BSP_ERROR_WRONG_PARAM; } else if (VEML6030_LIGHT_SENSOR_Drv[Instance]->GetValues(VEML6030_LIGHT_SENSOR_CompObj[Instance], pResult) < 0) { ret = BSP_ERROR_COMPONENT_FAILURE; } else { ret = BSP_ERROR_NONE; } return ret; }
eclipse-threadx/getting-started
C++
Other
310
/* Function for storing when there is no service registered. */
static __INLINE ret_code_t no_service_context_store(pstorage_handle_t const *p_block_handle, dm_handle_t const *p_handle)
/* Function for storing when there is no service registered. */ static __INLINE ret_code_t no_service_context_store(pstorage_handle_t const *p_block_handle, dm_handle_t const *p_handle)
{ DM_LOG("[DM]: --> no_service_context_store\r\n"); return NRF_SUCCESS; }
labapart/polymcu
C++
null
201
/* This function will copy string no more than n bytes. */
char* rt_strncpy(char *dst, const char *src, rt_size_t n)
/* This function will copy string no more than n bytes. */ char* rt_strncpy(char *dst, const char *src, rt_size_t n)
{ if (n != 0) { char *d = dst; const char *s = src; do { if ((*d++ = *s++) == 0) { while (--n != 0) { *d++ = 0; } break; } } while (--n != 0); } return (dst); }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* The destructor function frees memory allocated by constructor, and closes related events. It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS. */
EFI_STATUS EFIAPI ReportStatusCodeLibDestructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
/* The destructor function frees memory allocated by constructor, and closes related events. It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS. */ EFI_STATUS EFIAPI ReportStatusCodeLibDestructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
{ EFI_STATUS Status; ASSERT (gBS != NULL); Status = gBS->CloseEvent (mReportStatusCodeLibVirtualAddressChangeEvent); ASSERT_EFI_ERROR (Status); Status = gBS->CloseEvent (mReportStatusCodeLibExitBootServicesEvent); ASSERT_EFI_ERROR (Status); return EFI_SUCCESS; }
tianocore/edk2
C++
Other
4,240
/* Processes the return code that results from an attempt to resume a procedure. If the resume attempt failed due to memory exhaustion at a lower layer, the procedure is marked as stalled but still in progress. Otherwise, the resume error code is unmodified. */
static int ble_gattc_process_resume_status(struct ble_gattc_proc *proc, int status)
/* Processes the return code that results from an attempt to resume a procedure. If the resume attempt failed due to memory exhaustion at a lower layer, the procedure is marked as stalled but still in progress. Otherwise, the resume error code is unmodified. */ static int ble_gattc_process_resume_status(struct ble_gattc_proc *proc, int status)
{ switch (status) { case 0: return 0; case BLE_HS_ENOMEM: ble_gattc_proc_set_resume_timer(proc); return 0; default: return status; } }
Nicholas3388/LuaNode
C++
Other
1,055
/* param base SAI base pointer. param handle SAI eDMA handle pointer. */
void SAI_TransferTerminateSendEDMA(I2S_Type *base, sai_edma_handle_t *handle)
/* param base SAI base pointer. param handle SAI eDMA handle pointer. */ void SAI_TransferTerminateSendEDMA(I2S_Type *base, sai_edma_handle_t *handle)
{ assert(handle); SAI_TransferAbortSendEDMA(base, handle); memset(handle->tcd, 0U, sizeof(handle->tcd)); memset(handle->saiQueue, 0U, sizeof(handle->saiQueue)); memset(handle->transferSize, 0U, sizeof(handle->transferSize)); handle->queueUser = 0U; handle->queueDriver = 0U; }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* Configures the minimum fault period and fault pin senses for a given PWM generator. */
void PWMGenFaultConfigure(uint32_t ui32Base, uint32_t ui32Gen, uint32_t ui32MinFaultPeriod, uint32_t ui32FaultSenses)
/* Configures the minimum fault period and fault pin senses for a given PWM generator. */ void PWMGenFaultConfigure(uint32_t ui32Base, uint32_t ui32Gen, uint32_t ui32MinFaultPeriod, uint32_t ui32FaultSenses)
{ ASSERT((ui32Base == PWM0_BASE) || (ui32Base == PWM1_BASE)); ASSERT(_PWMGenValid(ui32Gen)); ASSERT(ui32MinFaultPeriod < PWM_X_MINFLTPER_M); ASSERT((ui32FaultSenses & ~(PWM_FAULT0_SENSE_HIGH | PWM_FAULT0_SENSE_LOW | PWM_FAULT1_SENSE_HIGH | PWM_FAULT1_SENSE_LOW | PWM_FAULT2_SENSE_HIGH | PWM_FAULT2_SENSE_LOW | PWM_FAULT3_SENSE_HIGH | PWM_FAULT3_SENSE_LOW)) == 0); HWREG(PWM_GEN_BADDR(ui32Base, ui32Gen) + PWM_O_X_MINFLTPER) = ui32MinFaultPeriod; HWREG(PWM_GEN_EXT_BADDR(ui32Base, ui32Gen) + PWM_O_X_FLTSEN) = ui32FaultSenses; }
feaser/openblt
C++
GNU General Public License v3.0
601
/* This function retrieves the WiFi interface's DNS address. */
WIFI_Status_t WIFI_GetDNS_Address(uint8_t *DNS1addr, uint8_t *DNS2addr)
/* This function retrieves the WiFi interface's DNS address. */ WIFI_Status_t WIFI_GetDNS_Address(uint8_t *DNS1addr, uint8_t *DNS2addr)
{ WIFI_Status_t ret = WIFI_STATUS_ERROR; if(EsWifiObj.NetSettings.IsConnected) { memcpy(DNS1addr, EsWifiObj.NetSettings.DNS1, 4); memcpy(DNS2addr, EsWifiObj.NetSettings.DNS2, 4); ret = WIFI_STATUS_OK; } return ret; }
eclipse-threadx/getting-started
C++
Other
310
/* Handle hotplug events outside the interrupt handler proper. */
static void radeon_hotplug_work_func(struct work_struct *work)
/* Handle hotplug events outside the interrupt handler proper. */ static void radeon_hotplug_work_func(struct work_struct *work)
{ struct radeon_device *rdev = container_of(work, struct radeon_device, hotplug_work); struct drm_device *dev = rdev->ddev; struct drm_mode_config *mode_config = &dev->mode_config; struct drm_connector *connector; if (mode_config->num_connector) { list_for_each_entry(connector, &mode_config->connector_list, head) radeon_connector_hotplug(connector); } drm_sysfs_hotplug_event(dev); }
robutest/uclinux
C++
GPL-2.0
60
/* Enables or Disables Timer Reference Output Clear. The */
void TimerOREFClrConfigure(unsigned long ulBase, unsigned long ulChannel, unsigned long ulOREFClear)
/* Enables or Disables Timer Reference Output Clear. The */ void TimerOREFClrConfigure(unsigned long ulBase, unsigned long ulChannel, unsigned long ulOREFClear)
{ xASSERT((ulBase == TIMER1_BASE) || (ulBase == TIMER0_BASE)); xASSERT((ulChannel == TIMER_CH_0) || (ulChannel == TIMER_CH_1) || (ulChannel == TIMER_CH_2) || (ulChannel == TIMER_CH_3)); xASSERT((ulOREFClear == TIMER_OREF_CLEAR_DIS) || (ulOREFClear == TIMER_OREF_CLEAR_EN)); xHWREG(ulBase + TIMER_CH0OCFR + 4 * ulChannel) &= ~TIMER_CH0OCFR_REF0CE; xHWREG(ulBase + TIMER_CH0OCFR + 4 * ulChannel) |= ulOREFClear; }
coocox/cox
C++
Berkeley Software Distribution (BSD)
104
/* Note that this function upgrades page to ksm page: if one of the pages is already a ksm page, try_to_merge_with_ksm_page should be used. */
static struct page* try_to_merge_two_pages(struct rmap_item *rmap_item, struct page *page, struct rmap_item *tree_rmap_item, struct page *tree_page)
/* Note that this function upgrades page to ksm page: if one of the pages is already a ksm page, try_to_merge_with_ksm_page should be used. */ static struct page* try_to_merge_two_pages(struct rmap_item *rmap_item, struct page *page, struct rmap_item *tree_rmap_item, struct page *tree_page)
{ int err; err = try_to_merge_with_ksm_page(rmap_item, page, NULL); if (!err) { err = try_to_merge_with_ksm_page(tree_rmap_item, tree_page, page); if (err) break_cow(rmap_item); } return err ? NULL : page; }
robutest/uclinux
C++
GPL-2.0
60
/* i2c_init_board - reset i2c bus. When the board is powercycled during a bus transfer it might hang; for details see doc/I2C_Edge_Conditions. The Innokom board has GPIO70 connected to SCLK which can be toggled until all chips think that their current cycles are finished. */
int i2c_init_board(void)
/* i2c_init_board - reset i2c bus. When the board is powercycled during a bus transfer it might hang; for details see doc/I2C_Edge_Conditions. The Innokom board has GPIO70 connected to SCLK which can be toggled until all chips think that their current cycles are finished. */ int i2c_init_board(void)
{ int i, icr; icr = ICR; ICR &= ~(ICR_SCLE | ICR_IUE); GPCR(70) = GPIO_bit(70); for (i = 0; i < 20; i++) { GPDR(70) |= GPIO_bit(70); udelay(10); GPDR(70) &= ~GPIO_bit(70); udelay(10); } ICR = icr; return 0; }
EmcraftSystems/u-boot
C++
Other
181
/* nfs_set_page_tag_locked - Tag a request as locked @req: */
int nfs_set_page_tag_locked(struct nfs_page *req)
/* nfs_set_page_tag_locked - Tag a request as locked @req: */ int nfs_set_page_tag_locked(struct nfs_page *req)
{ struct nfs_inode *nfsi = NFS_I(req->wb_context->path.dentry->d_inode); if (!nfs_lock_request_dontget(req)) return 0; if (req->wb_page != NULL) radix_tree_tag_set(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED); return 1; }
robutest/uclinux
C++
GPL-2.0
60
/* @a_this: the current instance of #CRStatement. Destructor of #CRStatement. */
void cr_statement_destroy(CRStatement *a_this)
/* @a_this: the current instance of #CRStatement. Destructor of #CRStatement. */ void cr_statement_destroy(CRStatement *a_this)
{ CRStatement *cur = NULL; g_return_if_fail (a_this); for (cur = a_this; cur && cur->next; cur = cur->next) { cr_statement_clear (cur); } if (cur) cr_statement_clear (cur); if (cur->prev == NULL) { g_free (a_this); return; } for (cur = cur->prev; cur && cur->prev; cur = cur->prev) { if (cur->next) { g_free (cur->next); cur->next = NULL; } } if (!cur) return; if (cur->next) { g_free (cur->next); cur->next = NULL; } g_free (cur); cur = NULL; }
seemoo-lab/nexmon
C++
GNU General Public License v3.0
2,330
/* edma3_set_src_addr - set source address for slot only */
void edma3_set_src_addr(u32 base, int slot, u32 src)
/* edma3_set_src_addr - set source address for slot only */ void edma3_set_src_addr(u32 base, int slot, u32 src)
{ struct edma3_slot_layout *rg; rg = (struct edma3_slot_layout *)(base + EDMA3_SL_BASE(slot)); __raw_writel(src, &rg->src); }
4ms/stm32mp1-baremetal
C++
Other
137
/* Select GPIO pins to be used by this peripheral. This needs to be configured when no transaction is in progress. */
void i2c_select_pins(uint32_t i2c, uint8_t scl_pin, uint8_t sda_pin)
/* Select GPIO pins to be used by this peripheral. This needs to be configured when no transaction is in progress. */ void i2c_select_pins(uint32_t i2c, uint8_t scl_pin, uint8_t sda_pin)
{ I2C_PSELSCL(i2c) = scl_pin; I2C_PSELSDA(i2c) = sda_pin; }
insane-adding-machines/unicore-mx
C++
GNU General Public License v3.0
50
/* Configures the SAI clock Divider coming from PLLI2S. */
void RCC_SAIPLLI2SClkDivConfig(uint32_t RCC_PLLI2SDivQ)
/* Configures the SAI clock Divider coming from PLLI2S. */ void RCC_SAIPLLI2SClkDivConfig(uint32_t RCC_PLLI2SDivQ)
{ uint32_t tmpreg = 0; assert_param(IS_RCC_PLLI2S_DIVQ_VALUE(RCC_PLLI2SDivQ)); tmpreg = RCC->DCKCFGR; tmpreg &= ~(RCC_DCKCFGR_PLLI2SDIVQ); tmpreg |= (RCC_PLLI2SDivQ - 1); RCC->DCKCFGR = tmpreg; }
MaJerle/stm32f429
C++
null
2,036
/* rt_worker_func() is run in process context. we call rt_check_expire() to scan part of the hash table */
static void rt_worker_func(struct work_struct *work)
/* rt_worker_func() is run in process context. we call rt_check_expire() to scan part of the hash table */ static void rt_worker_func(struct work_struct *work)
{ rt_check_expire(); schedule_delayed_work(&expires_work, ip_rt_gc_interval); }
EmcraftSystems/linux-emcraft
C++
Other
266
/* EP stall lock function to avoid stall clear by USB SET FEATURE request. */
void USBD_LockEpStall(uint32_t u32EpBitmap)
/* EP stall lock function to avoid stall clear by USB SET FEATURE request. */ void USBD_LockEpStall(uint32_t u32EpBitmap)
{ g_USBD_u32EpStallLock = u32EpBitmap; }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* Opens the log file on the Dataflash's FAT formatted partition according to the current date */
void OpenLogFile(void)
/* Opens the log file on the Dataflash's FAT formatted partition according to the current date */ void OpenLogFile(void)
{ char LogFileName[16]; TimeDate_t CurrentTimeDate; RTC_GetTimeDate(&CurrentTimeDate); snprintf(LogFileName, sizeof(LogFileName), "%02d%02d%02d.csv", CurrentTimeDate.Day, CurrentTimeDate.Month, CurrentTimeDate.Year); f_mount(0, &DiskFATState); f_open(&TempLogFile, LogFileName, FA_OPEN_ALWAYS | FA_WRITE); f_lseek(&TempLogFile, TempLogFile.fsize); }
prusa3d/Prusa-Firmware-Buddy
C++
Other
1,019
/* SPI MSP De-Initialization This function frees the hardware resources used in this example: */
void HAL_SPI_MspDeInit(SPI_HandleTypeDef *hspi)
/* SPI MSP De-Initialization This function frees the hardware resources used in this example: */ void HAL_SPI_MspDeInit(SPI_HandleTypeDef *hspi)
{ static DMA_HandleTypeDef hdma_tx; static DMA_HandleTypeDef hdma_rx; SPIx_FORCE_RESET(); SPIx_RELEASE_RESET(); HAL_GPIO_DeInit(SPIx_SCK_GPIO_PORT, SPIx_SCK_PIN); HAL_GPIO_DeInit(SPIx_MISO_GPIO_PORT, SPIx_MISO_PIN); HAL_GPIO_DeInit(SPIx_MOSI_GPIO_PORT, SPIx_MOSI_PIN); HAL_DMA_DeInit(&hdma_tx); HAL_DMA_DeInit(&hdma_rx); HAL_NVIC_DisableIRQ(SPIx_DMA_TX_IRQn); HAL_NVIC_DisableIRQ(SPIx_DMA_RX_IRQn); HAL_NVIC_DisableIRQ(SPIx_IRQn); }
STMicroelectronics/STM32CubeF4
C++
Other
789
/* Returns: TRUE if the key did not exist yet */
gboolean g_hash_table_insert(GHashTable *hash_table, gpointer key, gpointer value)
/* Returns: TRUE if the key did not exist yet */ gboolean g_hash_table_insert(GHashTable *hash_table, gpointer key, gpointer value)
{ return g_hash_table_insert_internal (hash_table, key, value, FALSE); }
seemoo-lab/nexmon
C++
GNU General Public License v3.0
2,330
/* Initialize the IOMUX Alternative Functions of the Freescale Kinetis MCU */
void __init kinetis_dma_init(void)
/* Initialize the IOMUX Alternative Functions of the Freescale Kinetis MCU */ void __init kinetis_dma_init(void)
{ dma_ch_config_table(k70_dmamux_table, ARRAY_SIZE(k70_dmamux_table)); kinetis_dmac_init(); }
EmcraftSystems/linux-emcraft
C++
Other
266
/* Returns the type of the data interface between the given MAC and its PHY. This is typically determined by the RCW. */
phy_interface_t fm_info_get_enet_if(enum fm_port port)
/* Returns the type of the data interface between the given MAC and its PHY. This is typically determined by the RCW. */ phy_interface_t fm_info_get_enet_if(enum fm_port port)
{ int i = fm_port_to_index(port); if (i == -1) return PHY_INTERFACE_MODE_NONE; if (fm_info[i].enabled) return fm_info[i].enet_if; return PHY_INTERFACE_MODE_NONE; }
4ms/stm32mp1-baremetal
C++
Other
137
/* USB Device Set Address Function Parameters: adr: USB Device Address Return Value: None */
void USBD_SetAddress(uint32_t adr, uint32_t setup)
/* USB Device Set Address Function Parameters: adr: USB Device Address Return Value: None */ void USBD_SetAddress(uint32_t adr, uint32_t setup)
{ if (setup == 0) { LPC_USBx->DEVICEADDR = (adr << 25); LPC_USBx->DEVICEADDR |= (1UL << 24); } }
ARMmbed/DAPLink
C++
Apache License 2.0
2,140
/* Return: 2 if internal feedback is enabled or 1 if external feedback is enabled. */
static u8 __wrpll_calc_fbdiv(const struct wrpll_cfg *c)
/* Return: 2 if internal feedback is enabled or 1 if external feedback is enabled. */ static u8 __wrpll_calc_fbdiv(const struct wrpll_cfg *c)
{ return (c->flags & WRPLL_FLAGS_INT_FEEDBACK_MASK) ? 2 : 1; }
4ms/stm32mp1-baremetal
C++
Other
137
/* USBH_CtlSendData Sends a data Packet to the Device. */
USBH_StatusTypeDef USBH_CtlSendData(USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length, uint8_t pipe_num, uint8_t do_ping)
/* USBH_CtlSendData Sends a data Packet to the Device. */ USBH_StatusTypeDef USBH_CtlSendData(USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length, uint8_t pipe_num, uint8_t do_ping)
{ if (phost->device.speed != USBH_SPEED_HIGH) { do_ping = 0U; } (void)USBH_LL_SubmitURB(phost, pipe_num, 0U, USBH_EP_CONTROL, USBH_PID_DATA, buff, length, do_ping); return USBH_OK; }
prusa3d/Prusa-Firmware-Buddy
C++
Other
1,019
/* Set TMR4 PWM register TMR4_PSCR.OE bit effect time. */
void TMR4_PWM_SetOEEffectTime(CM_TMR4_TypeDef *TMR4x, uint32_t u32Time)
/* Set TMR4 PWM register TMR4_PSCR.OE bit effect time. */ void TMR4_PWM_SetOEEffectTime(CM_TMR4_TypeDef *TMR4x, uint32_t u32Time)
{ DDL_ASSERT(IS_TMR4_UNIT(TMR4x)); DDL_ASSERT(IS_TMR4_PWM_OE_EFFECT(u32Time)); MODIFY_REG32(TMR4x->PSCR, TMR4_PSCR_ODT, u32Time); }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* param mode Porter Duff blend mode. param layer The configuration for source layer or destination layer. param config Pointer to the configuration. retval kStatus_Success Get the configuration successfully. retval kStatus_InvalidArgument The argument is invalid. */
status_t LCDIFV2_GetPorterDuffConfig(lcdifv2_pd_blend_mode_t mode, lcdifv2_pd_layer_t layer, lcdifv2_blend_config_t *config)
/* param mode Porter Duff blend mode. param layer The configuration for source layer or destination layer. param config Pointer to the configuration. retval kStatus_Success Get the configuration successfully. retval kStatus_InvalidArgument The argument is invalid. */ status_t LCDIFV2_GetPorterDuffConfig(lcdifv2_pd_blend_mode_t mode, lcdifv2_pd_layer_t layer, lcdifv2_blend_config_t *config)
{ status_t status; if ((NULL == config) || (mode >= kLCDIFV2_PD_Max) || (layer >= kLCDIFV2_PD_LayerMax)) { status = kStatus_InvalidArgument; } else { config->pdAlphaMode = kLCDIFV2_PD_AlphaStraight; config->pdColorMode = kLCDIFV2_PD_ColorWithAlpha; config->pdGlobalAlphaMode = kLCDIFV2_PD_LocalAlpha; config->pdFactorMode = s_lcdifv2PdLayerFactors[mode][(uint8_t)layer]; config->alphaMode = kLCDIFV2_AlphaPoterDuff; status = kStatus_Success; } return status; }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* no valid open procedure on this sort of dir */
static int afs_mntpt_open(struct inode *inode, struct file *file)
/* no valid open procedure on this sort of dir */ static int afs_mntpt_open(struct inode *inode, struct file *file)
{ _enter("%p,%p{%p{%s},%s}", inode, file, file->f_path.dentry->d_parent, file->f_path.dentry->d_parent ? file->f_path.dentry->d_parent->d_name.name : (const unsigned char *) "", file->f_path.dentry->d_name.name); return -EREMOTE; }
robutest/uclinux
C++
GPL-2.0
60
/* Get the GPIO pin number from a short Pin. */
unsigned long GPIOPinToPin(unsigned long ulPort, unsigned long ulPin)
/* Get the GPIO pin number from a short Pin. */ unsigned long GPIOPinToPin(unsigned long ulPort, unsigned long ulPin)
{ (void)ulPort; xASSERT(GPIOBaseValid(ulPort)); return ulPin; }
coocox/cox
C++
Berkeley Software Distribution (BSD)
104
/* We don't save and restore VM_LOCKED here because pages are still on lru. In unmap path, pages might be scanned by reclaim and re-mlocked by try_to_{munlock|unmap} before we unmap and free them. This will result in freeing mlocked pages. */
void munlock_vma_pages_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
/* We don't save and restore VM_LOCKED here because pages are still on lru. In unmap path, pages might be scanned by reclaim and re-mlocked by try_to_{munlock|unmap} before we unmap and free them. This will result in freeing mlocked pages. */ void munlock_vma_pages_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
{ unsigned long addr; lru_add_drain(); vma->vm_flags &= ~VM_LOCKED; for (addr = start; addr < end; addr += PAGE_SIZE) { struct page *page; page = follow_page(vma, addr, FOLL_GET | FOLL_DUMP); if (page && !IS_ERR(page)) { lock_page(page); if (page->mapping) munlock_vma_page(page); unlock_page(page); put_page(page); } cond_resched(); } }
robutest/uclinux
C++
GPL-2.0
60
/* Send SEND_CSD command to get CSD register content from Card. */
static status_t SD_SendCsd(sd_card_t *card)
/* Send SEND_CSD command to get CSD register content from Card. */ static status_t SD_SendCsd(sd_card_t *card)
{ assert(card); HOST_TRANSFER content = {0}; HOST_COMMAND command = {0}; command.index = kSDMMC_SendCsd; command.argument = (card->relativeAddress << 16U); command.responseType = kCARD_ResponseTypeR2; content.command = &command; content.data = NULL; if (kStatus_Success == card->host.transfer(card->host.base, &content)) { memcpy(card->rawCsd, command.response, sizeof(card->rawCsd)); SD_DecodeCsd(card, command.response); return kStatus_Success; } return kStatus_SDMMC_TransferFailed; }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* Returns a negative error number on failure, or the number of bytes used / required on success. */
static int ext4_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
/* Returns a negative error number on failure, or the number of bytes used / required on success. */ static int ext4_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
{ int i_error, b_error; down_read(&EXT4_I(dentry->d_inode)->xattr_sem); i_error = ext4_xattr_ibody_list(dentry, buffer, buffer_size); if (i_error < 0) { b_error = 0; } else { if (buffer) { buffer += i_error; buffer_size -= i_error; } b_error = ext4_xattr_block_list(dentry, buffer, buffer_size); if (b_error < 0) i_error = 0; } up_read(&EXT4_I(dentry->d_inode)->xattr_sem); return i_error + b_error; }
robutest/uclinux
C++
GPL-2.0
60
/* Read the SEV Status MSR value from the workarea */
STATIC UINT32 EFIAPI InternalMemEncryptSevStatus(VOID)
/* Read the SEV Status MSR value from the workarea */ STATIC UINT32 EFIAPI InternalMemEncryptSevStatus(VOID)
{ SEC_SEV_ES_WORK_AREA *SevEsWorkArea; SevEsWorkArea = GetSevEsWorkArea (); if (SevEsWorkArea == NULL) { return 0; } return (UINT32)(UINTN)SevEsWorkArea->SevStatusMsrValue; }
tianocore/edk2
C++
Other
4,240
/* Deinitializes the QSPI peripheral registers to its default reset values. */
void QSPI_DeInit(void)
/* Deinitializes the QSPI peripheral registers to its default reset values. */ void QSPI_DeInit(void)
{ RCC_EnableAHBPeriphReset(RCC_AHB_PERIPH_QSPI, ENABLE); RCC_EnableAHBPeriphReset(RCC_AHB_PERIPH_QSPI, DISABLE); }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* The function is to Enable Bandgap Buffer or not. */
void SysCtlBandgapBufferEnable(xtBoolean bEnable)
/* The function is to Enable Bandgap Buffer or not. */ void SysCtlBandgapBufferEnable(xtBoolean bEnable)
{ if(bEnable) { xHWREGB(PMC_REGSC) |= PMC_REGSC_BGBE; } else { xHWREGB(PMC_REGSC) &= ~PMC_REGSC_BGBE; } }
coocox/cox
C++
Berkeley Software Distribution (BSD)
104
/* Write a data to the slave, when the master have obtained control of the bus, and waiting for all bus transmiton complete.(Write Step2) This function is always used in thread mode. */
unsigned long xI2CMasterWriteS2(unsigned long ulBase, unsigned char ucData, xtBoolean bEndTransmition)
/* Write a data to the slave, when the master have obtained control of the bus, and waiting for all bus transmiton complete.(Write Step2) This function is always used in thread mode. */ unsigned long xI2CMasterWriteS2(unsigned long ulBase, unsigned char ucData, xtBoolean bEndTransmition)
{ unsigned long ulStatus; xASSERT((ulBase == I2C0_BASE) || (ulBase == I2C1_BASE)); xI2CMasterWriteRequestS2(ulBase, ucData, xfalse); while (!(xHWREG(ulBase + I2C_O_CON) & I2C_CON_SI)); ulStatus = xHWREG(ulBase + I2C_O_STATUS) & I2C_STATUS_M; if(!(ulStatus == I2C_I2STAT_M_TX_DAT_ACK)) { ulStatus = xI2CMasterError(ulBase); I2CStopSend(ulBase); return ulStatus; } if(bEndTransmition) { I2CStopSend(ulBase); } return xI2C_MASTER_ERR_NONE; }
coocox/cox
C++
Berkeley Software Distribution (BSD)
104
/* Returns: (transfer none) (allow-none): the #GMainContext with which the source is associated, or NULL if the context has not yet been added to a source. */
GMainContext* g_source_get_context(GSource *source)
/* Returns: (transfer none) (allow-none): the #GMainContext with which the source is associated, or NULL if the context has not yet been added to a source. */ GMainContext* g_source_get_context(GSource *source)
{ g_return_val_if_fail (source->context != NULL || !SOURCE_DESTROYED (source), NULL); return source->context; }
seemoo-lab/nexmon
C++
GNU General Public License v3.0
2,330
/* Count the number of sensors attached to the system */
int SDL_NumSensors(void)
/* Count the number of sensors attached to the system */ int SDL_NumSensors(void)
{ int i, total_sensors = 0; SDL_LockSensors(); for (i = 0; i < SDL_arraysize(SDL_sensor_drivers); ++i) { total_sensors += SDL_sensor_drivers[i]->GetCount(); } SDL_UnlockSensors(); return total_sensors; }
alibaba/AliOS-Things
C++
Apache License 2.0
4,536
/* FMC program a word at the corresponding address. */
fmc_state_enum fmc_word_program(uint32_t address, uint32_t data)
/* FMC program a word at the corresponding address. */ fmc_state_enum fmc_word_program(uint32_t address, uint32_t data)
{ fmc_state_enum fmc_state = FMC_READY; fmc_state = fmc_ready_wait(FMC_TIMEOUT_COUNT); if(FMC_READY == fmc_state){ FMC_CTL |= FMC_CTL_PG; REG32(address) = data; fmc_state = fmc_ready_wait(FMC_TIMEOUT_COUNT); FMC_CTL &= ~FMC_CTL_PG; } return fmc_state; }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* Ensure that we unregister the bdi before kill_anon_super releases the device name */
static void nfs_put_super(struct super_block *)
/* Ensure that we unregister the bdi before kill_anon_super releases the device name */ static void nfs_put_super(struct super_block *)
{ struct nfs_server *server = NFS_SB(s); bdi_unregister(&server->backing_dev_info); }
robutest/uclinux
C++
GPL-2.0
60
/* E.g. "a/b" is an ancestor of "a/b/c" but not of "a/bc/d". As a special case, We treat s1 as ancestor of s2 if they are same! */
static int v9fs_path_is_ancestor(V9fsPath *s1, V9fsPath *s2)
/* E.g. "a/b" is an ancestor of "a/b/c" but not of "a/bc/d". As a special case, We treat s1 as ancestor of s2 if they are same! */ static int v9fs_path_is_ancestor(V9fsPath *s1, V9fsPath *s2)
{ if (!strncmp(s1->data, s2->data, s1->size - 1)) { if (s2->data[s1->size - 1] == '\0' || s2->data[s1->size - 1] == '/') { return 1; } } return 0; }
ve3wwg/teensy3_qemu
C++
Other
15
/* kick the ipppd on the device (wakes up daemon after B-channel connect) */
void isdn_ppp_wakeup_daemon(isdn_net_local *lp)
/* kick the ipppd on the device (wakes up daemon after B-channel connect) */ void isdn_ppp_wakeup_daemon(isdn_net_local *lp)
{ if (lp->ppp_slot < 0 || lp->ppp_slot >= ISDN_MAX_CHANNELS) { printk(KERN_ERR "%s: ppp_slot(%d) out of range\n", __func__, lp->ppp_slot); return; } ippp_table[lp->ppp_slot]->state = IPPP_OPEN | IPPP_CONNECT | IPPP_NOBLOCK; wake_up_interruptible(&ippp_table[lp->ppp_slot]->wq); }
robutest/uclinux
C++
GPL-2.0
60
/* This internal function only deal with Unicode character which maps to a valid hexadecimal ASII character, i.e. L'0' to L'9', L'a' to L'f' or L'A' to L'F'. For other Unicode character, the value returned does not make sense. */
UINTN EFIAPI InternalHexCharToUintn(IN CHAR16 Char)
/* This internal function only deal with Unicode character which maps to a valid hexadecimal ASII character, i.e. L'0' to L'9', L'a' to L'f' or L'A' to L'F'. For other Unicode character, the value returned does not make sense. */ UINTN EFIAPI InternalHexCharToUintn(IN CHAR16 Char)
{ if (InternalIsDecimalDigitCharacter (Char)) { return Char - L'0'; } return (10 + CharToUpper (Char) - L'A'); }
tianocore/edk2
C++
Other
4,240
/* Reads the next keystroke from the input device. */
EFI_STATUS EFIAPI USBKeyboardReadKeyStrokeEx(IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, OUT EFI_KEY_DATA *KeyData)
/* Reads the next keystroke from the input device. */ EFI_STATUS EFIAPI USBKeyboardReadKeyStrokeEx(IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, OUT EFI_KEY_DATA *KeyData)
{ USB_KB_DEV *UsbKeyboardDevice; if (KeyData == NULL) { return EFI_INVALID_PARAMETER; } UsbKeyboardDevice = TEXT_INPUT_EX_USB_KB_DEV_FROM_THIS (This); return USBKeyboardReadKeyStrokeWorker (UsbKeyboardDevice, KeyData); }
tianocore/edk2
C++
Other
4,240
/* Return with the sys. layer. (Same on every screen and it is above the normal screen and the top layer) */
lv_obj_t* lv_disp_get_layer_sys(lv_disp_t *disp)
/* Return with the sys. layer. (Same on every screen and it is above the normal screen and the top layer) */ lv_obj_t* lv_disp_get_layer_sys(lv_disp_t *disp)
{ if(!disp) disp = lv_disp_get_default(); if(!disp) { LV_LOG_WARN("lv_layer_sys: no display registered to get its sys. layer"); return NULL; } return disp->sys_layer; }
pikasTech/PikaPython
C++
MIT License
1,403
/* The user Entry Point for module EmuSimpleFileSystem. The user code starts with this function. */
EFI_STATUS EFIAPI InitializeEmuSimpleFileSystem(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
/* The user Entry Point for module EmuSimpleFileSystem. The user code starts with this function. */ EFI_STATUS EFIAPI InitializeEmuSimpleFileSystem(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
{ EFI_STATUS Status; Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gEmuSimpleFileSystemDriverBinding, ImageHandle, &gEmuSimpleFileSystemComponentName, &gEmuSimpleFileSystemComponentName2 ); ASSERT_EFI_ERROR (Status); return Status; }
tianocore/edk2
C++
Other
4,240
/* get the status of SDRAM device0 or device1 */
uint32_t exmc_sdram_bankstatus_get(uint32_t exmc_sdram_device)
/* get the status of SDRAM device0 or device1 */ uint32_t exmc_sdram_bankstatus_get(uint32_t exmc_sdram_device)
{ uint32_t sdstat = 0U; if(EXMC_SDRAM_DEVICE0 == exmc_sdram_device) { sdstat = ((uint32_t)(EXMC_SDSTAT & EXMC_SDSDAT_STA0) >> SDSTAT_STA0_OFFSET); } else { sdstat = ((uint32_t)(EXMC_SDSTAT & EXMC_SDSDAT_STA1) >> SDSTAT_STA1_OFFSET); } return sdstat; }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* Control frame filtering may be configured by ORing one of the following values into */
void EMACFrameFilterSet(uint32_t ui32Base, uint32_t ui32FilterOpts)
/* Control frame filtering may be configured by ORing one of the following values into */ void EMACFrameFilterSet(uint32_t ui32Base, uint32_t ui32FilterOpts)
{ ASSERT((ui32FilterOpts & ~VALID_FRMFILTER_FLAGS) == 0); HWREG(ui32Base + EMAC_O_FRAMEFLTR) = ((HWREG(ui32Base + EMAC_O_FRAMEFLTR) & ~VALID_FRMFILTER_FLAGS) | ui32FilterOpts); }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* Poll for all host side read activity to complete. Poll for all host side read activity to complete. Use this before calling */
void am_hal_ios_read_poll_complete(void)
/* Poll for all host side read activity to complete. Poll for all host side read activity to complete. Use this before calling */ void am_hal_ios_read_poll_complete(void)
{ while ( AM_REG(IOSLAVE, FUPD) & AM_REG_IOSLAVE_FUPD_IOREAD_M ); }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* setup the handler to be called from auto vector interrupts instead of the standard __m68k_handle_int(), it will be called with irq numbers in the range from IRQ_AUTO_1 - IRQ_AUTO_7. */
void __init m68k_setup_auto_interrupt(void(*handler)(unsigned int, struct pt_regs *))
/* setup the handler to be called from auto vector interrupts instead of the standard __m68k_handle_int(), it will be called with irq numbers in the range from IRQ_AUTO_1 - IRQ_AUTO_7. */ void __init m68k_setup_auto_interrupt(void(*handler)(unsigned int, struct pt_regs *))
{ if (handler) *auto_irqhandler_fixup = (u32)handler; flush_icache(); }
EmcraftSystems/linux-emcraft
C++
Other
266
/* Enables or disables the NSS pulse management mode. */
void SPI_NSSPulseModeCmd(SPI_TypeDef *SPIx, FunctionalState NewState)
/* Enables or disables the NSS pulse management mode. */ void SPI_NSSPulseModeCmd(SPI_TypeDef *SPIx, FunctionalState NewState)
{ assert_param(IS_SPI_ALL_PERIPH(SPIx)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { SPIx->CR2 |= SPI_CR2_NSSP; } else { SPIx->CR2 &= (uint16_t)~((uint16_t)SPI_CR2_NSSP); } }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* Get the next possible full path pointing to the load option. The routine doesn't guarantee the returned full path points to an existing file, and it also doesn't guarantee the existing file is a valid load option. BmGetNextLoadOptionBuffer() guarantees. */
EFI_DEVICE_PATH_PROTOCOL* EFIAPI EfiBootManagerGetNextLoadOptionDevicePath(IN EFI_DEVICE_PATH_PROTOCOL *FilePath, IN EFI_DEVICE_PATH_PROTOCOL *FullPath)
/* Get the next possible full path pointing to the load option. The routine doesn't guarantee the returned full path points to an existing file, and it also doesn't guarantee the existing file is a valid load option. BmGetNextLoadOptionBuffer() guarantees. */ EFI_DEVICE_PATH_PROTOCOL* EFIAPI EfiBootManagerGetNextLoadOptionDevicePath(IN EFI_DEVICE_PATH_PROTOCOL *FilePath, IN EFI_DEVICE_PATH_PROTOCOL *FullPath)
{ return BmGetNextLoadOptionDevicePath (FilePath, FullPath); }
tianocore/edk2
C++
Other
4,240
/* This function allows userspace PCI config accesses to resume. */
void pci_unblock_user_cfg_access(struct pci_dev *dev)
/* This function allows userspace PCI config accesses to resume. */ void pci_unblock_user_cfg_access(struct pci_dev *dev)
{ unsigned long flags; spin_lock_irqsave(&pci_lock, flags); WARN_ON(!dev->block_ucfg_access); dev->block_ucfg_access = 0; wake_up_all(&pci_ucfg_wait); spin_unlock_irqrestore(&pci_lock, flags); }
robutest/uclinux
C++
GPL-2.0
60
/* param base eDMA peripheral base address. param channel eDMA channel number param config A pointer to the channel preemption configuration structure. */
void EDMA_SetChannelPreemptionConfig(DMA_Type *base, uint32_t channel, const edma_channel_Preemption_config_t *config)
/* param base eDMA peripheral base address. param channel eDMA channel number param config A pointer to the channel preemption configuration structure. */ void EDMA_SetChannelPreemptionConfig(DMA_Type *base, uint32_t channel, const edma_channel_Preemption_config_t *config)
{ assert(channel < (uint32_t)FSL_FEATURE_EDMA_MODULE_CHANNEL); assert(config != NULL); bool tmpEnablePreemptAbility = config->enablePreemptAbility; bool tmpEnableChannelPreemption = config->enableChannelPreemption; uint8_t tmpChannelPriority = config->channelPriority; volatile uint8_t *tmpReg = &base->DCHPRI3; ((volatile uint8_t *)tmpReg)[DMA_DCHPRI_INDEX(channel)] = (DMA_DCHPRI0_DPA((true == tmpEnablePreemptAbility ? 0U : 1U)) | DMA_DCHPRI0_ECP((true == tmpEnableChannelPreemption ? 1U : 0U)) | DMA_DCHPRI0_CHPRI(tmpChannelPriority)); }
eclipse-threadx/getting-started
C++
Other
310
/* This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned. */
BOOLEAN EFIAPI ReportErrorCodeEnabled(VOID)
/* This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned. */ BOOLEAN EFIAPI ReportErrorCodeEnabled(VOID)
{ return (BOOLEAN)((PcdGet8 (PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED) != 0); }
tianocore/edk2
C++
Other
4,240
/* Disable the specified ADC injected channels conversion through. */
void ADC_DisableExternalTrigInjectedConv(ADC_T *adc)
/* Disable the specified ADC injected channels conversion through. */ void ADC_DisableExternalTrigInjectedConv(ADC_T *adc)
{ adc->CTRL2_B.INJEXTTRGEN = BIT_RESET; }
pikasTech/PikaPython
C++
MIT License
1,403
/* crc input is CRC32_INIT_VALUE for a fresh start, or previous return value if accumulating over multiple pieces. */
uint32 hndcrc32(uint8 *pdata, uint nbytes, uint32 crc)
/* crc input is CRC32_INIT_VALUE for a fresh start, or previous return value if accumulating over multiple pieces. */ uint32 hndcrc32(uint8 *pdata, uint nbytes, uint32 crc)
{ uint8 *pend; pend = pdata + nbytes; while (pdata < pend) CRC_INNER_LOOP(32, crc, *pdata++); return crc; }
seemoo-lab/nexmon
C++
GNU General Public License v3.0
2,330
/* Function for writing data to flash upon store command. Function for writing data to flash upon executing store command. Data is written to flash in reverse order, meaning starting at the end. If the data that is to be written is greater than the flash page size, it will be fragmented to fit the flash page size. */
static void store_cmd_flash_write_execute(void)
/* Function for writing data to flash upon store command. Function for writing data to flash upon executing store command. Data is written to flash in reverse order, meaning starting at the end. If the data that is to be written is greater than the flash page size, it will be fragmented to fit the flash page size. */ static void store_cmd_flash_write_execute(void)
{ const cmd_queue_element_t * p_cmd = &m_cmd_queue.cmd[m_cmd_queue.rp]; if (p_cmd->size > SOC_MAX_WRITE_SIZE) { const uint32_t offset = p_cmd->size - PSTORAGE_FLASH_PAGE_SIZE; flash_write((uint32_t *)(p_cmd->storage_addr.block_id + p_cmd->offset + offset), (uint32_t *)(p_cmd->p_data_addr + offset), PSTORAGE_FLASH_PAGE_SIZE / sizeof(uint32_t)); m_num_of_bytes_written = PSTORAGE_FLASH_PAGE_SIZE; } else { flash_write((uint32_t *)(p_cmd->storage_addr.block_id + p_cmd->offset), (uint32_t *)(p_cmd->p_data_addr), p_cmd->size / sizeof(uint32_t)); m_num_of_bytes_written = p_cmd->size; } }
labapart/polymcu
C++
null
201
/* ALI pirq entries are damn ugly, and completely undocumented. This has been figured out from pirq tables, and it's not a pretty picture. */
static int pirq_ali_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
/* ALI pirq entries are damn ugly, and completely undocumented. This has been figured out from pirq tables, and it's not a pretty picture. */ static int pirq_ali_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
{ static const unsigned char irqmap[16] = { 0, 9, 3, 10, 4, 5, 7, 6, 1, 11, 0, 12, 0, 14, 0, 15 }; WARN_ON_ONCE(pirq > 16); return irqmap[read_config_nybble(router, 0x48, pirq-1)]; }
EmcraftSystems/linux-emcraft
C++
Other
266
/* This function caches the found IPMI LAN channel. So we don't have to sedn IPMI commands again if the USB NIC is connected later. */
EFI_STATUS CacheIpmiLanMac(IN UINT8 ChannelNum, IN EFI_MAC_ADDRESS *IpmiLanChannelMacAddress, IN UINT8 IpmiLanMacAddressSize)
/* This function caches the found IPMI LAN channel. So we don't have to sedn IPMI commands again if the USB NIC is connected later. */ EFI_STATUS CacheIpmiLanMac(IN UINT8 ChannelNum, IN EFI_MAC_ADDRESS *IpmiLanChannelMacAddress, IN UINT8 IpmiLanMacAddressSize)
{ BMC_IPMI_LAN_CHANNEL_INFO *ChannelInfo; ChannelInfo = (BMC_IPMI_LAN_CHANNEL_INFO *)AllocateZeroPool (sizeof (BMC_IPMI_LAN_CHANNEL_INFO)); if (ChannelInfo == NULL) { return EFI_OUT_OF_RESOURCES; } ChannelInfo->Channel = ChannelNum; CopyMem ((VOID *)&ChannelInfo->MacAddress.Addr, (VOID *)IpmiLanChannelMacAddress->Addr, IpmiLanMacAddressSize); ChannelInfo->MacAddressSize = IpmiLanMacAddressSize; InitializeListHead (&ChannelInfo->NextInstance); InsertTailList (&mBmcIpmiLan, &ChannelInfo->NextInstance); return EFI_SUCCESS; }
tianocore/edk2
C++
Other
4,240
/* Initializes the global flash properties structure members. This function checks and initializes the Flash module for the other Flash APIs. */
status_t FLASH_Init(flash_config_t *config)
/* Initializes the global flash properties structure members. This function checks and initializes the Flash module for the other Flash APIs. */ status_t FLASH_Init(flash_config_t *config)
{ status_t status; config->modeConfig.sysFreqInMHz = (uint32_t)kSysToFlashFreq_defaultInMHz; if (get_rom_api_version() == 1u) { status = VERSION1_FLASH_API_TREE->flash_init(config); } else { status = VERSION0_FLASH_API_TREE->flash_init(config); } if (config->PFlashTotalSize == 0xA0000U) { config->PFlashTotalSize -= 17U * config->PFlashPageSize; } return status; }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* ubifs_pack_ltab - pack the LPT's own lprops table. */
void ubifs_pack_ltab(struct ubifs_info *c, void *buf, struct ubifs_lpt_lprops *ltab)
/* ubifs_pack_ltab - pack the LPT's own lprops table. */ void ubifs_pack_ltab(struct ubifs_info *c, void *buf, struct ubifs_lpt_lprops *ltab)
{ uint8_t *addr = buf + UBIFS_LPT_CRC_BYTES; int i, pos = 0; uint16_t crc; pack_bits(&addr, &pos, UBIFS_LPT_LTAB, UBIFS_LPT_TYPE_BITS); for (i = 0; i < c->lpt_lebs; i++) { pack_bits(&addr, &pos, ltab[i].free, c->lpt_spc_bits); pack_bits(&addr, &pos, ltab[i].dirty, c->lpt_spc_bits); } crc = crc16(-1, buf + UBIFS_LPT_CRC_BYTES, c->ltab_sz - UBIFS_LPT_CRC_BYTES); addr = buf; pos = 0; pack_bits(&addr, &pos, crc, UBIFS_LPT_CRC_BITS); }
robutest/uclinux
C++
GPL-2.0
60
/* Return: false - we are done with this request true - still buffers pending for this request */
bool blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
/* Return: false - we are done with this request true - still buffers pending for this request */ bool blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
{ return blk_end_bidi_request(rq, error, nr_bytes, 0); }
EmcraftSystems/linux-emcraft
C++
Other
266
/* UART MSP De-Initialization This function freeze the hardware resources used in this example. */
void HAL_UART_MspDeInit(UART_HandleTypeDef *huart)
/* UART MSP De-Initialization This function freeze the hardware resources used in this example. */ void HAL_UART_MspDeInit(UART_HandleTypeDef *huart)
{ if(huart->Instance==USART1) { __HAL_RCC_USART1_CLK_DISABLE(); HAL_GPIO_DeInit(GPIOA, GPIO_PIN_10|GPIO_PIN_9); } }
alibaba/AliOS-Things
C++
Apache License 2.0
4,536
/* Writes and the current GDTR descriptor specified by Gdtr. This function is only available on IA-32 and x64. */
VOID EFIAPI InternalX86WriteGdtr(IN CONST IA32_DESCRIPTOR *Gdtr)
/* Writes and the current GDTR descriptor specified by Gdtr. This function is only available on IA-32 and x64. */ VOID EFIAPI InternalX86WriteGdtr(IN CONST IA32_DESCRIPTOR *Gdtr)
{ _asm { mov eax, Gdtr lgdt fword ptr [eax] } }
tianocore/edk2
C++
Other
4,240
/* Checks if the flash sector is already completely erased. */
static blt_bool FlashEmptyCheckSector(blt_int8u sector_idx)
/* Checks if the flash sector is already completely erased. */ static blt_bool FlashEmptyCheckSector(blt_int8u sector_idx)
{ blt_bool result = BLT_TRUE; blt_addr sectorAddr; blt_int32u sectorSize; blt_int32u wordCnt; blt_int32u volatile const * wordPtr; sectorAddr = flashLayout[sector_idx].sector_start; sectorSize = flashLayout[sector_idx].sector_size; ASSERT_RT(((sectorAddr % sizeof(blt_int32u)) == 0) && ((sectorSize % sizeof(blt_int32u)) == 0)); wordPtr = (blt_int32u volatile const *)sectorAddr; for (wordCnt = 0; wordCnt < (sectorSize/sizeof(blt_int32u)); wordCnt++) { if ((wordCnt % 256) == 0) { CopService(); } if (*wordPtr != 0xFFFFFFFFu) { result = BLT_FALSE; break; } wordPtr++; } return result; }
feaser/openblt
C++
GNU General Public License v3.0
601
/* Returns: (skip): TRUE if the call succeded, FALSE if @error is set. */
gboolean _g_freedesktop_dbus_call_list_names_finish(_GFreedesktopDBus *proxy, gchar ***out_names, GAsyncResult *res, GError **error)
/* Returns: (skip): TRUE if the call succeded, FALSE if @error is set. */ gboolean _g_freedesktop_dbus_call_list_names_finish(_GFreedesktopDBus *proxy, gchar ***out_names, GAsyncResult *res, GError **error)
{ GVariant *_ret; _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); if (_ret == NULL) goto _out; g_variant_get (_ret, "(^as)", out_names); g_variant_unref (_ret); _out: return _ret != NULL; }
seemoo-lab/nexmon
C++
GNU General Public License v3.0
2,330
/* analog_close() is a callback from the input close routine. */
static void analog_close(struct input_dev *dev)
/* analog_close() is a callback from the input close routine. */ static void analog_close(struct input_dev *dev)
{ struct analog_port *port = input_get_drvdata(dev); gameport_stop_polling(port->gameport); }
robutest/uclinux
C++
GPL-2.0
60
/* Resets the RCC clock configuration to the default reset state. */
void RCC_DeInit(void)
/* Resets the RCC clock configuration to the default reset state. */ void RCC_DeInit(void)
{ RCC->CR |= (uint32_t)0x00000001; RCC->CFGR &= (uint32_t)0x00FF0000; RCC->CR &= (uint32_t)0xFEF6FFFF; RCC->CR &= (uint32_t)0xFFFBFFFF; RCC->CFGR &= (uint32_t)0xFF80FFFF; RCC->CFGR2 &= (uint32_t)0xFFFFFFF0; RCC->CFGR3 &= (uint32_t)0xFFF0F8C; RCC->CIR = 0x00000000; }
avem-labs/Avem
C++
MIT License
1,752
/* Converts network protocol string to its text representation. */
VOID CatNetworkProtocol(IN OUT POOL_PRINT *Str, IN UINT16 Protocol)
/* Converts network protocol string to its text representation. */ VOID CatNetworkProtocol(IN OUT POOL_PRINT *Str, IN UINT16 Protocol)
{ if (Protocol == RFC_1700_TCP_PROTOCOL) { UefiDevicePathLibCatPrint (Str, L"TCP"); } else if (Protocol == RFC_1700_UDP_PROTOCOL) { UefiDevicePathLibCatPrint (Str, L"UDP"); } else { UefiDevicePathLibCatPrint (Str, L"0x%x", Protocol); } }
tianocore/edk2
C++
Other
4,240
/* Check if the RTOS kernel is already started. */
int32_t osKernelRunning(void)
/* Check if the RTOS kernel is already started. */ int32_t osKernelRunning(void)
{ return (rt_thread_self() != RT_NULL) ? 1 : 0; }
armink/FreeModbus_Slave-Master-RTT-STM32
C++
Other
1,477
/* Allocate a framebuffer and an Area Descriptor that points to it. Both are created in the same memory block. The Area Descriptor is updated to point to the framebuffer memory. Memory is aligned as needed. */
static struct diu_ad* allocate_fb(unsigned int xres, unsigned int yres, unsigned int depth, char **fb)
/* Allocate a framebuffer and an Area Descriptor that points to it. Both are created in the same memory block. The Area Descriptor is updated to point to the framebuffer memory. Memory is aligned as needed. */ static struct diu_ad* allocate_fb(unsigned int xres, unsigned int yres, unsigned int depth, char **fb)
{ unsigned long size = xres * yres * depth; struct diu_addr addr; struct diu_ad *ad; size_t ad_size = roundup(sizeof(struct diu_ad), 32); if (allocate_buf(&addr, ad_size + size, 32) < 0) return NULL; ad = addr.vaddr; ad->addr = cpu_to_le32(addr.paddr + ad_size); ad->aoi_size = cpu_to_le32((yres << 16) | xres); ad->src_size_g_alpha = cpu_to_le32((yres << 12) | xres); ad->offset_xyi = 0; ad->offset_xyd = 0; if (fb) *fb = addr.vaddr + ad_size; return ad; }
4ms/stm32mp1-baremetal
C++
Other
137
/* Performs checksum calculation and validates the EEPROM checksum. If the caller does not need checksum_val, the value can be NULL. */
s32 ixgbe_validate_eeprom_checksum_generic(struct ixgbe_hw *hw, u16 *checksum_val)
/* Performs checksum calculation and validates the EEPROM checksum. If the caller does not need checksum_val, the value can be NULL. */ s32 ixgbe_validate_eeprom_checksum_generic(struct ixgbe_hw *hw, u16 *checksum_val)
{ s32 status; u16 checksum; u16 read_checksum = 0; status = hw->eeprom.ops.read(hw, 0, &checksum); if (status == 0) { checksum = ixgbe_calc_eeprom_checksum(hw); hw->eeprom.ops.read(hw, IXGBE_EEPROM_CHECKSUM, &read_checksum); if (read_checksum != checksum) status = IXGBE_ERR_EEPROM_CHECKSUM; if (checksum_val) *checksum_val = checksum; } else { hw_dbg(hw, "EEPROM read failed\n"); } return status; }
robutest/uclinux
C++
GPL-2.0
60
/* Change Logs: Date Author Notes tangzz98 the first version */
void mprotect_example_exception_hook(rt_mem_exception_info_t *info)
/* Change Logs: Date Author Notes tangzz98 the first version */ void mprotect_example_exception_hook(rt_mem_exception_info_t *info)
{ rt_kprintf("Memory manage exception\n"); rt_kprintf("Faulting thread: %s\n", info->thread->parent.name); rt_kprintf("Faulting address: %p\n", info->addr); rt_kprintf("Faulting region: %p - %p", info->region.start, (void *)((rt_size_t)info->region.start + info->region.size)); }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* This is only for internal list manipulation where we know the prev/next entries already! */
static void __list_del(struct list_head *prev, struct list_head *next)
/* This is only for internal list manipulation where we know the prev/next entries already! */ static void __list_del(struct list_head *prev, struct list_head *next)
{ next->prev = prev; prev->next = next; }
robutest/uclinux
C++
GPL-2.0
60
/* Report an error in command-line arguments. If we're a capture child, send a message back to the parent, otherwise just print it. */
static void dumpcap_cmdarg_err(const char *fmt, va_list ap)
/* Report an error in command-line arguments. If we're a capture child, send a message back to the parent, otherwise just print it. */ static void dumpcap_cmdarg_err(const char *fmt, va_list ap)
{ if (capture_child) { gchar *msg; msg = g_strdup_vprintf(fmt, ap); sync_pipe_errmsg_to_parent(2, msg, ""); g_free(msg); } else { fprintf(stderr, "dumpcap: "); vfprintf(stderr, fmt, ap); fprintf(stderr, "\n"); } }
seemoo-lab/nexmon
C++
GNU General Public License v3.0
2,330
/* Airpcap wrapper, used to set the decryption enabling of an airpcap adapter */
gboolean airpcap_if_set_decryption_state(PAirpcapHandle ah, AirpcapDecryptionState Enable)
/* Airpcap wrapper, used to set the decryption enabling of an airpcap adapter */ gboolean airpcap_if_set_decryption_state(PAirpcapHandle ah, AirpcapDecryptionState Enable)
{ if (!AirpcapLoaded) return FALSE; return g_PAirpcapSetDecryptionState(ah,Enable); }
seemoo-lab/nexmon
C++
GNU General Public License v3.0
2,330
/* AmebaD don't support deep sleep api, please refer to AN400 power save Section. */
void deepsleep_ex(uint32_t wakeup_event, uint32_t sleep_duration)
/* AmebaD don't support deep sleep api, please refer to AN400 power save Section. */ void deepsleep_ex(uint32_t wakeup_event, uint32_t sleep_duration)
{ ( void ) wakeup_event; ( void ) sleep_duration; assert_param(0); }
alibaba/AliOS-Things
C++
Apache License 2.0
4,536
/* This function returns the driver version number at runtime. */
uint32_t R_CMT_GetVersion(void)
/* This function returns the driver version number at runtime. */ uint32_t R_CMT_GetVersion(void)
{ return ((((uint32_t)CMT_RX_VERSION_MAJOR) << 16) | (uint32_t)CMT_RX_VERSION_MINOR); }
eclipse-threadx/getting-started
C++
Other
310
/* brief Return Frequency of SAI MCLK return Frequency of SAI MCLK */
uint32_t CLOCK_GetSaiMclkFreq(uint32_t id)
/* brief Return Frequency of SAI MCLK return Frequency of SAI MCLK */ uint32_t CLOCK_GetSaiMclkFreq(uint32_t id)
{ return s_Sai_Mclk_Freq[id]; }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* Free previously allocated USBD event. Should be called after usbd_evt_get(). */
static void usbd_evt_free(struct usbd_event *ev)
/* Free previously allocated USBD event. Should be called after usbd_evt_get(). */ static void usbd_evt_free(struct usbd_event *ev)
{ k_mem_slab_free(&fifo_elem_slab, (void *)ev->block.data); }
zephyrproject-rtos/zephyr
C++
Apache License 2.0
9,573
/* Decode one descriptor and return address of next descriptor. */
static unsigned char* unw_decode(unsigned char *dp, int inside_body, void *arg)
/* Decode one descriptor and return address of next descriptor. */ static unsigned char* unw_decode(unsigned char *dp, int inside_body, void *arg)
{ unw_decoder decoder; unsigned char code; code = *dp++; decoder = unw_decode_table[inside_body][code >> 5]; dp = (*decoder) (dp, code, arg); return dp; }
EmcraftSystems/linux-emcraft
C++
Other
266
/* Configure PCM(TDM) function parameters, such as channel width, channel number and sync pulse width. */
void I2S_ConfigureTDM(I2S_T *i2s, uint32_t u32ChannelWidth, uint32_t u32ChannelNum, uint32_t u32SyncWidth)
/* Configure PCM(TDM) function parameters, such as channel width, channel number and sync pulse width. */ void I2S_ConfigureTDM(I2S_T *i2s, uint32_t u32ChannelWidth, uint32_t u32ChannelNum, uint32_t u32SyncWidth)
{ i2s->CTL0 = ((i2s->CTL0 & ~(I2S_CTL0_TDMCHNUM_Msk | I2S_CTL0_CHWIDTH_Msk | I2S_CTL0_PCMSYNC_Msk)) | (u32ChannelWidth << I2S_CTL0_CHWIDTH_Pos) | (u32ChannelNum << I2S_CTL0_TDMCHNUM_Pos) | (u32SyncWidth << I2S_CTL0_PCMSYNC_Pos)); }
RT-Thread/rt-thread
C++
Apache License 2.0
9,535
/* there was a hangup on the netdevice force wakeup of the ippp device go into 'device waits for release' state */
static int isdn_ppp_closewait(int slot)
/* there was a hangup on the netdevice force wakeup of the ippp device go into 'device waits for release' state */ static int isdn_ppp_closewait(int slot)
{ struct ippp_struct *is; if (slot < 0 || slot >= ISDN_MAX_CHANNELS) { printk(KERN_ERR "%s: slot(%d) out of range\n", __func__, slot); return 0; } is = ippp_table[slot]; if (is->state) wake_up_interruptible(&is->wq); is->state = IPPP_CLOSEWAIT; return 1; }
robutest/uclinux
C++
GPL-2.0
60
/* Check if there is an error in Status Register. */
EFI_STATUS CheckErrorStatus(IN ATAPI_BLK_IO_DEV *AtapiBlkIoDev, IN UINT16 StatusReg)
/* Check if there is an error in Status Register. */ EFI_STATUS CheckErrorStatus(IN ATAPI_BLK_IO_DEV *AtapiBlkIoDev, IN UINT16 StatusReg)
{ UINT8 StatusValue; StatusValue = IoRead8 (StatusReg); if ((StatusValue & (ATA_STSREG_ERR | ATA_STSREG_DWF | ATA_STSREG_CORR)) == 0) { return EFI_SUCCESS; } return EFI_DEVICE_ERROR; }
tianocore/edk2
C++
Other
4,240
/* Fills USI_LPUARTInitStruct member low power rx path related with its default value. */
void USI_UARTLPRxStructInit(USI_LPUARTInitTypeDef *USI_LPUARTInitStruct)
/* Fills USI_LPUARTInitStruct member low power rx path related with its default value. */ void USI_UARTLPRxStructInit(USI_LPUARTInitTypeDef *USI_LPUARTInitStruct)
{ USI_LPUARTInitStruct->USI_LPUARTBitNumThres = 100; USI_LPUARTInitStruct->USI_LPUARTOscPerbitUpdCtrl = ENABLE; }
alibaba/AliOS-Things
C++
Apache License 2.0
4,536
/* ask the device how many channels are present and how many CSROWS as well */
static void i5000_get_dimm_and_channel_counts(struct pci_dev *pdev, int *num_dimms_per_channel, int *num_channels)
/* ask the device how many channels are present and how many CSROWS as well */ static void i5000_get_dimm_and_channel_counts(struct pci_dev *pdev, int *num_dimms_per_channel, int *num_channels)
{ u8 value; pci_read_config_byte(pdev, MAXDIMMPERCH, &value); *num_dimms_per_channel = (int)value *2; pci_read_config_byte(pdev, MAXCH, &value); *num_channels = (int)value; }
robutest/uclinux
C++
GPL-2.0
60
/* Clear AON Sleep Timer module instance interrupt. This flag will be cleared automatically once the IRQ has been seen on the sleep clock. */
void aon_sleep_timer_clear_interrup(void)
/* Clear AON Sleep Timer module instance interrupt. This flag will be cleared automatically once the IRQ has been seen on the sleep clock. */ void aon_sleep_timer_clear_interrup(void)
{ AON_SLEEP_TIMER0->CONTROL.reg |= AON_SLEEP_TIMER_CONTROL_IRQ_CLEAR; }
memfault/zero-to-main
C++
null
200
/* Reads a compressed 16-bit quantity (PDU Type.1). Since the value is variable length, the new offset is returned. The value can also be returned, along with the size, although NULL is allowed for those parameters. */
static gint read_c2(tvbuff_t *tvb, gint offset, guint16 *v, gint *len)
/* Reads a compressed 16-bit quantity (PDU Type.1). Since the value is variable length, the new offset is returned. The value can also be returned, along with the size, although NULL is allowed for those parameters. */ static gint read_c2(tvbuff_t *tvb, gint offset, guint16 *v, gint *len)
{ guint16 val = 0; guint8 b = tvb_get_guint8(tvb, offset++); if (b & 0x80) { b = b & 0x7F; val = (b << 8) | tvb_get_guint8(tvb, offset++); if (L) *L = 2; } else { val = b; if (L) *L = 1; } if (v) *v = val; return offset; }
seemoo-lab/nexmon
C++
GNU General Public License v3.0
2,330
/* By default we use the rate set by the bootloader. You can override this with mpurate= cmdline option. */
static int __init omap_clk_setup(char *str)
/* By default we use the rate set by the bootloader. You can override this with mpurate= cmdline option. */ static int __init omap_clk_setup(char *str)
{ get_option(&str, &mpurate); if (!mpurate) return 1; if (mpurate < 1000) mpurate *= 1000000; return 1; }
EmcraftSystems/linux-emcraft
C++
Other
266
/* This deletes a driver "instance". The device is de-registered with Card Services. If it has been released, all local data structures are freed. Otherwise, the structures will be freed when the device is released. */
static void ipwireless_detach(struct pcmcia_device *link)
/* This deletes a driver "instance". The device is de-registered with Card Services. If it has been released, all local data structures are freed. Otherwise, the structures will be freed when the device is released. */ static void ipwireless_detach(struct pcmcia_device *link)
{ struct ipw_dev *ipw = link->priv; release_ipwireless(ipw); if (ipw->tty != NULL) ipwireless_tty_free(ipw->tty); if (ipw->network != NULL) ipwireless_network_free(ipw->network); if (ipw->hardware != NULL) ipwireless_hardware_free(ipw->hardware); kfree(ipw); }
robutest/uclinux
C++
GPL-2.0
60
/* Returns: TRUE if the key was found in the #GTree */
gboolean g_tree_lookup_extended(GTree *tree, gconstpointer lookup_key, gpointer *orig_key, gpointer *value)
/* Returns: TRUE if the key was found in the #GTree */ gboolean g_tree_lookup_extended(GTree *tree, gconstpointer lookup_key, gpointer *orig_key, gpointer *value)
{ GTreeNode *node; g_return_val_if_fail (tree != NULL, FALSE); node = g_tree_find_node (tree, lookup_key); if (node) { if (orig_key) *orig_key = node->key; if (value) *value = node->value; return TRUE; } else return FALSE; }
seemoo-lab/nexmon
C++
GNU General Public License v3.0
2,330
/* Returns the first element in the list, or NULL */
xmlLinkPtr xmlListFront(xmlListPtr l)
/* Returns the first element in the list, or NULL */ xmlLinkPtr xmlListFront(xmlListPtr l)
{ if (l == NULL) return(NULL); return (l->sentinel->next); }
seemoo-lab/nexmon
C++
GNU General Public License v3.0
2,330