xref: /xnu-12377.1.9/libkern/os/object.c (revision f6217f891ac0bb64f3d375211650a4c1ff8ca1ea)
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 #include <stdbool.h>
22*f6217f89SApple OSS Distributions #include <os/base.h>
23*f6217f89SApple OSS Distributions #include <os/object.h>
24*f6217f89SApple OSS Distributions #include <kern/assert.h>
25*f6217f89SApple OSS Distributions 
26*f6217f89SApple OSS Distributions /*
27*f6217f89SApple OSS Distributions  * Lifecycle of OSLog handles, tracked by os_retain() and os_release(), is that
28*f6217f89SApple OSS Distributions  * they are allocated and then never freed. Therefore, there is no need for
29*f6217f89SApple OSS Distributions  * reference counting.
30*f6217f89SApple OSS Distributions  */
31*f6217f89SApple OSS Distributions 
32*f6217f89SApple OSS Distributions void*
os_retain(void * obj)33*f6217f89SApple OSS Distributions os_retain(void *obj)
34*f6217f89SApple OSS Distributions {
35*f6217f89SApple OSS Distributions 	return obj;
36*f6217f89SApple OSS Distributions }
37*f6217f89SApple OSS Distributions 
38*f6217f89SApple OSS Distributions void
os_release(void * obj __unused)39*f6217f89SApple OSS Distributions os_release(void *obj __unused)
40*f6217f89SApple OSS Distributions {
41*f6217f89SApple OSS Distributions }
42