Begin processing read commands.
[minibind.git] / jni / minibind / common.h
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MINIBIND_COMMON_H_
6
7 #include <android/log.h>
8 #include <errno.h>
9 #include <stdio.h>
10
11 //#define ALOG(...) __android_log_print(ANDROID_LOG_WARN, "minibind", __VA_ARGS__)
12 #define ALOG(...) printf(__VA_ARGS__); putc('\n', stdout)
13
14 #define AERR(msg) ALOG(msg ": %s", strerror(errno))
15
16 #define CHECK(cond) if (!(cond)) { ALOG("ASSERTION FAILURE: %s @ %s:%d", #cond, __FILE__, __LINE__ ); abort(); }
17
18 #define BINDER_VM_SIZE ((1*1024*1024) - (4096 *2))
19
20 #define DISALLOW_COPY_AND_ASSIGN(cls) cls(const cls&) = delete
21
22 #endif // MINIBIND_COMMON_H_