]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/sys/coalition.h
xnu-3248.50.21.tar.gz
[apple/xnu.git] / bsd / sys / coalition.h
index 62b205eb79d13a33a775bf273703240c9a737a0c..cf2811c5b77c9c57552bbc8d7cf31c5e5b3a7ea0 100644 (file)
@@ -104,6 +104,21 @@ extern int coalitions_get_list(int type, struct procinfo_coalinfo *coal_list, in
  */
 extern boolean_t coalition_is_leader(task_t task, int coal_type, coalition_t *coal);
 
+/*
+ * coalition_get_leader:
+ * Get a task reference on the leader of a given coalition
+ *
+ * Parameters:
+ *     coal      : The coalition to investigate
+ *
+ * Returns: A referenced task pointer of the leader of the given coalition.
+ *          This could be TASK_NULL if the coalition doesn't have a leader.
+ *          If the return value is non-null, the caller is responsible to call
+ *          task_deallocate on the returned value.
+ */
+extern task_t coalition_get_leader(coalition_t coal);
+
+
 /*
  * coalition_get_task_count:
  * Sum up the number of tasks in the given coalition