Lines Matching refs:reader
28 struct event_reader *reader; in wake_up_event_readers() local
30 list_for_each_entry(reader, &sp->event_buffer->readers, node) in wake_up_event_readers()
31 wake_up_interruptible(&reader->wait); in wake_up_event_readers()
77 int ibmasm_get_next_event(struct service_processor *sp, struct event_reader *reader) in ibmasm_get_next_event() argument
84 reader->cancelled = 0; in ibmasm_get_next_event()
86 if (wait_event_interruptible(reader->wait, in ibmasm_get_next_event()
87 event_available(buffer, reader) || reader->cancelled)) in ibmasm_get_next_event()
90 if (!event_available(buffer, reader)) in ibmasm_get_next_event()
97 while (event->serial_number < reader->next_serial_number) { in ibmasm_get_next_event()
101 memcpy(reader->data, event->data, event->data_size); in ibmasm_get_next_event()
102 reader->data_size = event->data_size; in ibmasm_get_next_event()
103 reader->next_serial_number = event->serial_number + 1; in ibmasm_get_next_event()
110 void ibmasm_cancel_next_event(struct event_reader *reader) in ibmasm_cancel_next_event() argument
112 reader->cancelled = 1; in ibmasm_cancel_next_event()
113 wake_up_interruptible(&reader->wait); in ibmasm_cancel_next_event()
116 void ibmasm_event_reader_register(struct service_processor *sp, struct event_reader *reader) in ibmasm_event_reader_register() argument
120 reader->next_serial_number = sp->event_buffer->next_serial_number; in ibmasm_event_reader_register()
121 init_waitqueue_head(&reader->wait); in ibmasm_event_reader_register()
123 list_add(&reader->node, &sp->event_buffer->readers); in ibmasm_event_reader_register()
127 void ibmasm_event_reader_unregister(struct service_processor *sp, struct event_reader *reader) in ibmasm_event_reader_unregister() argument
132 list_del(&reader->node); in ibmasm_event_reader_unregister()