1*bbb1b6f9SApple OSS Distributions /* 2*bbb1b6f9SApple OSS Distributions * Copyright (c) 2008-2013 Apple Inc. All rights reserved. 3*bbb1b6f9SApple OSS Distributions * 4*bbb1b6f9SApple OSS Distributions * @APPLE_APACHE_LICENSE_HEADER_START@ 5*bbb1b6f9SApple OSS Distributions * 6*bbb1b6f9SApple OSS Distributions * Licensed under the Apache License, Version 2.0 (the "License"); 7*bbb1b6f9SApple OSS Distributions * you may not use this file except in compliance with the License. 8*bbb1b6f9SApple OSS Distributions * You may obtain a copy of the License at 9*bbb1b6f9SApple OSS Distributions * 10*bbb1b6f9SApple OSS Distributions * http://www.apache.org/licenses/LICENSE-2.0 11*bbb1b6f9SApple OSS Distributions * 12*bbb1b6f9SApple OSS Distributions * Unless required by applicable law or agreed to in writing, software 13*bbb1b6f9SApple OSS Distributions * distributed under the License is distributed on an "AS IS" BASIS, 14*bbb1b6f9SApple OSS Distributions * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15*bbb1b6f9SApple OSS Distributions * See the License for the specific language governing permissions and 16*bbb1b6f9SApple OSS Distributions * limitations under the License. 17*bbb1b6f9SApple OSS Distributions * 18*bbb1b6f9SApple OSS Distributions * @APPLE_APACHE_LICENSE_HEADER_END@ 19*bbb1b6f9SApple OSS Distributions */ 20*bbb1b6f9SApple OSS Distributions 21*bbb1b6f9SApple OSS Distributions #include <stdbool.h> 22*bbb1b6f9SApple OSS Distributions #include <os/base.h> 23*bbb1b6f9SApple OSS Distributions #include <os/object.h> 24*bbb1b6f9SApple OSS Distributions #include <kern/assert.h> 25*bbb1b6f9SApple OSS Distributions 26*bbb1b6f9SApple OSS Distributions /* 27*bbb1b6f9SApple OSS Distributions * Lifecycle of OSLog handles, tracked by os_retain() and os_release(), is that 28*bbb1b6f9SApple OSS Distributions * they are allocated and then never freed. Therefore, there is no need for 29*bbb1b6f9SApple OSS Distributions * reference counting. 30*bbb1b6f9SApple OSS Distributions */ 31*bbb1b6f9SApple OSS Distributions 32*bbb1b6f9SApple OSS Distributions void* os_retain(void * obj)33*bbb1b6f9SApple OSS Distributionsos_retain(void *obj) 34*bbb1b6f9SApple OSS Distributions { 35*bbb1b6f9SApple OSS Distributions return obj; 36*bbb1b6f9SApple OSS Distributions } 37*bbb1b6f9SApple OSS Distributions 38*bbb1b6f9SApple OSS Distributions void os_release(void * obj __unused)39*bbb1b6f9SApple OSS Distributionsos_release(void *obj __unused) 40*bbb1b6f9SApple OSS Distributions { 41*bbb1b6f9SApple OSS Distributions } 42