/DragonOS-0.1.8/user/apps/test_relibc/ |
D | main.c | 55 char buffer[BUFFER_SIZE]; in tcp_server() local 75 memset(buffer, 0, sizeof(buffer)); in tcp_server() 76 int len = recv(conn, buffer, sizeof(buffer), 0); in tcp_server() 82 if (strcmp(buffer, "exit\n") == 0) in tcp_server() 87 printf("Received: %s\n", buffer); in tcp_server() 88 send(conn, buffer, len, 0); in tcp_server() 112 char buffer[BUFFER_SIZE]; in udp_server() local 118 memset(buffer, 0, sizeof(buffer)); in udp_server() 119 …int len = recvfrom(server_sockfd, buffer, sizeof(buffer), 0, (struct sockaddr *)&client_addr, &cli… in udp_server() 125 if (strcmp(buffer, "exit\n") == 0) in udp_server() [all …]
|
/DragonOS-0.1.8/kernel/src/libs/ |
D | kfifo.c | 18 fifo->buffer = kmalloc(size, 0); in kfifo_alloc() 19 if (fifo->buffer == NULL) in kfifo_alloc() 35 void kfifo_init(struct kfifo_t *fifo, void *buffer, uint32_t size) in kfifo_init() argument 39 fifo->buffer = buffer; in kfifo_init() 63 memcpy(fifo->buffer + fifo->in_offset, from, tmp); in kfifo_in() 64 memcpy(fifo->buffer, from + tmp, size - tmp); in kfifo_in() 69 memcpy(fifo->buffer + fifo->in_offset, from, size); in kfifo_in() 97 memcpy(to, fifo->buffer + fifo->out_offset, tmp); in kfifo_out() 98 memcpy(to + tmp, fifo->buffer, size - tmp); in kfifo_out() 103 memcpy(to, fifo->buffer + fifo->out_offset, size); in kfifo_out() [all …]
|
D | stdlib.c | 12 static char buffer[21] = {0}; in ltoa() local 13 char *pos = buffer + sizeof(buffer) - 1; in ltoa() 22 if (pos < buffer) in ltoa()
|
D | crc8.c | 33 uint8_t crc8(uint8_t crc, uint8_t const *buffer, size_t len) in crc8() argument 38 crc = crc8_table[crc ^ *buffer++]; in crc8()
|
D | crc7.c | 31 uint8_t crc7(uint8_t crc, const uint8_t *buffer, size_t len) in crc7() argument 35 crc = crc7_table[(crc << 1) ^ *buffer++]; in crc7()
|
D | crc16.c | 34 uint16_t crc16(uint16_t crc, uint8_t const *buffer, size_t len) in crc16() argument 38 crc = (crc << 8) ^ crc16_table[((crc >> 8) ^ *buffer++) & 0xff]; in crc16()
|
D | crc32.c | 49 uint32_t crc32(uint32_t crc, uint8_t const *buffer, size_t len) in crc32() argument 53 crc = (crc << 8) ^ (crc32_table[((crc >> 24) ^ *buffer++) & 0xff]); in crc32()
|
D | crc64.c | 50 uint64_t crc64(uint64_t crc, uint8_t const *buffer, size_t len) in crc64() argument 54 crc = (crc << 8) ^ (crc64_table[((crc >> 56) ^ *buffer++) & 0xff]); in crc64()
|
/DragonOS-0.1.8/user/apps/http_server/ |
D | main.c | 37 char buffer[MAX_RESPONSE_SIZE]; in send_header() local 68 …sprintf(buffer, "HTTP/1.1 200 OK\nContent-Type: %s\nContent-Length: %d\n\n", content_type, content… in send_header() 69 send_response(sockfd, buffer); in send_header() 91 char buffer[1048576]; in send_file() local 97 readSize = read(fd, &buffer, to_read); in send_file() 100 void *p = buffer; in send_file() 179 char buffer[MAX_REQUEST_SIZE] = {0}; in main() local 227 valread = read(new_socket, buffer, MAX_REQUEST_SIZE); in main() 228 printf("%s\n", buffer); in main() 231 handle_request(new_socket, buffer); in main()
|
/DragonOS-0.1.8/kernel/src/driver/mouse/ |
D | ps2_mouse.c | 20 ps2_mouse_buf_ptr->ptr_head = ps2_mouse_buf_ptr->buffer; in ps2_mouse_clear_buf() 21 ps2_mouse_buf_ptr->ptr_tail = ps2_mouse_buf_ptr->buffer; in ps2_mouse_clear_buf() 23 memset(ps2_mouse_buf_ptr->buffer, 0, ps2_mouse_buffer_size); in ps2_mouse_clear_buf() 38 if (ps2_mouse_buf_ptr->ptr_tail == ps2_mouse_buf_ptr->buffer + ps2_mouse_buffer_size) in ps2_mouse_get_scancode() 39 ps2_mouse_buf_ptr->ptr_tail = ps2_mouse_buf_ptr->buffer; in ps2_mouse_get_scancode() 62 if (ps2_mouse_buf_ptr->ptr_head == ps2_mouse_buf_ptr->buffer + ps2_mouse_buffer_size) in ps2_mouse_handler() 63 ps2_mouse_buf_ptr->ptr_head = ps2_mouse_buf_ptr->buffer; in ps2_mouse_handler() 205 ps2_mouse_buf_ptr->ptr_head = ps2_mouse_buf_ptr->buffer; in ps2_mouse_init() 206 ps2_mouse_buf_ptr->ptr_tail = ps2_mouse_buf_ptr->buffer; in ps2_mouse_init() 208 memset(ps2_mouse_buf_ptr->buffer, 0, ps2_mouse_buffer_size); in ps2_mouse_init()
|
D | ps2_mouse.h | 79 unsigned char buffer[ps2_mouse_buffer_size]; member
|
/DragonOS-0.1.8/kernel/src/syscall/ |
D | user_access.rs | 78 let mut buffer = Vec::new(); in check_and_clone_cstr() localVariable 92 buffer.push(c[0]); in check_and_clone_cstr() 94 return Ok(String::from_utf8(buffer).map_err(|_| SystemError::EFAULT)?); in check_and_clone_cstr() 116 let mut buffer = Vec::new(); in check_and_clone_cstr_array() localVariable 137 buffer.push(string); in check_and_clone_cstr_array() 139 return Ok(buffer); in check_and_clone_cstr_array()
|
/DragonOS-0.1.8/kernel/src/common/ |
D | glib.h | 180 #define io_insw(port, buffer, nr) \ argument 181 __asm__ __volatile__("cld;rep;insw;mfence;" ::"d"(port), "D"(buffer), "c"(nr) \ 188 #define io_outsw(port, buffer, nr) \ argument 189 __asm__ __volatile__("cld;rep;outsw;mfence;" ::"d"(port), "S"(buffer), "c"(nr) \
|
D | crc32.h | 12 uint32_t crc32(uint32_t crc, const uint8_t *buffer, size_t len);
|
D | crc64.h | 12 uint64_t crc64(uint64_t crc, const uint8_t *buffer, size_t len);
|
D | crc7.h | 12 uint8_t crc7(uint8_t crc, const uint8_t *buffer, size_t len);
|
D | crc8.h | 12 uint8_t crc8(uint8_t crc, const uint8_t *buffer, size_t len);
|
D | crc16.h | 12 uint16_t crc16(uint16_t crc, const uint8_t *buffer, size_t len);
|
D | kfifo.h | 12 void *buffer; // 缓冲区 member 89 void kfifo_init(struct kfifo_t *fifo, void *buffer, uint32_t size);
|
/DragonOS-0.1.8/kernel/src/driver/virtio/ |
D | virtio_impl.rs | 85 buffer: NonNull<[u8]>, in share() 88 let vaddr = VirtAddr::new(buffer.as_ptr() as *mut u8 as usize); in share()
|
/DragonOS-0.1.8/docs/kernel/core_api/ |
D | kernel_api.md | 701 **`uint8_t crc7(uint8_t crc, const uint8_t *buffer, size_t len)`** 703 **`uint8_t crc8(uint8_t crc, const uint8_t *buffer, size_t len)`** 705 **`uint16_t crc16(uint16_t crc, uint8_t const *buffer, size_t len)`** 707 **`uint32_t crc32(uint32_t crc, uint8_t const *buffer, size_t len)`** 709 **`uint64_t crc64(uint64_t crc, uint8_t const *buffer, size_t len)`** 721 **buffer**
|
D | data_structures.md | 16   通过动态方式初始化kfifo缓冲队列。fifo缓冲区的buffer将由该函数进行申请。 38 `void kfifo_init(struct kfifo_t *fifo, void *buffer, uint32_t size)` 50 **buffer**
|
/DragonOS-0.1.8/kernel/src/ktest/ |
D | test-kfifo.c | 20 assert(fifo.buffer != NULL); in ktest_kfifo_case0_1() 147 assert(fifo.buffer == NULL); in ktest_kfifo_case0_1()
|
/DragonOS-0.1.8/docs/userland/libc/apis/api-list/ |
D | errno.md | 12 #define E2BIG 1 /* 参数列表过长,或者在输出buffer中缺少空间 或者参数比系统内建的最大值要大 Argument list too long.*/ 99 #define ENOBUFS 42 /* 缓冲区空间不足 No buffer space available.*/
|
/DragonOS-0.1.8/user/apps/test_bind/ |
D | main.c | 18 char buffer[MAX_REQUEST_SIZE] = {0}; variable
|