Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 28) sorted by relevance

12

/DragonOS-0.1.8/user/apps/test_relibc/
Dmain.c55 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/
Dkfifo.c18 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 …]
Dstdlib.c12 static char buffer[21] = {0}; in ltoa() local
13 char *pos = buffer + sizeof(buffer) - 1; in ltoa()
22 if (pos < buffer) in ltoa()
Dcrc8.c33 uint8_t crc8(uint8_t crc, uint8_t const *buffer, size_t len) in crc8() argument
38 crc = crc8_table[crc ^ *buffer++]; in crc8()
Dcrc7.c31 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()
Dcrc16.c34 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()
Dcrc32.c49 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()
Dcrc64.c50 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/
Dmain.c37 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/
Dps2_mouse.c20 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()
Dps2_mouse.h79 unsigned char buffer[ps2_mouse_buffer_size]; member
/DragonOS-0.1.8/kernel/src/syscall/
Duser_access.rs78 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/
Dglib.h180 #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) \
Dcrc32.h12 uint32_t crc32(uint32_t crc, const uint8_t *buffer, size_t len);
Dcrc64.h12 uint64_t crc64(uint64_t crc, const uint8_t *buffer, size_t len);
Dcrc7.h12 uint8_t crc7(uint8_t crc, const uint8_t *buffer, size_t len);
Dcrc8.h12 uint8_t crc8(uint8_t crc, const uint8_t *buffer, size_t len);
Dcrc16.h12 uint16_t crc16(uint16_t crc, const uint8_t *buffer, size_t len);
Dkfifo.h12 void *buffer; // 缓冲区 member
89 void kfifo_init(struct kfifo_t *fifo, void *buffer, uint32_t size);
/DragonOS-0.1.8/kernel/src/driver/virtio/
Dvirtio_impl.rs85 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/
Dkernel_api.md701 **`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**
Ddata_structures.md16 &emsp;&emsp;通过动态方式初始化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/
Dtest-kfifo.c20 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/
Derrno.md12 #define E2BIG 1 /* 参数列表过长,或者在输出buffer中缺少空间 或者参数比系统内建的最大值要大 Argument list too long.*/
99 #define ENOBUFS 42 /* 缓冲区空间不足 No buffer space available.*/
/DragonOS-0.1.8/user/apps/test_bind/
Dmain.c18 char buffer[MAX_REQUEST_SIZE] = {0}; variable

12