]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ipc/ipc_importance.h
xnu-3789.70.16.tar.gz
[apple/xnu.git] / osfmk / ipc / ipc_importance.h
index 3b009b42d67e6dae47b3bed54337133a0682a899..6f3bc5744d3091489fa81ab7076717b973ff8987 100644 (file)
@@ -62,7 +62,6 @@ struct ipc_importance_elem {
        uint32_t                                iie_bits;       /* type and refs */
        mach_voucher_attr_value_reference_t     iie_made;       /* references given to vouchers */
        queue_head_t                            iie_kmsgs;      /* list of kmsgs inheriting from this */
        uint32_t                                iie_bits;       /* type and refs */
        mach_voucher_attr_value_reference_t     iie_made;       /* references given to vouchers */
        queue_head_t                            iie_kmsgs;      /* list of kmsgs inheriting from this */
-       queue_head_t                            iie_inherits;   /* list of inherit elems hung off this */
        uint32_t                                iie_externcnt;  /* number of externalized boosts */
        uint32_t                                iie_externdrop; /* number of those dropped already */
 #define IIE_REF_DEBUG 0
        uint32_t                                iie_externcnt;  /* number of externalized boosts */
        uint32_t                                iie_externdrop; /* number of those dropped already */
 #define IIE_REF_DEBUG 0
@@ -105,6 +104,7 @@ struct ipc_importance_elem {
 struct ipc_importance_task {
        struct ipc_importance_elem iit_elem;    /* common element parts */
        task_t                  iit_task;       /* task associated with */
 struct ipc_importance_task {
        struct ipc_importance_elem iit_elem;    /* common element parts */
        task_t                  iit_task;       /* task associated with */
+       queue_head_t            iit_inherits;   /* list of inherit elems hung off this */
        queue_t                 iit_updateq;    /* queue chained on for task policy updates */
        queue_chain_t           iit_updates;    /* link on update chain */
        queue_chain_t           iit_props;      /* link on propagation chain */
        queue_t                 iit_updateq;    /* queue chained on for task policy updates */
        queue_chain_t           iit_updates;    /* link on update chain */
        queue_chain_t           iit_props;      /* link on propagation chain */
@@ -130,7 +130,6 @@ struct ipc_importance_task {
 #define iit_bits               iit_elem.iie_bits
 #define iit_made               iit_elem.iie_made
 #define iit_kmsgs              iit_elem.iie_kmsgs
 #define iit_bits               iit_elem.iie_bits
 #define iit_made               iit_elem.iie_made
 #define iit_kmsgs              iit_elem.iie_kmsgs
-#define iit_inherits           iit_elem.iie_inherits
 #define iit_externcnt          iit_elem.iie_externcnt
 #define iit_externdrop         iit_elem.iie_externdrop
 
 #define iit_externcnt          iit_elem.iie_externcnt
 #define iit_externdrop         iit_elem.iie_externdrop
 
@@ -162,7 +161,6 @@ struct ipc_importance_inherit {
 #define iii_bits                       iii_elem.iie_bits
 #define iii_made                       iii_elem.iie_made
 #define iii_kmsgs                      iii_elem.iie_kmsgs
 #define iii_bits                       iii_elem.iie_bits
 #define iii_made                       iii_elem.iie_made
 #define iii_kmsgs                      iii_elem.iie_kmsgs
-#define iii_inherits                   iii_elem.iie_inherits
 #define iii_externcnt                  iii_elem.iie_externcnt
 #define iii_externdrop                 iii_elem.iie_externdrop
 #define III_REFS_MAX                   IIE_REFS_MAX
 #define iii_externcnt                  iii_elem.iie_externcnt
 #define iii_externdrop                 iii_elem.iie_externdrop
 #define III_REFS_MAX                   IIE_REFS_MAX
@@ -196,6 +194,7 @@ extern void ipc_importance_reset(ipc_importance_task_t task_imp, boolean_t donor
 
 extern ipc_importance_task_t ipc_importance_for_task(task_t task, boolean_t made);
 extern void ipc_importance_disconnect_task(task_t task);
 
 extern ipc_importance_task_t ipc_importance_for_task(task_t task, boolean_t made);
 extern void ipc_importance_disconnect_task(task_t task);
+extern ipc_importance_inherit_t ipc_importance_exec_switch_task(task_t old_task, task_t new_task);
 
 extern boolean_t ipc_importance_task_is_donor(ipc_importance_task_t task_imp);
 extern boolean_t ipc_importance_task_is_never_donor(ipc_importance_task_t task_imp);
 
 extern boolean_t ipc_importance_task_is_donor(ipc_importance_task_t task_imp);
 extern boolean_t ipc_importance_task_is_never_donor(ipc_importance_task_t task_imp);
@@ -224,6 +223,8 @@ extern kern_return_t ipc_importance_task_drop_file_lock_assertion(ipc_importance
 extern kern_return_t ipc_importance_task_hold_legacy_external_assertion(ipc_importance_task_t task_imp, uint32_t count);
 extern kern_return_t ipc_importance_task_drop_legacy_external_assertion(ipc_importance_task_t task_imp, uint32_t count);
 
 extern kern_return_t ipc_importance_task_hold_legacy_external_assertion(ipc_importance_task_t task_imp, uint32_t count);
 extern kern_return_t ipc_importance_task_drop_legacy_external_assertion(ipc_importance_task_t task_imp, uint32_t count);
 
+extern boolean_t ipc_importance_check_circularity(ipc_port_t port, ipc_port_t dest);
+
 /* prepare importance attributes for sending */
 extern boolean_t ipc_importance_send(
        ipc_kmsg_t              kmsg,
 /* prepare importance attributes for sending */
 extern boolean_t ipc_importance_send(
        ipc_kmsg_t              kmsg,