1 module deimos.uv.darwin;
2 public import deimos.uv._d;
3 version(OSX):
4 extern(C):
5 pure:
6 nothrow:
7 @nogc:
8 /* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining a copy
11  * of this software and associated documentation files (the "Software"), to
12  * deal in the Software without restriction, including without limitation the
13  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
14  * sell copies of the Software, and to permit persons to whom the Software is
15  * furnished to do so, subject to the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be included in
18  * all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
26  * IN THE SOFTWARE.
27  */
28 /* UV_DARWIN_H */
29 static if( isMacOS ) {
30 	/* include(mach/mach.h); */
31 	/* include(mach/task.h); */
32 	/* include(mach/semaphore.h); */
33 	/* include(TargetConditionals.h); */
34 	alias UV_PLATFORM_SEM_T = semaphore_t ;
35 }
36 template UV_IO_PRIVATE_PLATFORM_FIELDS() {
37 	int rcount;
38 	int wcount;
39 }
40 template UV_PLATFORM_LOOP_FIELDS() {
41 	uv_thread_t cf_thread;
42 	void* _cf_reserved;
43 	void* cf_state;
44 	uv_mutex_t cf_mutex;
45 	uv_sem_t cf_sem;
46 	void*[2] cf_signals;
47 }
48 template UV_PLATFORM_FS_EVENT_FIELDS() {
49 	uv__io_t event_watcher;
50 	char* realpath;
51 	int realpath_len;
52 	int cf_flags;
53 	uv_async_t* cf_cb;
54 	void*[2] cf_events;
55 	void*[2] cf_member;
56 	int cf_error;
57 	uv_mutex_t cf_mutex;
58 }
59 template UV_STREAM_PRIVATE_PLATFORM_FIELDS() {
60 	void* select;
61 }
62 enum UV_HAVE_KQUEUE = 1 ;