Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:26

0001 /* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
0002  *
0003  * Permission is hereby granted, free of charge, to any person obtaining a copy
0004  * of this software and associated documentation files (the "Software"), to
0005  * deal in the Software without restriction, including without limitation the
0006  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
0007  * sell copies of the Software, and to permit persons to whom the Software is
0008  * furnished to do so, subject to the following conditions:
0009  *
0010  * The above copyright notice and this permission notice shall be included in
0011  * all copies or substantial portions of the Software.
0012  *
0013  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0014  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0015  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
0016  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0017  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0018  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
0019  * IN THE SOFTWARE.
0020  */
0021 
0022 #ifndef UV_DARWIN_H
0023 #define UV_DARWIN_H
0024 
0025 #if defined(__APPLE__) && defined(__MACH__)
0026 # include <mach/mach.h>
0027 # include <mach/task.h>
0028 # include <mach/semaphore.h>
0029 # include <TargetConditionals.h>
0030 # define UV_PLATFORM_SEM_T semaphore_t
0031 #endif
0032 
0033 #define UV_IO_PRIVATE_PLATFORM_FIELDS                                         \
0034   int rcount;                                                                 \
0035   int wcount;                                                                 \
0036 
0037 #define UV_PLATFORM_LOOP_FIELDS                                               \
0038   uv_thread_t cf_thread;                                                      \
0039   void* _cf_reserved;                                                         \
0040   void* cf_state;                                                             \
0041   uv_mutex_t cf_mutex;                                                        \
0042   uv_sem_t cf_sem;                                                            \
0043   struct uv__queue cf_signals;                                                \
0044 
0045 #define UV_PLATFORM_FS_EVENT_FIELDS                                           \
0046   uv__io_t event_watcher;                                                     \
0047   char* realpath;                                                             \
0048   int realpath_len;                                                           \
0049   int cf_flags;                                                               \
0050   uv_async_t* cf_cb;                                                          \
0051   struct uv__queue cf_events;                                                 \
0052   struct uv__queue cf_member;                                                 \
0053   int cf_error;                                                               \
0054   uv_mutex_t cf_mutex;                                                        \
0055 
0056 #define UV_STREAM_PRIVATE_PLATFORM_FIELDS                                     \
0057   void* select;                                                               \
0058 
0059 #define UV_HAVE_KQUEUE 1
0060 
0061 #endif /* UV_DARWIN_H */