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