blob: fb5889d26ffbe9d4c7dcd431d34a3bfcaee11e6f [file] [log] [blame]
Jon Medhurst15ce78d2014-04-10 09:02:02 +01001/**
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
18class UserSpaceSource : public Source {
19public:
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
30private:
31 Buffer mBuffer;
32
33 // Intentionally unimplemented
34 UserSpaceSource(const UserSpaceSource &);
35 UserSpaceSource &operator=(const UserSpaceSource &);
36};
37
38#endif // USERSPACESOURCE_H