From 392e8802486cb573b916e746010e141a75f507e6 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 15 Nov 2014 09:58:27 +0800 Subject: init android origin source code --- ANDROID_3.4.5/drivers/oprofile/event_buffer.h | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 ANDROID_3.4.5/drivers/oprofile/event_buffer.h (limited to 'ANDROID_3.4.5/drivers/oprofile/event_buffer.h') diff --git a/ANDROID_3.4.5/drivers/oprofile/event_buffer.h b/ANDROID_3.4.5/drivers/oprofile/event_buffer.h new file mode 100644 index 00000000..a8d5bb3c --- /dev/null +++ b/ANDROID_3.4.5/drivers/oprofile/event_buffer.h @@ -0,0 +1,40 @@ +/** + * @file event_buffer.h + * + * @remark Copyright 2002 OProfile authors + * @remark Read the file COPYING + * + * @author John Levon + */ + +#ifndef EVENT_BUFFER_H +#define EVENT_BUFFER_H + +#include +#include + +int alloc_event_buffer(void); + +void free_event_buffer(void); + +/** + * Add data to the event buffer. + * The data passed is free-form, but typically consists of + * file offsets, dcookies, context information, and ESCAPE codes. + */ +void add_event_entry(unsigned long data); + +/* wake up the process sleeping on the event file */ +void wake_up_buffer_waiter(void); + +#define INVALID_COOKIE ~0UL +#define NO_COOKIE 0UL + +extern const struct file_operations event_buffer_fops; + +/* mutex between sync_cpu_buffers() and the + * file reading code. + */ +extern struct mutex buffer_mutex; + +#endif /* EVENT_BUFFER_H */ -- cgit