1*f6217f89SApple OSS Distributions /* 2*f6217f89SApple OSS Distributions * Copyright (c) 2008-2013 Apple Inc. All rights reserved. 3*f6217f89SApple OSS Distributions * 4*f6217f89SApple OSS Distributions * @APPLE_APACHE_LICENSE_HEADER_START@ 5*f6217f89SApple OSS Distributions * 6*f6217f89SApple OSS Distributions * Licensed under the Apache License, Version 2.0 (the "License"); 7*f6217f89SApple OSS Distributions * you may not use this file except in compliance with the License. 8*f6217f89SApple OSS Distributions * You may obtain a copy of the License at 9*f6217f89SApple OSS Distributions * 10*f6217f89SApple OSS Distributions * http://www.apache.org/licenses/LICENSE-2.0 11*f6217f89SApple OSS Distributions * 12*f6217f89SApple OSS Distributions * Unless required by applicable law or agreed to in writing, software 13*f6217f89SApple OSS Distributions * distributed under the License is distributed on an "AS IS" BASIS, 14*f6217f89SApple OSS Distributions * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15*f6217f89SApple OSS Distributions * See the License for the specific language governing permissions and 16*f6217f89SApple OSS Distributions * limitations under the License. 17*f6217f89SApple OSS Distributions * 18*f6217f89SApple OSS Distributions * @APPLE_APACHE_LICENSE_HEADER_END@ 19*f6217f89SApple OSS Distributions */ 20*f6217f89SApple OSS Distributions 21*f6217f89SApple OSS Distributions #ifndef __OS_BASE_PRIVATE__ 22*f6217f89SApple OSS Distributions #define __OS_BASE_PRIVATE__ 23*f6217f89SApple OSS Distributions 24*f6217f89SApple OSS Distributions #ifndef KERNEL 25*f6217f89SApple OSS Distributions #include <TargetConditionals.h> 26*f6217f89SApple OSS Distributions #endif 27*f6217f89SApple OSS Distributions #include <os/base.h> 28*f6217f89SApple OSS Distributions 29*f6217f89SApple OSS Distributions #ifndef os_fastpath 30*f6217f89SApple OSS Distributions #define os_fastpath(x) ((__typeof__(x))OS_EXPECT((long)(x), ~0l)) 31*f6217f89SApple OSS Distributions #endif 32*f6217f89SApple OSS Distributions #ifndef os_slowpath 33*f6217f89SApple OSS Distributions #define os_slowpath(x) ((__typeof__(x))OS_EXPECT((long)(x), 0l)) 34*f6217f89SApple OSS Distributions #endif 35*f6217f89SApple OSS Distributions #ifndef os_likely 36*f6217f89SApple OSS Distributions #define os_likely(x) OS_EXPECT(!!(x), 1) 37*f6217f89SApple OSS Distributions #endif 38*f6217f89SApple OSS Distributions #ifndef os_unlikely 39*f6217f89SApple OSS Distributions #define os_unlikely(x) OS_EXPECT(!!(x), 0) 40*f6217f89SApple OSS Distributions #endif 41*f6217f89SApple OSS Distributions 42*f6217f89SApple OSS Distributions 43*f6217f89SApple OSS Distributions #endif // __OS_BASE_PRIVATE__ 44