Lines Matching defs:state
158 static uint32_t memorystatus_build_flags_from_state(uint32_t state);
516 if (node->state & (kProcessFrozen)) {
520 if (node->state & kProcessSuspended) {
620 if (effective && (node->state & kProcessPriorityUpdated)) {
626 node->state |= kProcessPriorityUpdated;
629 node->state &= ~(kProcessActive|kProcessForeground);
631 node->state |= kProcessForeground;
634 node->state |= kProcessActive;
747 if (track & !(node->state & kProcessSupportsIdleExit)) {
748 node->state |= kProcessSupportsIdleExit;
751 } else if (!track & (node->state & kProcessSupportsIdleExit)) {
752 node->state &= ~kProcessSupportsIdleExit;
774 if (!(node->state & kProcessDirty)) {
775 node->state |= kProcessDirty;
781 if (node->state & kProcessDirty) {
782 node->state &= ~kProcessDirty;
813 node->state |= kProcessSuspended;
826 boolean_t frozen = (node->state & kProcessFrozen);
827 if (node->state & (kProcessFrozen)) {
834 node->state &= ~(kProcessSuspended | kProcessFrozen | kProcessIgnored);
880 if ((node->state & kProcessSupportsIdleExit) && !(node->state & (kProcessDirty|kProcessIgnoreIdleExit))) {
957 memorystatus_build_flags_from_state(uint32_t state) {
960 if (state & kProcessForeground) {
963 if (state & kProcessActive) {
966 if (state & kProcessSupportsIdleExit) {
969 if (state & kProcessDirty) {
1032 entry->flags = memorystatus_build_flags_from_state(node->state);
1113 activeProcess = node->state & kProcessForeground;
1114 procSuspendedForDiagnosis = node->state & kProcessSuspendedForDiag;
1120 if (aPid == 0 || (node->state & kProcessKilled)) {
1138 boolean_t reclaim_proc = !(node->state & (kProcessLocked | kProcessNoReclaimWorth));
1140 if (node->state & kProcessFrozen) {
1158 node->state |= kProcessSuspendedForDiag;
1227 if (aPid == 0 || (hiwat < 0) || (node->state & kProcessKilled)) {
1237 if (node->state & kProcessSuspendedForDiag) {
1246 if (node->state & kProcessLocked) {
1260 node->state |= kProcessSuspendedForDiag;
1404 uint32_t state;
1410 state = node->state;
1418 if ((state & (kProcessKilled | kProcessLocked | kProcessFrozen)) || !(state & kProcessSuspended)) {
1445 node->state |= kProcessLocked;
1456 node->state &= ~kProcessLocked;
1463 node->state |= (kProcessFrozen | (shared ? 0: kProcessNoReclaimWorth));
1532 after boot, and is generally is a no-op once we've reached steady state. */
1681 /* Are we in a low memory state? */
1686 if (node->state & (kProcessKilled | kProcessLocked | kProcessSuspended | kProcessFrozen | kProcessNotifiedForPressure)) {
1689 node->state |= kProcessNotifiedForPressure;
1714 node->state &= ~kProcessNotifiedForPressure;
1775 list[i].flags = memorystatus_build_flags_from_state(node->state);