+
+int
+fill_taskipctableinfo(task_t task, uint32_t *table_size, uint32_t *table_free)
+{
+ ipc_space_t space = task->itk_space;
+ if (space == NULL) {
+ return -1;
+ }
+
+ is_read_lock(space);
+ if (!is_active(space)) {
+ is_read_unlock(space);
+ return -1;
+ }
+
+ *table_size = space->is_table_size;
+ *table_free = space->is_table_free;
+
+ is_read_unlock(space);
+
+ return 0;
+}
+
+int
+get_task_cdhash(task_t task, char cdhash[static CS_CDHASH_LEN])
+{
+ int result = 0;
+
+ task_lock(task);
+ result = task->bsd_info ? proc_getcdhash(task->bsd_info, cdhash) : ESRCH;
+ task_unlock(task);
+
+ return result;
+}