Home
last modified time | relevance | path

Searched refs:count (Results 1 – 25 of 153) sorted by relevance

1234567

/lk-master/app/tests/
A Dbenchmarks.c35 count = arch_cycle_count() - count; in bench_set_overhead()
53 count = arch_cycle_count() - count; in bench_memset()
78 count = arch_cycle_count() - count; \
113 count = arch_cycle_count() - count; in bench_cset()
134 count = arch_cycle_count() - count; in bench_memcpy()
161 count = arch_cycle_count() - count; in arm_bench_cset_stm()
207 count = arch_cycle_count() - count; in bench_sincos()
212 count = arch_cycle_count() - count; in bench_sincos()
217 count = arch_cycle_count() - count; in bench_sincos()
222 count = arch_cycle_count() - count; in bench_sincos()
[all …]
/lk-master/lib/libc/string/
A Dmemmove.c23 memmove(void *dest, void const *src, size_t count) { in memmove() argument
28 if (count == 0 || dest == src) in memmove()
39 count -= len; in memmove()
43 for (len = count / lsize; len > 0; len--) { in memmove()
48 for (len = count & lmask; len > 0; len--) in memmove()
51 d += count; in memmove()
52 s += count; in memmove()
56 len = count; in memmove()
60 count -= len; in memmove()
64 for (len = count / lsize; len > 0; len--) { in memmove()
[all …]
A Dmemset.c17 memset(void *s, int c, size_t count) { in memset() argument
22 if ( count > len ) { in memset()
23 count -= len; in memset()
34 for ( len = count/sizeof(size_t); len > 0; len-- ) { in memset()
39 count &= sizeof(size_t)-1; in memset()
43 for ( ; count > 0; count-- ) in memset()
A Dmemcpy.c23 void *memcpy(void *dest, const void *src, size_t count) { in memcpy() argument
28 if (count == 0 || dest == src) in memcpy()
33 if ((((long)d ^ (long)s) & lmask) || (count < lsize)) in memcpy()
34 len = count; // copy the rest of the buffer with the byte mover in memcpy()
38 count -= len; in memcpy()
42 for (len = count / lsize; len > 0; len--) { in memcpy()
47 for (len = count & lmask; len > 0; len--) in memcpy()
A Dstrspn.c19 size_t count = 0; in strspn() local
27 return count; in strspn()
28 ++count; in strspn()
31 return count; in strspn()
/lk-master/platform/pc/
A Dtimer.c92 uint32_t count, remainder; in set_pit_frequency() local
96 count = 0xffff; in set_pit_frequency()
98 count = 1; in set_pit_frequency()
104 count += 1; in set_pit_frequency()
107 count /= 3; in set_pit_frequency()
108 remainder = count % 3; in set_pit_frequency()
111 count += 1; in set_pit_frequency()
115 divisor = count & 0xffff; in set_pit_frequency()
151 uint32_t count; in platform_set_oneshot_timer() local
164 count = ticks_per_ms * interval; in platform_set_oneshot_timer()
[all …]
/lk-master/arch/arm/
A Dstackusage14 count = 0 variable
35 if count > 0:
36 print("%d %s" % (count, currsymbol))
37 count = 0 variable
67 count += c
73 count += c
81 count += c
90 if count > 0:
91 print("%d %s" % (count, currsymbol))
/lk-master/arch/arm/arm/
A Ddebug.c89 ssize_t count = 0; in arm_dcc_read() local
90 while (count < (ssize_t)len) { in arm_dcc_read()
97 count++; in arm_dcc_read()
105 return count; in arm_dcc_read()
114 ssize_t count = 0; in arm_dcc_write() local
115 while (count < (ssize_t)len) { in arm_dcc_write()
120 count++; in arm_dcc_write()
129 return count; in arm_dcc_write()
133 static int count = 0; in dcc_rx_callback() local
134 count += 4; in dcc_rx_callback()
[all …]
/lk-master/app/lpcboot/
A Dlpc43xx-spifi.c39 void spifi_page_program(u32 addr, u32 *ptr, u32 count) { in spifi_page_program() argument
42 writel(CMD_DATALEN(count * 4) | CMD_FF_SERIAL | CMD_FR_OP_3B | in spifi_page_program()
44 while (count-- > 0) { in spifi_page_program()
58 int spifi_verify_erased(u32 addr, u32 count) { in spifi_verify_erased() argument
61 writel(CMD_DATALEN(count * 4) | CMD_FF_SERIAL | CMD_FR_OP_3B | in spifi_verify_erased()
63 while (count-- > 0) { in spifi_verify_erased()
71 int count = 256 / 4; in spifi_verify_page() local
74 writel(CMD_DATALEN(count * 4) | CMD_FF_SERIAL | CMD_FR_OP_3B | in spifi_verify_page()
76 while (count-- > 0) { in spifi_verify_page()
/lk-master/kernel/vm/
A Dpmm.c113 if (count == 0) in pmm_alloc_pages()
159 if (count == 0) in pmm_alloc_range()
191 if (allocated == count) in pmm_alloc_range()
206 size_t count = 0; in pmm_free() local
221 count++; in pmm_free()
228 return count; in pmm_free()
245 if (count == 1) { in pmm_alloc_kpages()
270 while (count > 0) { in pmm_free_kpages()
277 count--; in pmm_free_kpages()
286 if (count == 0) in pmm_alloc_contiguous()
[all …]
/lk-master/lib/debug/
A Ddebug.c104 size_t count; in hexdump() local
106 for (count = 0 ; count < len; count += 16) { in hexdump()
111 size_t s = ROUNDUP(MIN(len - count, 16), 4); in hexdump()
139 size_t count; in hexdump8_ex() local
145 for (count = 0 ; count < len; count += 16) { in hexdump8_ex()
146 printf(addr_fmt, disp_addr + count); in hexdump8_ex()
148 for (i=0; i < MIN(len - count, 16); i++) { in hexdump8_ex()
158 for (i=0; i < MIN(len - count, 16); i++) { in hexdump8_ex()
/lk-master/app/stringtests/
A Dstring_tests.c45 if (count == 0 || dest == source) in c_memmove()
56 count -= len; in c_memmove()
65 for (len = count & lmask; len > 0; len--) in c_memmove()
68 d += count; in c_memmove()
69 s += count; in c_memmove()
73 len = count; in c_memmove()
77 count -= len; in c_memmove()
98 if ( count > len ) { in c_memset()
99 count -= len; in c_memset()
115 count &= lmask; in c_memset()
[all …]
/lk-master/external/platform/lpc15xx/lpcopen/usbd_rom_cdc_uart/example/src/
A Dcdc_uart.c154 uint32_t count = 0; in UCOM_bulk_hdlr() local
161 count = UCOM_BUF_SZ - pUcom->rxBuf_usbIndex; in UCOM_bulk_hdlr()
164 count = pUcom->rxBuf_uartIndex - pUcom->rxBuf_usbIndex; in UCOM_bulk_hdlr()
166 if (count) { in UCOM_bulk_hdlr()
168count = USBD_API->hw->WriteEP(pUcom->hUsb, USB_CDC_IN_EP, &pUcom->rxBuf[g_uCOM.rxBuf_usbIndex], co… in UCOM_bulk_hdlr()
169 g_uCOM.rxBuf_usbIndex = (g_uCOM.rxBuf_usbIndex + count) & (UCOM_BUF_SZ - 1); in UCOM_bulk_hdlr()
265 uint32_t count = 0; in LPC_UARTHNDLR() local
270 g_uCOM.txBuf_count -= count; in LPC_UARTHNDLR()
271 g_uCOM.txBuf_uartIndex += count; in LPC_UARTHNDLR()
291 if (count) { in LPC_UARTHNDLR()
[all …]
/lk-master/arch/or1k/
A Dmmu.c28 void or1k_invalidate_tlb(vaddr_t vaddr, uint count) { in or1k_invalidate_tlb() argument
37 for (; count; count--) { in or1k_invalidate_tlb()
105 int arch_mmu_unmap(arch_aspace_t *aspace, vaddr_t vaddr, uint count) { in arch_mmu_unmap() argument
106 LTRACEF("vaddr = 0x%lx, count = %d\n", vaddr, count); in arch_mmu_unmap()
112 while (count) { in arch_mmu_unmap()
117 count--; in arch_mmu_unmap()
127 count -= SECTION_SIZE / PAGE_SIZE; in arch_mmu_unmap()
134 int arch_mmu_map(arch_aspace_t *aspace, vaddr_t vaddr, paddr_t paddr, uint count, uint flags) { in arch_mmu_map() argument
154 while (count) { in arch_mmu_map()
158 count -= SECTION_SIZE / PAGE_SIZE; in arch_mmu_map()
[all …]
/lk-master/external/platform/pico/rp2_common/hardware_flash/
A Dflash.c65 void __no_inline_not_in_flash_func(flash_range_erase)(uint32_t flash_offs, size_t count) { in __no_inline_not_in_flash_func()
67 hard_assert(flash_offs + count <= PICO_FLASH_SIZE_BYTES); in __no_inline_not_in_flash_func()
70 invalid_params_if(FLASH, count & (FLASH_SECTOR_SIZE - 1)); in __no_inline_not_in_flash_func()
84 flash_range_erase(flash_offs, count, FLASH_BLOCK_SIZE, FLASH_BLOCK_ERASE_CMD); in __no_inline_not_in_flash_func()
89 …ne_not_in_flash_func(flash_range_program)(uint32_t flash_offs, const uint8_t *data, size_t count) { in __no_inline_not_in_flash_func()
91 hard_assert(flash_offs + count <= PICO_FLASH_SIZE_BYTES); in __no_inline_not_in_flash_func()
94 invalid_params_if(FLASH, count & (FLASH_PAGE_SIZE - 1)); in __no_inline_not_in_flash_func()
107 flash_range_program(flash_offs, data, count); in __no_inline_not_in_flash_func()
130 …d __no_inline_not_in_flash_func(flash_do_cmd)(const uint8_t *txbuf, uint8_t *rxbuf, size_t count) { in __no_inline_not_in_flash_func()
141 size_t tx_remaining = count; in __no_inline_not_in_flash_func()
[all …]
/lk-master/kernel/
A Dsemaphore.c29 sem->count = 0; in sem_destroy()
43 if (unlikely(++sem->count <= 0)) in sem_post()
59 if (unlikely(--sem->count < 0)) in sem_wait()
70 if (unlikely(sem->count <= 0)) in sem_trywait()
73 sem->count--; in sem_trywait()
83 if (unlikely(--sem->count < 0)) { in sem_timedwait()
87 sem->count++; in sem_timedwait()
/lk-master/lib/bio/
A Dmem.c34 static ssize_t mem_bdev_read_block(struct bdev *bdev, void *buf, bnum_t block, uint count) { in mem_bdev_read_block() argument
37 LTRACEF("bdev %s, buf %p, block %u, count %u\n", bdev->name, buf, block, count); in mem_bdev_read_block()
39 memcpy(buf, (uint8_t *)mem->ptr + block * BLOCKSIZE, count * BLOCKSIZE); in mem_bdev_read_block()
41 return count * BLOCKSIZE; in mem_bdev_read_block()
54 static ssize_t mem_bdev_write_block(struct bdev *bdev, const void *buf, bnum_t block, uint count) { in mem_bdev_write_block() argument
57 LTRACEF("bdev %s, buf %p, block %u, count %u\n", bdev->name, buf, block, count); in mem_bdev_write_block()
59 memcpy((uint8_t *)mem->ptr + block * BLOCKSIZE, buf, count * BLOCKSIZE); in mem_bdev_write_block()
61 return count * BLOCKSIZE; in mem_bdev_write_block()
/lk-master/external/platform/lpc15xx/lpcopen/lpc_chip_15xx/src/
A Dring_buffer.c39 #define RB_INDH(rb) ((rb)->head & ((rb)->count - 1))
40 #define RB_INDT(rb) ((rb)->tail & ((rb)->count - 1))
55 int RingBuffer_Init(RINGBUFF_T *RingBuff, void *buffer, int itemSize, int count) in RingBuffer_Init() argument
58 RingBuff->count = count; in RingBuffer_Init()
93 if (RB_INDH(RingBuff) + cnt1 >= RingBuff->count) in RingBuffer_InsertMult()
94 cnt1 = RingBuff->count - RB_INDH(RingBuff); in RingBuffer_InsertMult()
145 if (RB_INDT(RingBuff) + cnt1 >= RingBuff->count) in RingBuffer_PopMult()
146 cnt1 = RingBuff->count - RB_INDT(RingBuff); in RingBuffer_PopMult()
/lk-master/platform/armemu/
A Dblkdev.c21 ssize_t read_block(struct bdev *dev, void *buf, bnum_t block, uint count) { in read_block() argument
25 *REG32(BDEV_CMD_LEN) = count * dev->block_size; in read_block()
31 return count * dev->block_size; in read_block()
36 ssize_t write_block(struct bdev *dev, const void *buf, bnum_t block, uint count) { in write_block() argument
40 *REG32(BDEV_CMD_LEN) = count * dev->block_size; in write_block()
46 return count * dev->block_size; in write_block()
/lk-master/lib/partition/
A Dpartition.c53 int count = 0; in partition_publish() local
103 count++; in partition_publish()
111 return (err < 0) ? err : count; in partition_publish()
116 int count; in partition_unpublish() local
120 count = 0; in partition_unpublish()
130 count++; in partition_unpublish()
133 return count; in partition_unpublish()
/lk-master/lib/klog/
A Dklog.c116 if (count == 0) in klog_create()
120 if (len < (sizeof(struct klog_buffer_header) + sizeof(struct klog_header) * count + 4 * count)) in klog_create()
126 klog_buf->log_count = count; in klog_create()
134 bufsize /= count; in klog_create()
136 while (count > 0) { in klog_create()
146 count--; in klog_create()
323 size_t count = 0; in klog_puts_len() local
350 count++; in klog_puts_len()
358 return count; in klog_puts_len()
479 uint count = argv[3].u; in cmd_klog() local
[all …]
/lk-master/platform/stm32f0xx/
A Di2c.c267 static void stm32_i2c_setup_buf(stm32_i2c_buf_t *buf, uint8_t *data, size_t count) { in stm32_i2c_setup_buf() argument
269 buf->len = count; in stm32_i2c_setup_buf()
289 size_t count; in stm32_i2c_txn() local
291 count = tx_count; in stm32_i2c_txn()
295 count = rx_count; in stm32_i2c_txn()
332 status_t i2c_transmit(int bus, uint8_t address, const void *buf, size_t count) { in i2c_transmit() argument
339 return stm32_i2c_txn(i2c, address, NULL, (uint8_t *)buf, count, NULL, 0); in i2c_transmit()
342 status_t i2c_receive(int bus, uint8_t address, void *buf, size_t count) { in i2c_receive() argument
348 return stm32_i2c_txn(i2c, address, NULL, NULL, 0, buf, count); in i2c_receive()
358 return stm32_i2c_txn(i2c, address, &reg, (uint8_t *)buf, count, NULL, 0); in i2c_write_reg_bytes()
[all …]
/lk-master/external/platform/lpc15xx/lpcopen/lpc_chip_15xx/inc/
A Dring_buffer.h47 int count; member
76 int RingBuffer_Init(RINGBUFF_T *RingBuff, void *buffer, int itemSize, int count);
95 return RingBuff->count; in RingBuffer_GetSize()
115 return RingBuff->count - RingBuffer_GetCount(RingBuff); in RingBuffer_GetFree()
125 return (RingBuffer_GetCount(RingBuff) >= RingBuff->count); in RingBuffer_IsFull()
/lk-master/app/inetsrv/
A Dinetsrv.c24 uint64_t count = 0; in chargen_worker() local
49 count += ret; in chargen_worker()
54 count, (uint32_t)t, count * 1000 / t); in chargen_worker()
87 uint64_t count = 0; in discard_worker() local
106 count += ret; in discard_worker()
111 count, (uint32_t)t, count * 1000 / t, crc); in discard_worker()
/lk-master/platform/stm32f7xx/
A Dflash.c42 static ssize_t stm32_flash_bdev_read_block(struct bdev *, void *buf, bnum_t block, uint count);
44 …tic ssize_t stm32_flash_bdev_write_block(struct bdev *, const void *buf, bnum_t block, uint count);
99 static ssize_t stm32_flash_bdev_read_block(struct bdev *bdev, void *buf, bnum_t block, uint count) { in stm32_flash_bdev_read_block() argument
100 LTRACEF("dev %p, buf %p, block 0x%x, count %u\n", bdev, buf, block, count); in stm32_flash_bdev_read_block()
102 memcpy(buf, (uint8_t *)FLASHAXI_BASE + block * bdev->block_size, count * bdev->block_size); in stm32_flash_bdev_read_block()
104 return count * bdev->block_size; in stm32_flash_bdev_read_block()
107 …size_t stm32_flash_bdev_write_block(struct bdev *bdev, const void *buf, bnum_t block, uint count) { in stm32_flash_bdev_write_block() argument
108 LTRACEF("dev %p, buf %p, block 0x%x, count %u\n", bdev, buf, block, count); in stm32_flash_bdev_write_block()
112 ssize_t written_bytes = count * bdev->block_size; in stm32_flash_bdev_write_block()
114 while (count > 0) { in stm32_flash_bdev_write_block()
[all …]

Completed in 27 milliseconds

1234567