]> git.saurik.com Git - apple/xnu.git/blame - libkern/os/firehose.h
xnu-4570.1.46.tar.gz
[apple/xnu.git] / libkern / os / firehose.h
CommitLineData
39037602
A
1/*
2 * Copyright (c) 2015 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24#ifndef __firehose_h
25#define __firehose_h
26
27__BEGIN_DECLS
28
29/*!
30 * @function __firehose_buffer_push_to_logd
31 *
32 * @abstract
33 * Called by the dispatch firehose apis to notify logd that a chunk is available
34 */
35__WATCHOS_AVAILABLE(3.0) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0)
36void __firehose_buffer_push_to_logd(firehose_buffer_t fb, bool for_io);
37
38/*!
39 * @function __firehose_allocate
40 *
41 * @abstract
42 * Wrapper to allocate kernel memory
43 */
44__WATCHOS_AVAILABLE(3.0) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0)
45void __firehose_allocate(vm_offset_t *addr, vm_size_t size);
46
47/*!
48 * @function __firehose_critical_region_enter
49 *
50 * @abstract
51 * Function that disables preemption
52 */
53__WATCHOS_AVAILABLE(3.0) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0)
54extern void __firehose_critical_region_enter(void);
55
56/*!
57 * @function __firehose_critical_region_leave
58 *
59 * @abstract
60 * Function that enables preemption
61 */
62__WATCHOS_AVAILABLE(3.0) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0)
63extern void __firehose_critical_region_leave(void);
64
65extern void oslogwakeup(void);
66
67__END_DECLS
68
69#endif /* __firehose_h */