node/deps/uv/include/uv-darwin.h

64 lines
3.2 KiB
C
Raw Normal View History

2012-08-21 00:41:07 +08:00
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
#ifndef UV_DARWIN_H
#define UV_DARWIN_H
#if defined(__APPLE__) && defined(__MACH__)
# include <mach/mach.h>
# include <mach/task.h>
# include <mach/semaphore.h>
2012-10-31 06:06:03 +08:00
# include <TargetConditionals.h>
2012-08-21 00:41:07 +08:00
# define UV_PLATFORM_SEM_T semaphore_t
#endif
2013-02-21 04:12:18 +08:00
#define UV_IO_PRIVATE_PLATFORM_FIELDS \
int rcount; \
int wcount; \
2012-09-13 22:18:54 +08:00
#define UV_PLATFORM_LOOP_FIELDS \
uv_thread_t cf_thread; \
2013-08-24 01:04:27 +08:00
void* _cf_reserved; \
void* cf_state; \
2012-09-13 22:18:54 +08:00
uv_mutex_t cf_mutex; \
uv_sem_t cf_sem; \
2013-03-29 23:10:56 +08:00
void* cf_signals[2]; \
2012-09-13 22:18:54 +08:00
2012-08-21 00:41:07 +08:00
#define UV_PLATFORM_FS_EVENT_FIELDS \
2012-11-17 00:57:15 +08:00
uv__io_t event_watcher; \
char* realpath; \
int realpath_len; \
int cf_flags; \
2012-09-13 22:18:54 +08:00
uv_async_t* cf_cb; \
2013-11-21 00:25:24 +08:00
void* cf_events[2]; \
2013-08-24 01:04:27 +08:00
void* cf_member[2]; \
2013-11-21 00:25:24 +08:00
int cf_error; \
2012-09-13 22:18:54 +08:00
uv_mutex_t cf_mutex; \
2012-08-21 00:41:07 +08:00
2012-12-14 03:23:01 +08:00
#define UV_STREAM_PRIVATE_PLATFORM_FIELDS \
void* select; \
2013-02-21 04:12:18 +08:00
#define UV_HAVE_KQUEUE 1
2013-07-17 03:04:31 +08:00
#define UV_PLATFORM_HAS_IP6_LINK_LOCAL_ADDRESS
2012-08-21 00:41:07 +08:00
#endif /* UV_DARWIN_H */