- /*
- * Submits a threadreq to the workq system.
- *
- * If type is WORKQ_THREADREQ_KEVENT, the semantics are similar to a call
- * to workq_reqthreads and the kevent bind function will be called to
- * indicate the thread fulfilling the request. The req argument is ignored.
- *
- * If type is WORKQ_THREADREQ_WORKLOOP, The req argument should point to
- * allocated memory of at least the sizeof(workq_threadreq_t). That memory
- * is lent to the workq system until workloop_fulfill_threadreq is called
- * and passed the pointer, at which point it may be freed.
- *
- * The properties of the request are passed in the (pthread) priority and flags arguments.
- *
- * Will return zero upon success or an error value on failure. An error of
- * ENOTSUP means the type argument was not understood.
- */
- int (*workq_threadreq)(struct proc *p, workq_threadreq_t req,
- enum workq_threadreq_type, unsigned long priority, int flags);
-
- /*
- * Modifies an already submitted thread request.
- *
- * If operation is WORKQ_THREADREQ_CHANGE_PRI, arg1 is the new priority and arg2 is unused.
- *
- * If operation is WORKQ_THREADREQ_CANCEL, arg1 and arg2 are unused.
- *
- * Will return zero upon success or an error value on failure. An error of
- * ENOTSUP means the operation argument was not understood.
- */
- int (*workq_threadreq_modify)(struct proc *t, workq_threadreq_t req,
- enum workq_threadreq_op operation,
- unsigned long arg1, unsigned long arg2);
+ void (*workq_setup_thread)(proc_t p, thread_t th, vm_map_t map,
+ user_addr_t stackaddr, mach_port_name_t kport, int th_qos,
+ int setup_flags, int upcall_flags);
+
+ void (*workq_markfree_threadstack)(proc_t p, thread_t, vm_map_t map,
+ user_addr_t stackaddr);