Move likely/unlikely to compiler.h

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2018-12-15 19:11:46 +00:00
parent b73dce1d6d
commit 68873efaa2
3 changed files with 7 additions and 8 deletions

View File

@@ -1,4 +1,7 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2018 Yuxuan Shui <yshuiv7@gmail.com>
#pragma once
#define auto __auto_type
#define auto __auto_type
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)