Home
last modified time | relevance | path

Searched refs:pipe_ptr (Results 1 – 1 of 1) sorted by relevance

/DragonOS-0.1.3/kernel/src/ipc/
Dpipe.c34 struct pipe_t *pipe_ptr = NULL; in pipe_read() local
37 pipe_ptr = (struct pipe_t *)file_ptr->private_data; in pipe_read()
38 spin_lock(&pipe_ptr->data.lock); in pipe_read()
39 while (pipe_ptr->data.valid_cnt == 0) in pipe_read()
43 wait_queue_wakeup(&pipe_ptr->data.write_wait_queue, PROC_UNINTERRUPTIBLE); in pipe_read()
44 wait_queue_sleep_on_unlock(&pipe_ptr->data.read_wait_queue, (void *)&pipe_ptr->data.lock); in pipe_read()
45 spin_lock(&pipe_ptr->data.lock); in pipe_read()
47 for (i = 0; i < pipe_ptr->data.valid_cnt; i++) in pipe_read()
53 copy_to_user(buf + i, &pipe_ptr->buf[pipe_ptr->data.read_pos], sizeof(char)); in pipe_read()
54 pipe_ptr->data.read_pos = (pipe_ptr->data.read_pos + 1) % PIPE_BUFF_SIZE; in pipe_read()
[all …]