| #ifndef __MRVL_AOC_H__ |
| #define __MRVL_AOC_H__ |
| |
| #include <syslog.h> |
| #include <android/log.h> |
| |
| #define DEBUG(level, fmt, ...) do { \ |
| if (level >= 2) { \ |
| syslog(0, fmt, ## __VA_ARGS__); \ |
| fprintf(stderr, "aoc: %s(%d): " fmt, __func__, __LINE__, ## __VA_ARGS__); \ |
| } } while (0) |
| |
| #define LOG(fmt, ...) do { \ |
| syslog(0, fmt, ## __VA_ARGS__); \ |
| fprintf(stderr, "aoc: "fmt, ## __VA_ARGS__); \ |
| } while (0) |
| |
| #define ERROR(fmt, ...) do { \ |
| syslog(0, fmt, ## __VA_ARGS__); \ |
| fprintf(stderr, "aoc: "fmt, ## __VA_ARGS__); \ |
| } while (0) |
| |
| extern pthread_mutex_t aoc_ubus_mutex; |
| extern struct ubus_object aoc_object; |
| #endif |