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 |
|---|---|---|---|---|---|---|---|
/* ccw_device_clear() calls csch on @cdev's subchannel. Returns: %0 on success, -ENODEV on device not operational, -EINVAL on invalid device state. Context: Interrupts disabled, ccw device lock held */ | int ccw_device_clear(struct ccw_device *cdev, unsigned long intparm) | /* ccw_device_clear() calls csch on @cdev's subchannel. Returns: %0 on success, -ENODEV on device not operational, -EINVAL on invalid device state. Context: Interrupts disabled, ccw device lock held */
int ccw_device_clear(struct ccw_device *cdev, unsigned long intparm) | {
struct subchannel *sch;
int ret;
if (!cdev || !cdev->dev.parent)
return -ENODEV;
sch = to_subchannel(cdev->dev.parent);
if (!sch->schib.pmcw.ena)
return -EINVAL;
if (cdev->private->state == DEV_STATE_NOT_OPER)
return -ENODEV;
if (cdev->private->state != DEV_STATE_ONLINE &&
cdev->private->state != DE... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Checks whether the specified SPI flag is set or not. */ | FlagStatus SPI_GetFlagStatus(SPI_TypeDef *SPIx, uint16_t SPI_FLAG) | /* Checks whether the specified SPI flag is set or not. */
FlagStatus SPI_GetFlagStatus(SPI_TypeDef *SPIx, uint16_t SPI_FLAG) | {
FlagStatus bitstatus = RESET;
assert_param(IS_SPI_ALL_PERIPH(SPIx));
assert_param(IS_SPI_GET_FLAG(SPI_FLAG));
if ((SPIx->CSTAT & SPI_FLAG) != (uint16_t)RESET)
{
bitstatus = SET;
}
else
{
bitstatus = RESET;
}
return bitstatus;
} | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* This service enables PEIMs to replace an entry in the PPI database with an alternate entry. */ | EFI_STATUS EFIAPI PeiServicesReInstallPpi(IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi, IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi) | /* This service enables PEIMs to replace an entry in the PPI database with an alternate entry. */
EFI_STATUS EFIAPI PeiServicesReInstallPpi(IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi, IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi) | {
ASSERT (FALSE);
return EFI_OUT_OF_RESOURCES;
} | tianocore/edk2 | C++ | Other | 4,240 |
/* OMAP main camera system Reset camera block to power-on state. */ | static void omap24xxcam_poweron_reset(struct omap24xxcam_device *cam) | /* OMAP main camera system Reset camera block to power-on state. */
static void omap24xxcam_poweron_reset(struct omap24xxcam_device *cam) | {
int max_loop = RESET_TIMEOUT_NS;
omap24xxcam_reg_out(cam->mmio_base,
CAM_SYSCONFIG,
CAM_SYSCONFIG_SOFTRESET);
while (!(omap24xxcam_reg_in(cam->mmio_base, CAM_SYSSTATUS)
& CAM_SYSSTATUS_RESETDONE)
&& --max_loop) {
ndelay(1);
}
if (!(omap24xxcam_reg_in(cam->mmio_base, CAM_SYSSTATUS)
... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* The function is to Enable or Disbale Reset Pin Filter Select in Stop Mode. */ | void SysCtlResetPinFilterStopModeEnable(xtBoolean bEnable) | /* The function is to Enable or Disbale Reset Pin Filter Select in Stop Mode. */
void SysCtlResetPinFilterStopModeEnable(xtBoolean bEnable) | {
if(bEnable)
{
xHWREGB(RCM_RPFC) |= RCM_RPFC_RSTFLTSRW_LPO;
}
else
{
xHWREGB(RCM_RPFC) &= ~RCM_RPFC_RSTFLTSRW_LPO;
}
} | coocox/cox | C++ | Berkeley Software Distribution (BSD) | 104 |
/* Returns: TRUE if the mount point is a loopback. FALSE otherwise. */ | gboolean g_unix_mount_point_is_loopback(GUnixMountPoint *mount_point) | /* Returns: TRUE if the mount point is a loopback. FALSE otherwise. */
gboolean g_unix_mount_point_is_loopback(GUnixMountPoint *mount_point) | {
g_return_val_if_fail (mount_point != NULL, FALSE);
return mount_point->is_loopback;
} | seemoo-lab/nexmon | C++ | GNU General Public License v3.0 | 2,330 |
/* Get CPU information for use by the procfs. */ | static int show_cpuinfo(struct seq_file *m, void *v) | /* Get CPU information for use by the procfs. */
static int show_cpuinfo(struct seq_file *m, void *v) | {
char *cpu;
int mode;
u_long clockfreq;
cpu = CPU;
mode = *(volatile unsigned char *)MDCR & 0x07;
clockfreq = CONFIG_CPU_CLOCK;
seq_printf(m, "CPU:\t\t%s (mode:%d)\n"
"Clock:\t\t%lu.%1luMHz\n"
"BogoMips:\t%lu.%02lu\n"
"Calibration:\t%lu loops\n",
cpu,mode,
c... | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* look up the first VMA in which addr resides, NULL if none */ | struct vm_area_struct* find_vma(struct mm_struct *mm, unsigned long addr) | /* look up the first VMA in which addr resides, NULL if none */
struct vm_area_struct* find_vma(struct mm_struct *mm, unsigned long addr) | {
struct vm_area_struct *vma;
struct rb_node *n = mm->mm_rb.rb_node;
vma = mm->mmap_cache;
if (vma && vma->vm_start <= addr && vma->vm_end > addr)
return vma;
for (n = rb_first(&mm->mm_rb); n; n = rb_next(n)) {
vma = rb_entry(n, struct vm_area_struct, vm_rb);
if (vma->vm_start > addr)
return NULL;
if (v... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Set the elapsed time based on the given instance and the pointer to the elapsed time option. */ | VOID SetElapsedTime(IN UINT16 *Elapsed, IN DHCP6_INSTANCE *Instance) | /* Set the elapsed time based on the given instance and the pointer to the elapsed time option. */
VOID SetElapsedTime(IN UINT16 *Elapsed, IN DHCP6_INSTANCE *Instance) | {
EFI_TIME Time;
UINT64 CurrentStamp;
UINT64 ElapsedTimeValue;
gRT->GetTime (&Time, NULL);
CurrentStamp = MultU64x32 (
((((UINT32)(Time.Year - 2000) * 360 + (Time.Month - 1) * 30 + (Time.Day - 1)) * 24 + Time.Hour) * 60 + Time.Minute) * 60 + Time.Second,
100
... | tianocore/edk2 | C++ | Other | 4,240 |
/* Unregisters the interrupt handler for an ADC interrupt. */ | void ADCIntUnregister(unsigned long ulBase, unsigned long ulSequenceNum) | /* Unregisters the interrupt handler for an ADC interrupt. */
void ADCIntUnregister(unsigned long ulBase, unsigned long ulSequenceNum) | {
unsigned long ulInt;
ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE));
ASSERT(ulSequenceNum < 4);
ulInt = INT_ADC0 + ulSequenceNum;
IntDisable(ulInt);
IntUnregister(ulInt);
} | watterott/WebRadio | C++ | null | 71 |
/* Look for flags in a provided list and failing that the static list */ | static int env_flags_lookup(const char *flags_list, const char *name, char *flags) | /* Look for flags in a provided list and failing that the static list */
static int env_flags_lookup(const char *flags_list, const char *name, char *flags) | {
int ret = 1;
if (!flags)
return -1;
if (flags_list)
ret = env_attr_lookup(flags_list, name, flags);
if (ret != 0)
ret = env_attr_lookup(ENV_FLAGS_LIST_STATIC, name, flags);
return ret;
} | 4ms/stm32mp1-baremetal | C++ | Other | 137 |
/* Function: void msgqueue_flush(MsgQueue_t *msgq) Purpose : flush all messages from message queue Params : msgq - queue to flush */ | void msgqueue_flush(MsgQueue_t *msgq) | /* Function: void msgqueue_flush(MsgQueue_t *msgq) Purpose : flush all messages from message queue Params : msgq - queue to flush */
void msgqueue_flush(MsgQueue_t *msgq) | {
struct msgqueue_entry *mq, *mqnext;
for (mq = msgq->qe; mq; mq = mqnext) {
mqnext = mq->next;
mqe_free(msgq, mq);
}
msgq->qe = NULL;
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Loads the last error code in the error list. */ | void scsi_sensecode(uint8_t sKey, uint8_t ASC) | /* Loads the last error code in the error list. */
void scsi_sensecode(uint8_t sKey, uint8_t ASC) | {
SCSI_Sense[SCSI_Sense_Tail].Skey = (char)sKey;
SCSI_Sense[SCSI_Sense_Tail].w.ASC = (uint32_t)ASC << 8U;
SCSI_Sense_Tail++;
if (SCSI_Sense_Tail == SENSE_LIST_DEEPTH) {
SCSI_Sense_Tail = 0U;
}
} | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* If HiiHandle could not be found in the HII database, then ASSERT. If Guid is NULL, then ASSERT. */ | EFI_STATUS EFIAPI InternalHiiExtractGuidFromHiiHandle(IN EFI_HII_HANDLE Handle, OUT EFI_GUID *Guid) | /* If HiiHandle could not be found in the HII database, then ASSERT. If Guid is NULL, then ASSERT. */
EFI_STATUS EFIAPI InternalHiiExtractGuidFromHiiHandle(IN EFI_HII_HANDLE Handle, OUT EFI_GUID *Guid) | {
EFI_STATUS Status;
UINTN BufferSize;
EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList;
ASSERT (Guid != NULL);
ASSERT (Handle != NULL);
BufferSize = 0;
HiiPackageList = NULL;
Status = gHiiDatabase->ExportPackageLists (gHiiDatabase, Handle, &BufferSize, HiiPackag... | tianocore/edk2 | C++ | Other | 4,240 |
/* Gets interrupt status for the specified PWM generator block. */ | unsigned long PWMGenIntStatus(unsigned long ulBase, unsigned long ulGen, tBoolean bMasked) | /* Gets interrupt status for the specified PWM generator block. */
unsigned long PWMGenIntStatus(unsigned long ulBase, unsigned long ulGen, tBoolean bMasked) | {
ASSERT(ulBase == PWM_BASE);
ASSERT(PWMGenValid(ulGen));
ulGen = PWM_GEN_BADDR(ulBase, ulGen);
if(bMasked == true)
{
return(HWREG(ulGen + PWM_O_X_ISC));
}
else
{
return(HWREG(ulGen + PWM_O_X_RIS));
}
} | watterott/WebRadio | C++ | null | 71 |
/* Read one element out of the buffer.
This function will return the element located at the array index of the read pointer, and then increment the read pointer index. This function checks for an overflow and corrects read pointer if required. */ | bool tu_fifo_read(tu_fifo_t *f, void *buffer) | /* Read one element out of the buffer.
This function will return the element located at the array index of the read pointer, and then increment the read pointer index. This function checks for an overflow and corrects read pointer if required. */
bool tu_fifo_read(tu_fifo_t *f, void *buffer) | {
_ff_lock(f->mutex_rd);
bool ret = _tu_fifo_peek(f, buffer, f->wr_idx, f->rd_idx);
f->rd_idx = advance_index(f->depth, f->rd_idx, ret);
_ff_unlock(f->mutex_rd);
return ret;
} | prusa3d/Prusa-Firmware-Buddy | C++ | Other | 1,019 |
/* The RSK board has the SMSC9118 wired up 'incorrectly'. Byte-swapping is necessary, and so poor performance is inevitable. This problem cannot evade by the swap function of CHIP, this can evade by software Byte-swapping. And this has problem by FIFO access only. pkt_data_pull/pkt_data_push functions necessary to solv... | u32 pkt_data_pull(struct eth_device *dev, u32 addr) | /* The RSK board has the SMSC9118 wired up 'incorrectly'. Byte-swapping is necessary, and so poor performance is inevitable. This problem cannot evade by the swap function of CHIP, this can evade by software Byte-swapping. And this has problem by FIFO access only. pkt_data_pull/pkt_data_push functions necessary to solv... | {
volatile u16 *addr_16 = (u16 *)(dev->iobase + addr);
return (u32)((swab16(*addr_16) << 16) & 0xFFFF0000)\
| swab16(*(addr_16 + 1));
} | EmcraftSystems/u-boot | C++ | Other | 181 |
/* Search the file inside the eventpoll tree. The RB tree operations are protected by the "mtx" mutex, and ep_find() must be called with "mtx" held. */ | static struct epitem* ep_find(struct eventpoll *ep, struct file *file, int fd) | /* Search the file inside the eventpoll tree. The RB tree operations are protected by the "mtx" mutex, and ep_find() must be called with "mtx" held. */
static struct epitem* ep_find(struct eventpoll *ep, struct file *file, int fd) | {
int kcmp;
struct rb_node *rbp;
struct epitem *epi, *epir = NULL;
struct epoll_filefd ffd;
ep_set_ffd(&ffd, file, fd);
for (rbp = ep->rbr.rb_node; rbp; ) {
epi = rb_entry(rbp, struct epitem, rbn);
kcmp = ep_cmp_ffd(&ffd, &epi->ffd);
if (kcmp > 0)
rbp = rbp->rb_right;
else if (kcmp < 0)
rbp = rbp->r... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* do_bridge_resource_split - find one node of resources that aren't in use @head: list head @alignment: max node size (?) */ | static struct pci_resource* do_bridge_resource_split(struct pci_resource **head, u32 alignment) | /* do_bridge_resource_split - find one node of resources that aren't in use @head: list head @alignment: max node size (?) */
static struct pci_resource* do_bridge_resource_split(struct pci_resource **head, u32 alignment) | {
struct pci_resource *prevnode = NULL;
struct pci_resource *node;
u32 rc;
u32 temp_dword;
rc = cpqhp_resource_sort_and_combine(head);
if (rc)
return NULL;
node = *head;
while (node->next) {
prevnode = node;
node = node->next;
kfree(prevnode);
}
if (node->length < alignment)
goto error;
if (node->b... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Enable or disable a DMA channel (by index ch: 0..15) by setting or clearing a DMA_SxCR bit. */ | static int __stm32_dma_ch_enable(int ch, int enable) | /* Enable or disable a DMA channel (by index ch: 0..15) by setting or clearing a DMA_SxCR bit. */
static int __stm32_dma_ch_enable(int ch, int enable) | {
volatile struct stm32_dma_ch_regs *ch_regs;
DMAAPI_LOCKED_BEGIN
ch_regs = dma_ch_regs(ch);
if (enable) {
stm32_dma_clear_irq_flags(ch,
STM32_DMA_IRQF_TC | STM32_DMA_IRQF_HT |
STM32_DMA_IRQF_TE | STM32_DMA_IRQF_DME |
STM32_DMA_IRQF_FE);
ch_regs->cr |= STM32_DMA_CR_EN;
} else {
ch_regs->cr &= ~STM32... | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* free_rs - Free the rs control structure, if it is no longer used @rs: the control structure which is not longer used by the caller */ | void free_rs(struct rs_control *rs) | /* free_rs - Free the rs control structure, if it is no longer used @rs: the control structure which is not longer used by the caller */
void free_rs(struct rs_control *rs) | {
mutex_lock(&rslistlock);
rs->users--;
if(!rs->users) {
list_del(&rs->list);
kfree(rs->alpha_to);
kfree(rs->index_of);
kfree(rs->genpoly);
kfree(rs);
}
mutex_unlock(&rslistlock);
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* param base PXP peripheral base address. param config Pointer to the configuration. */ | void PXP_SetAlphaSurfaceBufferConfig(PXP_Type *base, const pxp_as_buffer_config_t *config) | /* param base PXP peripheral base address. param config Pointer to the configuration. */
void PXP_SetAlphaSurfaceBufferConfig(PXP_Type *base, const pxp_as_buffer_config_t *config) | {
assert(config);
base->AS_CTRL = (base->AS_CTRL & ~PXP_AS_CTRL_FORMAT_MASK) | PXP_AS_CTRL_FORMAT(config->pixelFormat);
base->AS_BUF = config->bufferAddr;
base->AS_PITCH = config->pitchBytes;
} | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* returns Pointer to stats struct of this interface. */ | static struct net_device_stats* ctcm_stats(struct net_device *dev) | /* returns Pointer to stats struct of this interface. */
static struct net_device_stats* ctcm_stats(struct net_device *dev) | {
return &((struct ctcm_priv *)dev->ml_priv)->stats;
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Forces the output 3 waveform to active or inactive level. */ | void TMR_ConfigForcedOC3(TMR_T *tmr, TMR_FORCED_ACTION_T forcesAction) | /* Forces the output 3 waveform to active or inactive level. */
void TMR_ConfigForcedOC3(TMR_T *tmr, TMR_FORCED_ACTION_T forcesAction) | {
tmr->CCM2_COMPARE_B.OC3MODE = BIT_RESET;
tmr->CCM2_COMPARE_B.OC3MODE = forcesAction;
} | pikasTech/PikaPython | C++ | MIT License | 1,403 |
/* param base Pointer to FLEXIO_I2S_Type structure. param handle Pointer to flexio_i2s_handle_t structure which stores the transfer state */ | void FLEXIO_I2S_TransferAbortSend(FLEXIO_I2S_Type *base, flexio_i2s_handle_t *handle) | /* param base Pointer to FLEXIO_I2S_Type structure. param handle Pointer to flexio_i2s_handle_t structure which stores the transfer state */
void FLEXIO_I2S_TransferAbortSend(FLEXIO_I2S_Type *base, flexio_i2s_handle_t *handle) | {
assert(handle != NULL);
FLEXIO_I2S_DisableInterrupts(base, kFLEXIO_I2S_TxDataRegEmptyInterruptEnable);
handle->state = (uint32_t)kFLEXIO_I2S_Idle;
(void)memset(handle->queue, 0, sizeof(flexio_i2s_transfer_t) * FLEXIO_I2S_XFER_QUEUE_SIZE);
handle->queueDriver = 0;
handle->queueUser = 0;
} | eclipse-threadx/getting-started | C++ | Other | 310 |
/* st33zp24_i2c_write8_reg Send byte to the TIS register according to the ST33ZP24 I2C protocol. */ | static int st33zp24_i2c_write8_reg(struct udevice *dev, u8 tpm_register, const u8 *tpm_data, size_t tpm_size) | /* st33zp24_i2c_write8_reg Send byte to the TIS register according to the ST33ZP24 I2C protocol. */
static int st33zp24_i2c_write8_reg(struct udevice *dev, u8 tpm_register, const u8 *tpm_data, size_t tpm_size) | {
struct tpm_chip_priv *chip_priv = dev_get_uclass_priv(dev);
chip_priv->buf[0] = tpm_register;
memcpy(chip_priv->buf + 1, tpm_data, tpm_size);
return dm_i2c_write(dev, 0, chip_priv->buf, tpm_size + 1);
} | 4ms/stm32mp1-baremetal | C++ | Other | 137 |
/* If 16-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 16-bit boundary, then ASSERT(). If StartBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). */ | UINT16 EFIAPI MmioBitFieldRead16(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit) | /* If 16-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 16-bit boundary, then ASSERT(). If StartBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). */
UINT16 EFIAPI MmioBitFieldRead16(IN UINTN ... | {
return BitFieldRead16 (MmioRead16 (Address), StartBit, EndBit);
} | tianocore/edk2 | C++ | Other | 4,240 |
/* Toggle a single pin in GPIO port data out register. */ | void GPIO_PinOutToggle(GPIO_Port_TypeDef port, unsigned int pin) | /* Toggle a single pin in GPIO port data out register. */
void GPIO_PinOutToggle(GPIO_Port_TypeDef port, unsigned int pin) | {
EFM_ASSERT(GPIO_PORT_VALID(port) && GPIO_PIN_VALID(pin));
GPIO->P[port].DOUTTGL = 1 << pin;
} | feaser/openblt | C++ | GNU General Public License v3.0 | 601 |
/* Curl_slist_duplicate() duplicates a linked list. It always returns the address of the first record of the cloned list or NULL in case of an error (or if the input list was NULL). */ | struct curl_slist* Curl_slist_duplicate(struct curl_slist *inlist) | /* Curl_slist_duplicate() duplicates a linked list. It always returns the address of the first record of the cloned list or NULL in case of an error (or if the input list was NULL). */
struct curl_slist* Curl_slist_duplicate(struct curl_slist *inlist) | {
struct curl_slist *outlist = NULL;
struct curl_slist *tmp;
while(inlist) {
tmp = curl_slist_append(outlist, inlist->data);
if(!tmp) {
curl_slist_free_all(outlist);
return NULL;
}
outlist = tmp;
inlist = inlist->next;
}
return outlist;
} | alibaba/AliOS-Things | C++ | Apache License 2.0 | 4,536 |
/* Just in case the offload routine itself generates an unhandled exception, clear the offload_routine global before executing. */ | void z_irq_do_offload(void) | /* Just in case the offload routine itself generates an unhandled exception, clear the offload_routine global before executing. */
void z_irq_do_offload(void) | {
irq_offload_routine_t tmp;
if (!_offload_routine) {
return;
}
tmp = _offload_routine;
_offload_routine = NULL;
tmp((const void *)offload_param);
} | zephyrproject-rtos/zephyr | C++ | Apache License 2.0 | 9,573 |
/* retrieves one QoS priority => traffic class mapping */ | IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBPriorityMappingClassGet(IxEthDBPortId portID, IxEthDBPriority userPriority, IxEthDBPriority *trafficClass) | /* retrieves one QoS priority => traffic class mapping */
IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBPriorityMappingClassGet(IxEthDBPortId portID, IxEthDBPriority userPriority, IxEthDBPriority *trafficClass) | {
IX_ETH_DB_CHECK_PORT(portID);
IX_ETH_DB_CHECK_SINGLE_NPE(portID);
IX_ETH_DB_CHECK_FEATURE(portID, IX_ETH_DB_VLAN_QOS);
IX_ETH_DB_CHECK_REFERENCE(trafficClass);
if (userPriority >= IX_IEEE802_1Q_QOS_PRIORITY_COUNT)
{
return IX_ETH_DB_INVALID_PRIORITY;
}
*trafficClass = ixEthDBPo... | EmcraftSystems/u-boot | C++ | Other | 181 |
/* Create response, just marks local inode as 'created', so that writeback for any of its children (or own) would not try to sync it again. */ | static int pohmelfs_create_response(struct netfs_state *st) | /* Create response, just marks local inode as 'created', so that writeback for any of its children (or own) would not try to sync it again. */
static int pohmelfs_create_response(struct netfs_state *st) | {
struct inode *inode;
struct netfs_cmd *cmd = &st->cmd;
struct pohmelfs_inode *pi;
inode = ilookup(st->psb->sb, cmd->id);
if (!inode) {
printk("%s: failed to find inode: id: %llu, start: %llu.\n",
__func__, cmd->id, cmd->start);
goto err_out_exit;
}
pi = POHMELFS_I(inode);
if (cmd->start)
make_bad_in... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* @event notified event @context pointer to the notification count */ | static void EFIAPI notify(struct efi_event *event, void *context) | /* @event notified event @context pointer to the notification count */
static void EFIAPI notify(struct efi_event *event, void *context) | {
unsigned int *count = context;
++*count;
} | 4ms/stm32mp1-baremetal | C++ | Other | 137 |
/* Get the a buffer from the DAP_queue where the response to the request is stored Parameters: queue - DAP queue, buf = return the buffer location, len = return the len of the response Return Value: TRUE - Success, FALSE - Error */ | BOOL DAP_queue_get_send_buf(DAP_queue *queue, uint8_t **buf, int *len) | /* Get the a buffer from the DAP_queue where the response to the request is stored Parameters: queue - DAP queue, buf = return the buffer location, len = return the len of the response Return Value: TRUE - Success, FALSE - Error */
BOOL DAP_queue_get_send_buf(DAP_queue *queue, uint8_t **buf, int *len) | {
if (queue->send_count) {
queue->send_count--;
*buf = queue->USB_Request[queue->send_idx];
*len = queue->resp_size[queue->send_idx];
queue->send_idx = (queue->send_idx + 1) % DAP_PACKET_COUNT;
queue->free_count++;
return (__TRUE);
}
return (__FALSE);
} | ARMmbed/DAPLink | C++ | Apache License 2.0 | 2,140 |
/* Enable the Continuous mode for the selected ADCx channels. */ | void ADC_ContinuousModeCmd(ADC_TypeDef *ADCx, FunctionalState NewState) | /* Enable the Continuous mode for the selected ADCx channels. */
void ADC_ContinuousModeCmd(ADC_TypeDef *ADCx, FunctionalState NewState) | {
assert_param(IS_ADC_ALL_PERIPH(ADCx));
assert_param(IS_FUNCTIONAL_STATE(NewState));
if (NewState != DISABLE)
{
ADCx->CFGR1 |= (uint32_t)ADC_CFGR1_CONT;
}
else
{
ADCx->CFGR1 &= (uint32_t)(~ADC_CFGR1_CONT);
}
} | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* Writes and the current LDTR descriptor specified by Ldtr. This function is only available on IA-32 and x64. */ | VOID EFIAPI AsmWriteLdtr(IN UINT16 Ldtr) | /* Writes and the current LDTR descriptor specified by Ldtr. This function is only available on IA-32 and x64. */
VOID EFIAPI AsmWriteLdtr(IN UINT16 Ldtr) | {
_asm {
xor eax, eax
mov ax, Ldtr
lldt ax
}
} | tianocore/edk2 | C++ | Other | 4,240 |
/* Callback from splice_to_pipe(), if we need to release some pages at the end of the spd in case we error'ed out in filling the pipe. */ | static void buffer_spd_release(struct splice_pipe_desc *spd, unsigned int i) | /* Callback from splice_to_pipe(), if we need to release some pages at the end of the spd in case we error'ed out in filling the pipe. */
static void buffer_spd_release(struct splice_pipe_desc *spd, unsigned int i) | {
struct buffer_ref *ref =
(struct buffer_ref *)spd->partial[i].private;
if (--ref->ref)
return;
ring_buffer_free_read_page(ref->buffer, ref->page);
kfree(ref);
spd->partial[i].private = 0;
} | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* Configures the I2C Bus Timeout A (SCL Timeout when TIDLE = 0 or Bus idle SCL and SDA high when TIDLE = 1). */ | void I2C_TimeoutAConfig(I2C_TypeDef *I2Cx, uint16_t Timeout) | /* Configures the I2C Bus Timeout A (SCL Timeout when TIDLE = 0 or Bus idle SCL and SDA high when TIDLE = 1). */
void I2C_TimeoutAConfig(I2C_TypeDef *I2Cx, uint16_t Timeout) | {
uint32_t tmpreg = 0;
assert_param(IS_I2C_1_PERIPH(I2Cx));
assert_param(IS_I2C_TIMEOUT(Timeout));
tmpreg = I2Cx->TIMEOUTR;
tmpreg &= (uint32_t)~((uint32_t)I2C_TIMEOUTR_TIMEOUTA);
tmpreg |= (uint32_t)((uint32_t)Timeout & I2C_TIMEOUTR_TIMEOUTA) ;
I2Cx->TIMEOUTR = tmpreg;
} | ajhc/demo-cortex-m3 | C++ | null | 38 |
/* This function sets a pin to the GPIO mode. */ | void qe_pin_set_gpio(struct qe_pin *qe_pin) | /* This function sets a pin to the GPIO mode. */
void qe_pin_set_gpio(struct qe_pin *qe_pin) | {
struct qe_gpio_chip *qe_gc = qe_pin->controller;
struct qe_pio_regs __iomem *regs = qe_gc->mm_gc.regs;
unsigned long flags;
spin_lock_irqsave(&qe_gc->lock, flags);
__par_io_config_pin(regs, qe_pin->num, QE_PIO_DIR_IN, 0, 0, 0);
spin_unlock_irqrestore(&qe_gc->lock, flags);
} | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* This function retrieves the user readable name of a driver in the form of a Unicode string. If the driver specified by This has a user readable name in the language specified by Language, then a pointer to the driver name is returned in DriverName, and EFI_SUCCESS is returned. If the driver specified by This does no... | EFI_STATUS EFIAPI UfsHcComponentNameGetDriverName(IN EFI_COMPONENT_NAME_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName) | /* This function retrieves the user readable name of a driver in the form of a Unicode string. If the driver specified by This has a user readable name in the language specified by Language, then a pointer to the driver name is returned in DriverName, and EFI_SUCCESS is returned. If the driver specified by This does no... | {
return LookupUnicodeString2 (
Language,
This->SupportedLanguages,
mUfsHcDriverNameTable,
DriverName,
(BOOLEAN)(This == &gUfsHcComponentName)
);
} | tianocore/edk2 | C++ | Other | 4,240 |
/* This function registers a function which will be called whenever a new ACPI table is installed. */ | VOID SdtRegisterNotify(IN EFI_ACPI_NOTIFICATION_FN Notification) | /* This function registers a function which will be called whenever a new ACPI table is installed. */
VOID SdtRegisterNotify(IN EFI_ACPI_NOTIFICATION_FN Notification) | {
EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance;
EFI_ACPI_NOTIFY_LIST *CurrentNotifyList;
AcpiTableInstance = SdtGetAcpiTableInstance ();
CurrentNotifyList = AllocatePool (sizeof (EFI_ACPI_NOTIFY_LIST));
ASSERT (CurrentNotifyList != NULL);
CurrentNotifyList->Signature = EFI_ACPI_NOTIFY_LIST_SIGNATURE;
... | tianocore/edk2 | C++ | Other | 4,240 |
/* Puts a data element into the SSI transmit FIFO as the end of a frame. */ | void SSIAdvDataPutFrameEnd(uint32_t ui32Base, uint32_t ui32Data) | /* Puts a data element into the SSI transmit FIFO as the end of a frame. */
void SSIAdvDataPutFrameEnd(uint32_t ui32Base, uint32_t ui32Data) | {
ASSERT(_SSIBaseValid(ui32Base));
ASSERT((ui32Data & 0xff) == 0);
while(!(HWREG(ui32Base + SSI_O_SR) & SSI_SR_TNF))
{
}
HWREG(ui32Base + SSI_O_CR1) |= SSI_CR1_EOM;
HWREG(ui32Base + SSI_O_DR) = ui32Data;
} | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* If 16-bit I/O port operations are not supported, then ASSERT(). */ | VOID EFIAPI IoReadFifo16(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer) | /* If 16-bit I/O port operations are not supported, then ASSERT(). */
VOID EFIAPI IoReadFifo16(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer) | {
ASSERT ((Port & 1) == 0);
IoReadFifoWorker (Port, EfiCpuIoWidthFifoUint16, Count, Buffer);
} | tianocore/edk2 | C++ | Other | 4,240 |
/* Set the slave select pins of the specified SPI port.
The */ | void SPISSSet(unsigned long ulBase, unsigned long ulSlaveSel) | /* Set the slave select pins of the specified SPI port.
The */
void SPISSSet(unsigned long ulBase, unsigned long ulSlaveSel) | {
xASSERT((ulBase == SPI0_BASE) || (ulBase == SPI1_BASE)||
(ulBase == SPI2_BASE)||(ulBase == SPI3_BASE) );
xASSERT((ulSlaveSel == SPI_SS_NONE) || (ulSlaveSel == SPI_SS0) ||
(ulSlaveSel == SPI_SS1) || (ulSlaveSel == SPI_SS0_SS1));
xHWREG(ulBase + SPI_SSR) |= SPI_SSR_SSR;
} | coocox/cox | C++ | Berkeley Software Distribution (BSD) | 104 |
/* The main function of the adt75 one-shot mode.
return none */ | void TemperatureGet(void) | /* The main function of the adt75 one-shot mode.
return none */
void TemperatureGet(void) | {
long lTemp;
xSysCtlClockSet(12000000, xSYSCTL_XTAL_12MHZ | xSYSCTL_OSC_MAIN);
ADT75Init(10000, ADT75_POWER_NORMAL);
ADT75IntModeConfig(ADT75_OPEMODE_CMP);
ADT75OSActiveLevelConfig(ADT75_OSALERT_LEVEL_LOW);
ADT75FaultQueueConfig(ADT75_FAULTQUE_1);
ADT75OneShotEnable();
ADT75LowLimitSetL... | coocox/cox | C++ | Berkeley Software Distribution (BSD) | 104 |
/* This API reads the Feature interrupt status from the sensor. */ | uint16_t bma4_read_int_status_0(uint8_t *int_status_0, struct bma4_dev *dev) | /* This API reads the Feature interrupt status from the sensor. */
uint16_t bma4_read_int_status_0(uint8_t *int_status_0, struct bma4_dev *dev) | {
uint16_t rslt = BMA4_OK;
if (dev == NULL) {
rslt = BMA4_E_NULL_PTR;
} else {
rslt = bma4_read_regs(BMA4_INT_STAT_0_ADDR, int_status_0, 1, dev);
}
return rslt;
} | arendst/Tasmota | C++ | GNU General Public License v3.0 | 21,318 |
/* I2C MSP De-Initialization This function frees the hardware resources used in this example: */ | void HAL_I2C_MspDeInit(I2C_HandleTypeDef *hi2c) | /* I2C MSP De-Initialization This function frees the hardware resources used in this example: */
void HAL_I2C_MspDeInit(I2C_HandleTypeDef *hi2c) | {
I2Cx_FORCE_RESET();
I2Cx_RELEASE_RESET();
HAL_GPIO_DeInit(I2Cx_SCL_GPIO_PORT, I2Cx_SCL_PIN);
HAL_GPIO_DeInit(I2Cx_SDA_GPIO_PORT, I2Cx_SDA_PIN);
HAL_NVIC_DisableIRQ(I2Cx_ER_IRQn);
HAL_NVIC_DisableIRQ(I2Cx_EV_IRQn);
} | STMicroelectronics/STM32CubeF4 | C++ | Other | 789 |
/* Pointer to image @size: Size of image in bytes @freq: SPI frequency to use */ | static void set_spi_frequency(char *image, int size, enum spi_frequency freq) | /* Pointer to image @size: Size of image in bytes @freq: SPI frequency to use */
static void set_spi_frequency(char *image, int size, enum spi_frequency freq) | {
struct fdbar_t *fdb = find_fd(image, size);
struct fcba_t *fcba;
fcba = (struct fcba_t *)(image + (((fdb->flmap0) & 0xff) << 4));
fcba->flcomp &= ~0x3fe00000;
fcba->flcomp |= freq << 27;
fcba->flcomp |= freq << 24;
fcba->flcomp |= freq << 21;
} | 4ms/stm32mp1-baremetal | C++ | Other | 137 |
/* Read data from SPI Flash by Page Read mode. */ | void SPIM_DMA_Read(uint32_t u32Addr, int is4ByteAddr, uint32_t u32NRx, uint8_t pu8RxBuf[], uint32_t u32RdCmd, int isSync) | /* Read data from SPI Flash by Page Read mode. */
void SPIM_DMA_Read(uint32_t u32Addr, int is4ByteAddr, uint32_t u32NRx, uint8_t pu8RxBuf[], uint32_t u32RdCmd, int isSync) | {
uint32_t u32TimeOutCount = SystemCoreClock;
g_SPIM_i32ErrCode = 0;
SPIM_SET_OPMODE(SPIM_CTL0_OPMODE_PAGEREAD);
SPIM_SET_SPIM_MODE(u32RdCmd);
SPIM_SET_4BYTE_ADDR_EN(is4ByteAddr);
SPIM->SRAMADDR = (uint32_t) pu8RxBuf;
SPIM->DMACNT = u32NRx;
SPIM->FADDR = u32Addr;
SPIM_SET_GO();
i... | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* barrier usage : Since the PVSCSI device is emulated, there could be cases where we may want to serialize some accesses between the driver and the emulation layer. We use compiler barriers instead of the more expensive memory barriers because PVSCSI is only supported on X86 which has strong memory access ordering. *... | static void pvscsi_process_completion_ring(struct pvscsi_adapter *adapter) | /* barrier usage : Since the PVSCSI device is emulated, there could be cases where we may want to serialize some accesses between the driver and the emulation layer. We use compiler barriers instead of the more expensive memory barriers because PVSCSI is only supported on X86 which has strong memory access ordering. *... | {
struct PVSCSIRingsState *s = adapter->rings_state;
struct PVSCSIRingCmpDesc *ring = adapter->cmp_ring;
u32 cmp_entries = s->cmpNumEntriesLog2;
while (s->cmpConsIdx != s->cmpProdIdx) {
struct PVSCSIRingCmpDesc *e = ring + (s->cmpConsIdx &
MASK(cmp_entries));
barrier();
pvscsi_complete_request(ada... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* This function will compare two strings with specified maximum length */ | rt_ubase_t rt_strncmp(const char *cs, const char *ct, rt_ubase_t count) | /* This function will compare two strings with specified maximum length */
rt_ubase_t rt_strncmp(const char *cs, const char *ct, rt_ubase_t count) | {
register signed char __res = 0;
while (count)
{
if ((__res = *cs - *ct++) != 0 || !*cs++)
break;
count --;
}
return __res;
} | armink/FreeModbus_Slave-Master-RTT-STM32 | C++ | Other | 1,477 |
/* Read data from serial device and save the data in buffer. */ | UINTN EFIAPI SerialPortRead(OUT UINT8 *Buffer, IN UINTN NumberOfBytes) | /* Read data from serial device and save the data in buffer. */
UINTN EFIAPI SerialPortRead(OUT UINT8 *Buffer, IN UINTN NumberOfBytes) | {
if (!RETURN_ERROR (SerialPortInitialize ())) {
return PL011UartRead (mSerialBaseAddress, Buffer, NumberOfBytes);
}
return 0;
} | tianocore/edk2 | C++ | Other | 4,240 |
/* Description: allocate a struct scsi_cmd from host's slab, recycling from the host's free_list if necessary. */ | struct scsi_cmnd* __scsi_get_command(struct Scsi_Host *shost, gfp_t gfp_mask) | /* Description: allocate a struct scsi_cmd from host's slab, recycling from the host's free_list if necessary. */
struct scsi_cmnd* __scsi_get_command(struct Scsi_Host *shost, gfp_t gfp_mask) | {
struct scsi_cmnd *cmd = scsi_host_alloc_command(shost, gfp_mask);
if (unlikely(!cmd)) {
unsigned long flags;
spin_lock_irqsave(&shost->free_list_lock, flags);
if (likely(!list_empty(&shost->free_list))) {
cmd = list_entry(shost->free_list.next,
struct scsi_cmnd, list);
list_del_init(&cmd->list);
... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* This function handles network events such as IP acquisition, IP leased, IP released etc. */ | void SimpleLinkNetAppEventHandler(SlNetAppEvent_t *pNetAppEvent) | /* This function handles network events such as IP acquisition, IP leased, IP released etc. */
void SimpleLinkNetAppEventHandler(SlNetAppEvent_t *pNetAppEvent) | {
return;
}
switch(pNetAppEvent->Event)
{
case SL_NETAPP_IPV4_IPACQUIRED_EVENT:
{
SlIpV4AcquiredAsync_t *pEventData = NULL;
SET_STATUS_BIT(wlan_obj.status, STATUS_BIT_IP_ACQUIRED);
pEventData = &pNetAppEvent->EventData.ipAcquiredV4;
wla... | micropython/micropython | C++ | Other | 18,334 |
/* Main application function.
Application entry point. Initialize board and WINC3400 Wi-Fi module. Display WINC3400 chip id and rf revision id. */ | int main(void) | /* Main application function.
Application entry point. Initialize board and WINC3400 Wi-Fi module. Display WINC3400 chip id and rf revision id. */
int main(void) | {
tstrWifiInitParam param;
int8_t ret;
system_init();
configure_console();
printf(STRING_HEADER);
nm_bsp_init();
memset((uint8_t *)¶m, 0, sizeof(tstrWifiInitParam));
ret = m2m_wifi_init(¶m);
if (M2M_SUCCESS != ret) {
printf("main: m2m_wifi_init call error!(%d)\r\n", ret);
while (1) {
}
}
printf... | remotemcu/remcu-chip-sdks | C++ | null | 436 |
/* convert a sampling rate into USB high speed format (fs/8000 in Q16.16) this will overflow at approx 4 MHz */ | static unsigned get_usb_high_speed_rate(unsigned rate) | /* convert a sampling rate into USB high speed format (fs/8000 in Q16.16) this will overflow at approx 4 MHz */
static unsigned get_usb_high_speed_rate(unsigned rate) | {
return ((rate << 10) + 62) / 125;
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Note: This function is blocking mode, and it will return only after the AP released by calling */ | VOID EFIAPI SmmCpuSyncWaitForBsp(IN OUT SMM_CPU_SYNC_CONTEXT *Context, IN UINTN CpuIndex, IN UINTN BspIndex) | /* Note: This function is blocking mode, and it will return only after the AP released by calling */
VOID EFIAPI SmmCpuSyncWaitForBsp(IN OUT SMM_CPU_SYNC_CONTEXT *Context, IN UINTN CpuIndex, IN UINTN BspIndex) | {
ASSERT (Context != NULL);
ASSERT (BspIndex != CpuIndex);
ASSERT (CpuIndex < Context->NumberOfCpus);
ASSERT (BspIndex < Context->NumberOfCpus);
InternalWaitForSemaphore (Context->CpuSem[CpuIndex].Run);
} | tianocore/edk2 | C++ | Other | 4,240 |
/* param handle The RTOS LPSPI handle. param transfer Structure specifying the transfer parameters. return status of the operation. */ | status_t LPSPI_RTOS_Transfer(lpspi_rtos_handle_t *handle, lpspi_transfer_t *transfer) | /* param handle The RTOS LPSPI handle. param transfer Structure specifying the transfer parameters. return status of the operation. */
status_t LPSPI_RTOS_Transfer(lpspi_rtos_handle_t *handle, lpspi_transfer_t *transfer) | {
status_t status;
if (xSemaphoreTake(handle->mutex, portMAX_DELAY) != pdTRUE)
{
return kStatus_LPSPI_Busy;
}
status = LPSPI_MasterTransferNonBlocking(handle->base, &handle->drv_handle, transfer);
if (status != kStatus_Success)
{
(void)xSemaphoreGive(handle->mutex);
r... | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* USBH_LL_GetSpeed Return the USB Host Speed from the Low Level Driver. */ | USBH_SpeedTypeDef USBH_LL_GetSpeed(USBH_HandleTypeDef *phost) | /* USBH_LL_GetSpeed Return the USB Host Speed from the Low Level Driver. */
USBH_SpeedTypeDef USBH_LL_GetSpeed(USBH_HandleTypeDef *phost) | {
USBH_SpeedTypeDef speed = USBH_SPEED_FULL;
return speed;
} | labapart/polymcu | C++ | null | 201 |
/* Retrieves the size, in bytes, of the context buffer required for SHA-512 hash operations. */ | UINTN EFIAPI Sha512GetContextSize(VOID) | /* Retrieves the size, in bytes, of the context buffer required for SHA-512 hash operations. */
UINTN EFIAPI Sha512GetContextSize(VOID) | {
CALL_CRYPTO_SERVICE (Sha512GetContextSize, (), 0);
} | tianocore/edk2 | C++ | Other | 4,240 |
/* Fill the LCD buffer with the specified color. */ | void ili9225_fill(ili9225_color_t us_color) | /* Fill the LCD buffer with the specified color. */
void ili9225_fill(ili9225_color_t us_color) | {
uint32_t i;
ili9225_set_cursor_position(0, 0);
ili9225_write_ram_prepare();
for (i = ILI9225_LCD_WIDTH * ILI9225_LCD_HEIGHT; i > 0; i--) {
ili9225_write_ram(us_color);
}
} | remotemcu/remcu-chip-sdks | C++ | null | 436 |
/* Direct UART Transmit function.
Transmit via UART without CR and LF characters at the end of each transmission */ | GResult UART_TX_DIR(const char *initialcmd) | /* Direct UART Transmit function.
Transmit via UART without CR and LF characters at the end of each transmission */
GResult UART_TX_DIR(const char *initialcmd) | {
GResult result = Failure;
uint32_t timeout = 0x00989680;
uint16_t len;
char *cmd;
strncpy((char *) safeTXbuff, initialcmd, 255);
safeTXbuff[255] = 0;
cmd = (char *) safeTXbuff;
len = strlen(cmd);
while (TXcompleteFlag == 0) {
timeout--;
if (timeout == 0)
break;
}
TXcompleteFlag = 0;
if ((adi_uart_... | analogdevicesinc/EVAL-ADICUP3029 | C++ | Other | 36 |
/* Used by a driver to check whether an of_device present in the system is in its list of supported devices. */ | const struct of_device_id* of_match_device(const struct of_device_id *matches, const struct of_device *dev) | /* Used by a driver to check whether an of_device present in the system is in its list of supported devices. */
const struct of_device_id* of_match_device(const struct of_device_id *matches, const struct of_device *dev) | {
if (!dev->node)
return NULL;
return of_match_node(matches, dev->node);
} | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* Sets the register pointer with specified reg value. */ | void at30tse_set_register_pointer(uint8_t reg, uint8_t reg_type) | /* Sets the register pointer with specified reg value. */
void at30tse_set_register_pointer(uint8_t reg, uint8_t reg_type) | {
uint8_t buffer[] = {reg | reg_type};
struct i2c_master_packet transfer = {
.address = AT30TSE_TEMPERATURE_TWI_ADDR,
.data_length = 1,
.data = buffer,
.ten_bit_address = false,
.high_speed = false,
.hs_master_code = 0x0,
};
i2c_master_write_packet_wait(&dev_inst_at30tse75x, &tran... | memfault/zero-to-main | C++ | null | 200 |
/* This reverses ht_create_irq removing the specified irq from existence. The irq should be free before this happens. */ | void ht_destroy_irq(unsigned int irq) | /* This reverses ht_create_irq removing the specified irq from existence. The irq should be free before this happens. */
void ht_destroy_irq(unsigned int irq) | {
struct ht_irq_cfg *cfg;
cfg = get_irq_data(irq);
set_irq_chip(irq, NULL);
set_irq_data(irq, NULL);
destroy_irq(irq);
kfree(cfg);
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Compare two device-paths, stopping when the shorter of the two hits an End* node. This is useful to, for example, compare a device-path representing a device with one representing a file on the device, or a device with a parent device. */ | int efi_dp_match(const struct efi_device_path *a, const struct efi_device_path *b) | /* Compare two device-paths, stopping when the shorter of the two hits an End* node. This is useful to, for example, compare a device-path representing a device with one representing a file on the device, or a device with a parent device. */
int efi_dp_match(const struct efi_device_path *a, const struct efi_device_pat... | {
while (1) {
int ret;
ret = memcmp(&a->length, &b->length, sizeof(a->length));
if (ret)
return ret;
ret = memcmp(a, b, a->length);
if (ret)
return ret;
a = efi_dp_next(a);
b = efi_dp_next(b);
if (!a || !b)
return 0;
}
} | 4ms/stm32mp1-baremetal | C++ | Other | 137 |
/* acpiphp_glue_init - initializes all PCI hotplug - ACPI glue data structures */ | int __init acpiphp_glue_init(void) | /* acpiphp_glue_init - initializes all PCI hotplug - ACPI glue data structures */
int __init acpiphp_glue_init(void) | {
int num = 0;
acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, find_root_bridges, NULL, &num, NULL);
if (num <= 0)
return -1;
else
acpi_pci_register_driver(&acpi_pci_hp_driver);
return 0;
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* param pfd PFD control name return PFD bypass status. */ | bool CLOCK_IsSysPll3PfdEnabled(clock_pfd_t pfd) | /* param pfd PFD control name return PFD bypass status. */
bool CLOCK_IsSysPll3PfdEnabled(clock_pfd_t pfd) | {
return ((ANADIG_PLL->SYS_PLL3_PFD & (uint32_t)ANADIG_PLL_SYS_PLL3_PFD_PFD0_DIV1_CLKGATE_MASK
<< (8UL * (uint8_t)pfd)) == 0U);
} | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* Helper function to read packet data from some source into a buffer */ | int MQTTPacket_read(unsigned char *buf, int buflen, int(*getfn)(unsigned char *, int)) | /* Helper function to read packet data from some source into a buffer */
int MQTTPacket_read(unsigned char *buf, int buflen, int(*getfn)(unsigned char *, int)) | {
int rc = -1;
MQTTHeader header = {0};
int len = 0;
int rem_len = 0;
if ((*getfn)(buf, 1) != 1)
goto exit;
len = 1;
MQTTPacket_decode(getfn, &rem_len);
len += MQTTPacket_encode(buf + 1, rem_len);
if((rem_len + len) > buflen)
goto exit;
if ((*getfn)(buf + len, rem_len) != rem_len)
goto exit;
header.byt... | analogdevicesinc/EVAL-ADICUP3029 | C++ | Other | 36 |
/* param base FlexIO I2S peripheral base address. param handle FlexIO I2S DMA handle pointer. param count Bytes sent. retval kStatus_Success Succeed get the transfer count. retval kStatus_NoTransferInProgress There is not a non-blocking transaction currently in progress. */ | status_t FLEXIO_I2S_TransferGetSendCountEDMA(FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, size_t *count) | /* param base FlexIO I2S peripheral base address. param handle FlexIO I2S DMA handle pointer. param count Bytes sent. retval kStatus_Success Succeed get the transfer count. retval kStatus_NoTransferInProgress There is not a non-blocking transaction currently in progress. */
status_t FLEXIO_I2S_TransferGetSendCountEDMA... | {
assert(handle);
status_t status = kStatus_Success;
if (handle->state != kFLEXIO_I2S_Busy)
{
status = kStatus_NoTransferInProgress;
}
else
{
*count = handle->transferSize[handle->queueDriver] -
(uint32_t)handle->nbytes *
EDMA_GetRemainin... | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* Puts the USB bus in a suspended state. */ | void USBHostSuspend(uint32_t ui32Base) | /* Puts the USB bus in a suspended state. */
void USBHostSuspend(uint32_t ui32Base) | {
ASSERT(ui32Base == USB0_BASE);
HWREGB(ui32Base + USB_O_POWER) |= USB_POWER_SUSPEND;
} | feaser/openblt | C++ | GNU General Public License v3.0 | 601 |
/* Set EC point compressed coordinates. Points can be described in terms of their compressed coordinates. For a point (x, y), for any given value for x such that the point is on the curve there will only ever be two possible values for y. Therefore, a point can be set using this function where BnX is the x coordinate a... | BOOLEAN EFIAPI EcPointSetCompressedCoordinates(IN CONST VOID *EcGroup, IN VOID *EcPoint, IN CONST VOID *BnX, IN UINT8 YBit, IN VOID *BnCtx) | /* Set EC point compressed coordinates. Points can be described in terms of their compressed coordinates. For a point (x, y), for any given value for x such that the point is on the curve there will only ever be two possible values for y. Therefore, a point can be set using this function where BnX is the x coordinate a... | {
CALL_CRYPTO_SERVICE (EcPointSetCompressedCoordinates, (EcGroup, EcPoint, BnX, YBit, BnCtx), FALSE);
} | tianocore/edk2 | C++ | Other | 4,240 |
/* Verify zephyr fifo continuous read write in loop. */ | ZTEST(fifo_api_1cpu, test_fifo_loop) | /* Verify zephyr fifo continuous read write in loop. */
ZTEST(fifo_api_1cpu, test_fifo_loop) | {
k_fifo_init(&fifo);
for (int i = 0; i < LOOPS; i++) {
TC_PRINT("* Pass data by fifo in loop %d\n", i);
tfifo_read_write(&fifo);
}
} | zephyrproject-rtos/zephyr | C++ | Apache License 2.0 | 9,573 |
/* Enables or disables the discontinuous mode for injected group channel for the specified ADC. */ | void ADC_InjectedDiscModeCmd(ADC_TypeDef *ADCx, FunctionalState NewState) | /* Enables or disables the discontinuous mode for injected group channel for the specified ADC. */
void ADC_InjectedDiscModeCmd(ADC_TypeDef *ADCx, FunctionalState NewState) | {
assert_param(IS_ADC_ALL_PERIPH(ADCx));
assert_param(IS_FUNCTIONAL_STATE(NewState));
if (NewState != DISABLE)
{
ADCx->CR1 |= ADC_CR1_JDISCEN;
}
else
{
ADCx->CR1 &= (uint32_t) (~ADC_CR1_JDISCEN);
}
} | avem-labs/Avem | C++ | MIT License | 1,752 |
/* Cause a processor trigger for a sample sequence. */ | void xADCProcessorTrigger(unsigned long ulBase) | /* Cause a processor trigger for a sample sequence. */
void xADCProcessorTrigger(unsigned long ulBase) | {
xASSERT(ulBase == ADC0_BASE);
xHWREG(ulBase + ADC_CR) |= ADC_CR_ADST;
} | coocox/cox | C++ | Berkeley Software Distribution (BSD) | 104 |
/* If Address > 0x0FFFFFFF, then ASSERT(). If Address is not aligned on a 32-bit boundary, then ASSERT(). */ | UINT32 EFIAPI PciWrite32(IN UINTN Address, IN UINT32 Value) | /* If Address > 0x0FFFFFFF, then ASSERT(). If Address is not aligned on a 32-bit boundary, then ASSERT(). */
UINT32 EFIAPI PciWrite32(IN UINTN Address, IN UINT32 Value) | {
ASSERT_INVALID_PCI_ADDRESS (Address, 3);
return PeiPciLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint32, Value);
} | tianocore/edk2 | C++ | Other | 4,240 |
/* Called from the trans_commit code when we notice that the filesystem is in the middle of a forced shutdown. */ | STATIC void xfs_trans_uncommit(xfs_trans_t *, uint) | /* Called from the trans_commit code when we notice that the filesystem is in the middle of a forced shutdown. */
STATIC void xfs_trans_uncommit(xfs_trans_t *, uint) | {
xfs_log_item_desc_t *lidp;
for (lidp = xfs_trans_first_item(tp);
lidp != NULL;
lidp = xfs_trans_next_item(tp, lidp)) {
if (lidp->lid_flags & XFS_LID_DIRTY)
IOP_UNPIN_REMOVE(lidp->lid_item, tp);
}
xfs_trans_unreserve_and_mod_sb(tp);
xfs_trans_unreserve_and_mod_dquots(tp);
xfs_trans_free_items(tp... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* CCID_UpdSlotChange Updates the variable for the slot change status. */ | void CCID_UpdSlotChange(USBD_HandleTypeDef *pdev, uint8_t changeStatus) | /* CCID_UpdSlotChange Updates the variable for the slot change status. */
void CCID_UpdSlotChange(USBD_HandleTypeDef *pdev, uint8_t changeStatus) | {
USBD_CCID_HandleTypeDef *hccid = (USBD_CCID_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
hccid->SlotStatus.SlotStatusChange = changeStatus;
} | STMicroelectronics/STM32CubeF4 | C++ | Other | 789 |
/* Slave finish up a transfer. It would call back if there is callback function and set the state to idle. This is not a public API. */ | static void LPSPI_SlaveTransferComplete(LPSPI_Type *base, lpspi_slave_handle_t *handle) | /* Slave finish up a transfer. It would call back if there is callback function and set the state to idle. This is not a public API. */
static void LPSPI_SlaveTransferComplete(LPSPI_Type *base, lpspi_slave_handle_t *handle) | {
assert(handle);
status_t status = 0;
LPSPI_DisableInterrupts(base, kLPSPI_AllInterruptEnable);
if (handle->state == kLPSPI_Error)
{
status = kStatus_LPSPI_Error;
}
else
{
status = kStatus_Success;
}
handle->state = kLPSPI_Idle;
if (handle->callback)
{
... | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* leb_write_unlock - unlock logical eraseblock. @ubi: UBI device description object @vol_id: volume ID @lnum: logical eraseblock number */ | static void leb_write_unlock(struct ubi_device *ubi, int vol_id, int lnum) | /* leb_write_unlock - unlock logical eraseblock. @ubi: UBI device description object @vol_id: volume ID @lnum: logical eraseblock number */
static void leb_write_unlock(struct ubi_device *ubi, int vol_id, int lnum) | {
struct ubi_ltree_entry *le;
spin_lock(&ubi->ltree_lock);
le = ltree_lookup(ubi, vol_id, lnum);
le->users -= 1;
ubi_assert(le->users >= 0);
up_write(&le->mutex);
if (le->users == 0) {
rb_erase(&le->rb, &ubi->ltree);
kfree(le);
}
spin_unlock(&ubi->ltree_lock);
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Reads the specified DAC channel data output value. */ | uint16_t DAC_ReadDataOutputValue(DAC_CHANNEL_T channel) | /* Reads the specified DAC channel data output value. */
uint16_t DAC_ReadDataOutputValue(DAC_CHANNEL_T channel) | {
__IO uint32_t tmp = 0;
tmp = (uint32_t) DAC_BASE ;
tmp += 0x0000002C + ((uint32_t)channel >> 2);
return (uint16_t)(*(__IO uint32_t*) tmp);
} | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* sync_completion: Signal that a synchronous command has completed Note that after returning from this call, the evt_struct is freed. the caller waiting on this completion shouldn't touch the evt_struct again. */ | static void sync_completion(struct srp_event_struct *evt_struct) | /* sync_completion: Signal that a synchronous command has completed Note that after returning from this call, the evt_struct is freed. the caller waiting on this completion shouldn't touch the evt_struct again. */
static void sync_completion(struct srp_event_struct *evt_struct) | {
if (evt_struct->sync_srp)
*evt_struct->sync_srp = *evt_struct->xfer_iu;
complete(&evt_struct->comp);
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Generate notification for 'Value V6' attribute, if notifications are enabled. */ | void service_b_3_2_value_v6_notify(void) | /* Generate notification for 'Value V6' attribute, if notifications are enabled. */
void service_b_3_2_value_v6_notify(void) | {
if (!value_v6_ntf_active)
return;
bt_gatt_notify(NULL, &service_b_3_2_attrs[1], &value_v6_value,
sizeof(value_v6_value));
} | zephyrproject-rtos/zephyr | C++ | Apache License 2.0 | 9,573 |
/* Initializes the COMP2 peripheral according to the specified parameters in the COMP_InitStruct. */ | void COMP_Init(COMP_InitTypeDef *COMP_InitStruct) | /* Initializes the COMP2 peripheral according to the specified parameters in the COMP_InitStruct. */
void COMP_Init(COMP_InitTypeDef *COMP_InitStruct) | {
uint32_t tmpreg = 0;
assert_param(IS_COMP_INVERTING_INPUT(COMP_InitStruct->COMP_InvertingInput));
assert_param(IS_COMP_OUTPUT(COMP_InitStruct->COMP_OutputSelect));
assert_param(IS_COMP_SPEED(COMP_InitStruct->COMP_Speed));
tmpreg = COMP->CSR;
tmpreg &= (uint32_t) (~(uint32_t) (COMP_CSR_OUTSEL | COMP_CSR_I... | avem-labs/Avem | C++ | MIT License | 1,752 |
/* memcmp - Compare two areas of memory @cs: One area of memory @ct: Another area of memory @count: The size of the area. */ | int memcmp(const void *cs, const void *ct, size_t count) | /* memcmp - Compare two areas of memory @cs: One area of memory @ct: Another area of memory @count: The size of the area. */
int memcmp(const void *cs, const void *ct, size_t count) | {
const unsigned char *su1, *su2;
int res = 0;
for (su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--)
if ((res = *su1 - *su2) != 0)
break;
return res;
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Gets the states of the RI, DCD, DSR and CTS modem status signals. */ | uint32_t UARTModemStatusGet(uint32_t ui32Base) | /* Gets the states of the RI, DCD, DSR and CTS modem status signals. */
uint32_t UARTModemStatusGet(uint32_t ui32Base) | {
ASSERT(ui32Base == UART1_BASE);
return (HWREG(ui32Base + UART_O_FR) & (UART_INPUT_RI | UART_INPUT_DCD |
UART_INPUT_CTS | UART_INPUT_DSR));
} | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* Note: Might want to change this later to allow for passing in a parameter to optionally set the sleep on exit bit. */ | void wait(void) | /* Note: Might want to change this later to allow for passing in a parameter to optionally set the sleep on exit bit. */
void wait(void) | {
SCB_SCR &= ~SCB_SCR_SLEEPDEEP_MASK;
asm("WFI");
} | apopple/Pandaboard-FreeRTOS | C++ | null | 25 |
/* Reset the timer by placing the timer back into it's default reset configuration. */ | void TimerReset(void) | /* Reset the timer by placing the timer back into it's default reset configuration. */
void TimerReset(void) | {
LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_TIM1);
LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_TIM1);
LL_APB2_GRP1_DisableClock(LL_APB2_GRP1_PERIPH_TIM1);
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
} | feaser/openblt | C++ | GNU General Public License v3.0 | 601 |
/* Updates the color pallet to the display.
This function should be called whenever a new color is selected on the pallet. It will then move the selection box to the newly chosen color. */ | static void update_pallet_selection(void) | /* Updates the color pallet to the display.
This function should be called whenever a new color is selected on the pallet. It will then move the selection box to the newly chosen color. */
static void update_pallet_selection(void) | {
static uint8_t old_selected_color = 0;
for (uint8_t i = 0; i < 3; i++) {
gfx_draw_rect(
(PALLET_COLOR_WIDTH * old_selected_color) + i,
(gfx_get_height() - PALLET_HEIGHT) + i,
PALLET_COLOR_WIDTH - (i * 2),
PALLET_HEIGHT - (i * 2),
pallet_colors[old_selected_color]);
}
for (uint8_t i = 0; i < ... | memfault/zero-to-main | C++ | null | 200 |
/* Get Mapfile and SymbolName from one symbol format: SymbolName. */ | VOID GetMapfileAndSymbol(IN CHAR16 *Symbol, OUT CHAR16 **MapfileName, OUT CHAR16 **SymbolName) | /* Get Mapfile and SymbolName from one symbol format: SymbolName. */
VOID GetMapfileAndSymbol(IN CHAR16 *Symbol, OUT CHAR16 **MapfileName, OUT CHAR16 **SymbolName) | {
CHAR16 *Ch;
*MapfileName = NULL;
*SymbolName = Symbol;
for (Ch = Symbol; *Ch != 0; Ch++) {
if (*Ch == L':') {
*MapfileName = Symbol;
*Ch = 0;
*SymbolName = Ch + 1;
break;
}
}
return;
} | tianocore/edk2 | C++ | Other | 4,240 |
/* Write data to WM8904 Register.
Support and FAQ: visit */ | void wm8904_write_register(uint8_t uc_register_address, uint16_t us_data) | /* Write data to WM8904 Register.
Support and FAQ: visit */
void wm8904_write_register(uint8_t uc_register_address, uint16_t us_data) | {
uint8_t uc_temp_data[2];
twihs_packet_t packet;
uc_temp_data[0] = (us_data & 0xff00) >> 8;
uc_temp_data[1] = us_data & 0xff;
packet.addr[0] = uc_register_address;
packet.addr_length = 0x1;
packet.buffer = uc_temp_data;
packet.length = 0x2;
packet.chip = WM8904_SLAVE_ADDRESS;
twihs_maste... | remotemcu/remcu-chip-sdks | C++ | null | 436 |
/* Check if a row is a full row because the page is a invalid page, so if two pages have data, it is the full row. */ | static bool _rww_eeprom_emulator_is_full_row(uint16_t phy_page) | /* Check if a row is a full row because the page is a invalid page, so if two pages have data, it is the full row. */
static bool _rww_eeprom_emulator_is_full_row(uint16_t phy_page) | {
if (CONF_LOGICAL_PAGE_NUM_IN_ROW == RWWEE_LOGICAL_PAGE_NUM_1) {
if(_eeprom_instance.rwwee_addr[phy_page].header.logical_page
== _eeprom_instance.rwwee_addr[phy_page+1].header.logical_page) {
return true;
} else {
return false;
}
} else {
if((_eeprom_instance.rwwee_addr[phy_page].header.logical_page... | memfault/zero-to-main | C++ | null | 200 |
/* Set the timer TOP/PERIOD value and buffer value.
When using MFRQ, the top values are defined by the CC0 and CCB0, the PER and PERB values are ignored, so */ | enum status_code tcc_set_double_buffer_top_values(const struct tcc_module *const module_inst, const uint32_t top_value, const uint32_t top_buffer_value) | /* Set the timer TOP/PERIOD value and buffer value.
When using MFRQ, the top values are defined by the CC0 and CCB0, the PER and PERB values are ignored, so */
enum status_code tcc_set_double_buffer_top_values(const struct tcc_module *const module_inst, const uint32_t top_value, const uint32_t top_buffer_value) | {
Assert(module_inst);
enum status_code status;
status = _tcc_set_top_value(module_inst, top_value, false);
if (status != STATUS_OK) {
return status;
}
return _tcc_set_top_value(module_inst, top_buffer_value, true);
} | memfault/zero-to-main | C++ | null | 200 |
/* Detach and return the first urb in a list with a distinguished head "hd", or NULL if the list is empty. */ | struct urb* first_urb_detached(urb_link *hd) | /* Detach and return the first urb in a list with a distinguished head "hd", or NULL if the list is empty. */
struct urb* first_urb_detached(urb_link *hd) | {
struct urb *urb;
if ((urb = first_urb (hd))) {
urb_detach (urb);
}
return urb;
} | EmcraftSystems/u-boot | C++ | Other | 181 |
/* step9 of enumeration - Reception of the Set address setup request */ | static void main_usb_enum_step9(void) | /* step9 of enumeration - Reception of the Set address setup request */
static void main_usb_enum_step9(void) | {
main_usb_enable_ctrl_ep(0, (speed==0)?8:64);
main_usb_wait_setup_packet();
main_usb_send_in(NULL,0);
main_usb_enable_ctrl_ep(le16_to_cpu(main_setup_packet.wValue), (speed==0)?8:64);
} | remotemcu/remcu-chip-sdks | C++ | null | 436 |
/* If 64-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 64-bit boundary, then ASSERT(). */ | UINT64 EFIAPI MmioAndThenOr64(IN UINTN Address, IN UINT64 AndData, IN UINT64 OrData) | /* If 64-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 64-bit boundary, then ASSERT(). */
UINT64 EFIAPI MmioAndThenOr64(IN UINTN Address, IN UINT64 AndData, IN UINT64 OrData) | {
return MmioWrite64 (Address, (MmioRead64 (Address) & AndData) | OrData);
} | tianocore/edk2 | C++ | Other | 4,240 |
/* Get the Falling Latched PWM counter of the PWM module.
The */ | void PWMCAPLatchFlagClear(unsigned long ulBase, unsigned long ulChannel) | /* Get the Falling Latched PWM counter of the PWM module.
The */
void PWMCAPLatchFlagClear(unsigned long ulBase, unsigned long ulChannel) | {
unsigned long ulChannelTemp;
ulChannelTemp = ulChannel;
xASSERT((ulBase == PWMA_BASE) || (ulBase == PWMB_BASE));
xASSERT(((ulChannelTemp >= 0) || (ulChannelTemp <= 5)));
xHWREG(ulBase + PWM_CAPSTS) |= (0x101 << ulChannelTemp);
} | coocox/cox | C++ | Berkeley Software Distribution (BSD) | 104 |
/* Reset ADC peripheral registers to their default reset values. */ | void ADC_Reset(ADC_T *adc) | /* Reset ADC peripheral registers to their default reset values. */
void ADC_Reset(ADC_T *adc) | {
if (adc == ADC1)
{
RCM_EnableAPB2PeriphReset(RCM_APB2_PERIPH_ADC1);
RCM_DisableAPB2PeriphReset(RCM_APB2_PERIPH_ADC1);
}
else if (adc == ADC2)
{
RCM_EnableAPB2PeriphReset(RCM_APB2_PERIPH_ADC2);
RCM_DisableAPB2PeriphReset(RCM_APB2_PERIPH_ADC2);
}
} | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* Regular PCI devices have 256 bytes, but PCI-X 2 and PCI Express devices have 4096 bytes. Even if the device is capable, that doesn't mean we can access it. Maybe we don't have a way to generate extended config space accesses, or the device is behind a reverse Express bridge. So we try reading the dword at 0x100 whic... | int pci_cfg_space_size_ext(struct pci_dev *dev) | /* Regular PCI devices have 256 bytes, but PCI-X 2 and PCI Express devices have 4096 bytes. Even if the device is capable, that doesn't mean we can access it. Maybe we don't have a way to generate extended config space accesses, or the device is behind a reverse Express bridge. So we try reading the dword at 0x100 whic... | {
u32 status;
int pos = PCI_CFG_SPACE_SIZE;
if (pci_read_config_dword(dev, pos, &status) != PCIBIOS_SUCCESSFUL)
goto fail;
if (status == 0xffffffff)
goto fail;
return PCI_CFG_SPACE_EXP_SIZE;
fail:
return PCI_CFG_SPACE_SIZE;
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Finalizes the vm Return nil + errmsg or nil in case of sucess */ | static int finalize(lua_State *L, cur_data *cur) | /* Finalizes the vm Return nil + errmsg or nil in case of sucess */
static int finalize(lua_State *L, cur_data *cur) | {
cur->sql_vm = NULL;
lua_pushnil(L);
lua_pushliteral(L, LUASQL_PREFIX);
lua_pushstring(L, errmsg);
sqlite_freemem(errmsg);
lua_concat(L, 2);
return 2;
}
lua_pushnil(L);
return 1;
} | DC-SWAT/DreamShell | C++ | null | 404 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.