#include <dispatch/base.h> // for HeaderDoc
#endif
+DISPATCH_ASSUME_NONNULL_BEGIN
+
__BEGIN_DECLS
/*!
dispatch_read_f(dispatch_fd_t fd,
size_t length,
dispatch_queue_t queue,
- void *context,
- void (*handler)(void *context, dispatch_data_t data, int error));
+ void *_Nullable context,
+ void (*handler)(void *_Nullable context, dispatch_data_t data, int error));
/*!
* @function dispatch_write_f
dispatch_write_f(dispatch_fd_t fd,
dispatch_data_t data,
dispatch_queue_t queue,
- void *context,
- void (*handler)(void *context, dispatch_data_t data, int error));
+ void *_Nullable context,
+ void (*handler)(void *_Nullable context, dispatch_data_t _Nullable data,
+ int error));
/*!
* @function dispatch_io_create_f
dispatch_io_create_f(dispatch_io_type_t type,
dispatch_fd_t fd,
dispatch_queue_t queue,
- void *context,
- void (*cleanup_handler)(void *context, int error));
+ void *_Nullable context,
+ void (*cleanup_handler)(void *_Nullable context, int error));
/*!
* @function dispatch_io_create_with_path_f
dispatch_io_create_with_path_f(dispatch_io_type_t type,
const char *path, int oflag, mode_t mode,
dispatch_queue_t queue,
- void *context,
- void (*cleanup_handler)(void *context, int error));
+ void *_Nullable context,
+ void (*cleanup_handler)(void *_Nullable context, int error));
/*!
* @function dispatch_io_create_with_io_f
dispatch_io_create_with_io_f(dispatch_io_type_t type,
dispatch_io_t io,
dispatch_queue_t queue,
- void *context,
- void (*cleanup_handler)(void *context, int error));
+ void *_Nullable context,
+ void (*cleanup_handler)(void *_Nullable context, int error));
/*!
* @typedef dispatch_io_handler_function_t
* @param data The data object to be handled.
* @param error An errno condition for the operation.
*/
-typedef void (*dispatch_io_handler_function_t)(void *context, bool done,
- dispatch_data_t data, int error);
+typedef void (*dispatch_io_handler_function_t)(void *_Nullable context,
+ bool done, dispatch_data_t _Nullable data, int error);
/*!
* @function dispatch_io_read_f
off_t offset,
size_t length,
dispatch_queue_t queue,
- void *context,
+ void *_Nullable context,
dispatch_io_handler_function_t io_handler);
/*!
off_t offset,
dispatch_data_t data,
dispatch_queue_t queue,
- void *context,
+ void *_Nullable context,
dispatch_io_handler_function_t io_handler);
/*!
DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NONNULL3 DISPATCH_NOTHROW
void
dispatch_io_barrier_f(dispatch_io_t channel,
- void *context,
+ void *_Nullable context,
dispatch_function_t barrier);
__END_DECLS
+DISPATCH_ASSUME_NONNULL_END
+
#endif /* __DISPATCH_IO_PRIVATE__ */