2 * Copyright (C) ARM Limited 2010-2015. All rights reserved.
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.
10 #define DRIVERSOURCE_H
12 #include <semaphore.h>
20 class DriverSource : public Source {
22 DriverSource(sem_t *senderSem, sem_t *startProfile);
30 void write(Sender *sender);
32 static void checkVersion();
33 static int readIntDriver(const char *fullpath, int *value);
34 static int readInt64Driver(const char *fullpath, int64_t *value);
35 static int writeDriver(const char *fullpath, const char *data);
36 static int writeDriver(const char *path, int value);
37 static int writeDriver(const char *path, int64_t value);
38 static int writeReadDriver(const char *path, int *value);
39 static int writeReadDriver(const char *path, int64_t *value);
42 static void *bootstrapThreadStatic(void *arg);
43 void bootstrapThread();
47 sem_t *const mSenderSem;
48 sem_t *const mStartProfile;
53 // Intentionally unimplemented
54 DriverSource(const DriverSource &);
55 DriverSource &operator=(const DriverSource &);
58 #endif // DRIVERSOURCE_H