Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /** |
2 | * @file event_buffer.h | |
3 | * | |
4 | * @remark Copyright 2002 OProfile authors | |
5 | * @remark Read the file COPYING | |
6 | * | |
7 | * @author John Levon <levon@movementarian.org> | |
8 | */ | |
9 | ||
10 | #ifndef EVENT_BUFFER_H | |
11 | #define EVENT_BUFFER_H | |
12 | ||
6a18037d | 13 | #include <linux/types.h> |
b76a06e0 | 14 | #include <linux/mutex.h> |
6a18037d | 15 | |
1da177e4 LT |
16 | int alloc_event_buffer(void); |
17 | ||
18 | void free_event_buffer(void); | |
6a18037d | 19 | |
a5598ca0 CL |
20 | /** |
21 | * Add data to the event buffer. | |
22 | * The data passed is free-form, but typically consists of | |
23 | * file offsets, dcookies, context information, and ESCAPE codes. | |
24 | */ | |
25 | void add_event_entry(unsigned long data); | |
26 | ||
1da177e4 LT |
27 | /* wake up the process sleeping on the event file */ |
28 | void wake_up_buffer_waiter(void); | |
1474855d | 29 | |
0c0a400d JL |
30 | #define INVALID_COOKIE ~0UL |
31 | #define NO_COOKIE 0UL | |
32 | ||
d54b1fdb | 33 | extern const struct file_operations event_buffer_fops; |
6a18037d | 34 | |
1da177e4 LT |
35 | /* mutex between sync_cpu_buffers() and the |
36 | * file reading code. | |
37 | */ | |
59cc185a | 38 | extern struct mutex buffer_mutex; |
6a18037d | 39 | |
1da177e4 | 40 | #endif /* EVENT_BUFFER_H */ |