blob: 77ce058a92b83c1f8afad7e9e345bf80d7045f8e [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#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
23extern pthread_mutex_t aoc_ubus_mutex;
24extern struct ubus_object aoc_object;
25#endif