]> git.saurik.com Git - apple/libpthread.git/blobdiff - private/workqueue_private.h
libpthread-416.11.1.tar.gz
[apple/libpthread.git] / private / workqueue_private.h
index 9cd0e951d6df271b6fbb472a48d552a7b3572436..11b0e5e143b565b685b34d4b6defe52dadb37d55 100644 (file)
@@ -74,6 +74,23 @@ typedef void (*pthread_workqueue_function_kevent_t)(void **events, int *nevents)
 
 typedef void (*pthread_workqueue_function_workloop_t)(uint64_t *workloop_id, void **events, int *nevents);
 
+#define PTHREAD_WORKQUEUE_CONFIG_VERSION               2
+#define PTHREAD_WORKQUEUE_CONFIG_MIN_SUPPORTED_VERSION 1
+#define PTHREAD_WORKQUEUE_CONFIG_SUPPORTED_FLAGS       0
+struct pthread_workqueue_config {
+       uint32_t flags;
+       uint32_t version;
+       pthread_workqueue_function_kevent_t kevent_cb;
+       pthread_workqueue_function_workloop_t workloop_cb;
+       pthread_workqueue_function2_t workq_cb;
+       uint64_t queue_serialno_offs;
+       uint64_t queue_label_offs;
+};
+
+__API_AVAILABLE(macos(10.15), ios(13.0))
+int
+pthread_workqueue_setup(struct pthread_workqueue_config *cfg, size_t cfg_size);
+
 // Initialises the pthread workqueue subsystem, passing the new-style callback prototype,
 // the dispatchoffset and an unused flags field.
 __API_AVAILABLE(macos(10.10), ios(8.0))