Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
event.c File Reference
#include <linux/sched.h>
#include <linux/slab.h>
#include "ibmasm.h"
#include "lowlevel.h"

Go to the source code of this file.

Functions

void ibmasm_receive_event (struct service_processor *sp, void *data, unsigned int data_size)
 
int ibmasm_get_next_event (struct service_processor *sp, struct event_reader *reader)
 
void ibmasm_cancel_next_event (struct event_reader *reader)
 
void ibmasm_event_reader_register (struct service_processor *sp, struct event_reader *reader)
 
void ibmasm_event_reader_unregister (struct service_processor *sp, struct event_reader *reader)
 
int ibmasm_event_buffer_init (struct service_processor *sp)
 
void ibmasm_event_buffer_exit (struct service_processor *sp)
 

Function Documentation

void ibmasm_cancel_next_event ( struct event_reader reader)

Definition at line 124 of file event.c.

void ibmasm_event_buffer_exit ( struct service_processor sp)

Definition at line 174 of file event.c.

int ibmasm_event_buffer_init ( struct service_processor sp)

Definition at line 150 of file event.c.

void ibmasm_event_reader_register ( struct service_processor sp,
struct event_reader reader 
)

Definition at line 130 of file event.c.

void ibmasm_event_reader_unregister ( struct service_processor sp,
struct event_reader reader 
)

Definition at line 141 of file event.c.

int ibmasm_get_next_event ( struct service_processor sp,
struct event_reader reader 
)

get_next_event Called by event readers (initiated from user space through the file system). Sleeps until a new event is available.

Definition at line 91 of file event.c.

void ibmasm_receive_event ( struct service_processor sp,
void data,
unsigned int  data_size 
)

receive_event Called by the interrupt handler when a dot command of type sp_event is received. Store the event in the circular event buffer, wake up any sleeping event readers. There is no reader marker in the buffer, therefore readers are responsible for keeping up with the writer, or they will lose events.

Definition at line 57 of file event.c.