b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | #ifndef __MRVL_AOC_H__ |
| 2 | #define __MRVL_AOC_H__ |
| 3 | |
| 4 | #include <syslog.h> |
| 5 | #include <android/log.h> |
| 6 | |
| 7 | #define DEBUG(level, fmt, ...) do { \ |
| 8 | if (level >= 2) { \ |
| 9 | syslog(0, fmt, ## __VA_ARGS__); \ |
| 10 | fprintf(stderr, "aoc: %s(%d): " fmt, __func__, __LINE__, ## __VA_ARGS__); \ |
| 11 | } } while (0) |
| 12 | |
| 13 | #define LOG(fmt, ...) do { \ |
| 14 | syslog(0, fmt, ## __VA_ARGS__); \ |
| 15 | fprintf(stderr, "aoc: "fmt, ## __VA_ARGS__); \ |
| 16 | } while (0) |
| 17 | |
| 18 | #define ERROR(fmt, ...) do { \ |
| 19 | syslog(0, fmt, ## __VA_ARGS__); \ |
| 20 | fprintf(stderr, "aoc: "fmt, ## __VA_ARGS__); \ |
| 21 | } while (0) |
| 22 | |
| 23 | extern pthread_mutex_t aoc_ubus_mutex; |
| 24 | extern struct ubus_object aoc_object; |
| 25 | #endif |