diff options
Diffstat (limited to 'daemon/UserSpaceSource.h')
-rw-r--r-- | daemon/UserSpaceSource.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/daemon/UserSpaceSource.h b/daemon/UserSpaceSource.h new file mode 100644 index 0000000..fb5889d --- /dev/null +++ b/daemon/UserSpaceSource.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /** | ||
2 | * Copyright (C) ARM Limited 2010-2014. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef USERSPACESOURCE_H | ||
10 | #define USERSPACESOURCE_H | ||
11 | |||
12 | #include <semaphore.h> | ||
13 | |||
14 | #include "Buffer.h" | ||
15 | #include "Source.h" | ||
16 | |||
17 | // User space counters - currently just hwmon | ||
18 | class UserSpaceSource : public Source { | ||
19 | public: | ||
20 | UserSpaceSource(sem_t *senderSem); | ||
21 | ~UserSpaceSource(); | ||
22 | |||
23 | bool prepare(); | ||
24 | void run(); | ||
25 | void interrupt(); | ||
26 | |||
27 | bool isDone(); | ||
28 | void write(Sender *sender); | ||
29 | |||
30 | private: | ||
31 | Buffer mBuffer; | ||
32 | |||
33 | // Intentionally unimplemented | ||
34 | UserSpaceSource(const UserSpaceSource &); | ||
35 | UserSpaceSource &operator=(const UserSpaceSource &); | ||
36 | }; | ||
37 | |||
38 | #endif // USERSPACESOURCE_H | ||