xref: /xnu-8020.140.41/libkern/os/object.c (revision 27b03b360a988dfd3dfdf34262bb0042026747cc) !
1*27b03b36SApple OSS Distributions /*
2*27b03b36SApple OSS Distributions  * Copyright (c) 2008-2013 Apple Inc. All rights reserved.
3*27b03b36SApple OSS Distributions  *
4*27b03b36SApple OSS Distributions  * @APPLE_APACHE_LICENSE_HEADER_START@
5*27b03b36SApple OSS Distributions  *
6*27b03b36SApple OSS Distributions  * Licensed under the Apache License, Version 2.0 (the "License");
7*27b03b36SApple OSS Distributions  * you may not use this file except in compliance with the License.
8*27b03b36SApple OSS Distributions  * You may obtain a copy of the License at
9*27b03b36SApple OSS Distributions  *
10*27b03b36SApple OSS Distributions  *     http://www.apache.org/licenses/LICENSE-2.0
11*27b03b36SApple OSS Distributions  *
12*27b03b36SApple OSS Distributions  * Unless required by applicable law or agreed to in writing, software
13*27b03b36SApple OSS Distributions  * distributed under the License is distributed on an "AS IS" BASIS,
14*27b03b36SApple OSS Distributions  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15*27b03b36SApple OSS Distributions  * See the License for the specific language governing permissions and
16*27b03b36SApple OSS Distributions  * limitations under the License.
17*27b03b36SApple OSS Distributions  *
18*27b03b36SApple OSS Distributions  * @APPLE_APACHE_LICENSE_HEADER_END@
19*27b03b36SApple OSS Distributions  */
20*27b03b36SApple OSS Distributions 
21*27b03b36SApple OSS Distributions #include <stdbool.h>
22*27b03b36SApple OSS Distributions #include <os/base.h>
23*27b03b36SApple OSS Distributions #include <os/object.h>
24*27b03b36SApple OSS Distributions #include <kern/assert.h>
25*27b03b36SApple OSS Distributions 
26*27b03b36SApple OSS Distributions 
27*27b03b36SApple OSS Distributions /* XXX temporary until full vtable and refcount support */
28*27b03b36SApple OSS Distributions extern struct os_log_s _os_log_default;
29*27b03b36SApple OSS Distributions 
30*27b03b36SApple OSS Distributions void*
os_retain(void * obj)31*27b03b36SApple OSS Distributions os_retain(void *obj)
32*27b03b36SApple OSS Distributions {
33*27b03b36SApple OSS Distributions 	/* XXX temporary nop */
34*27b03b36SApple OSS Distributions 	assert(obj == &_os_log_default);
35*27b03b36SApple OSS Distributions 	return obj;
36*27b03b36SApple OSS Distributions }
37*27b03b36SApple OSS Distributions 
38*27b03b36SApple OSS Distributions void
os_release(void * obj __unused)39*27b03b36SApple OSS Distributions os_release(void *obj __unused)
40*27b03b36SApple OSS Distributions {
41*27b03b36SApple OSS Distributions 	/* XXX temporary nop */
42*27b03b36SApple OSS Distributions 	assert(obj == &_os_log_default);
43*27b03b36SApple OSS Distributions }
44