equal
deleted
inserted
replaced
2965 if (t && t->iThreadType==EThreadUser && nt->iCsCount==0) |
2965 if (t && t->iThreadType==EThreadUser && nt->iCsCount==0) |
2966 m &= ~MASK_NO_CRITICAL; |
2966 m &= ~MASK_NO_CRITICAL; |
2967 else if (!nt || nt->iCsCount==0) |
2967 else if (!nt || nt->iCsCount==0) |
2968 m &= ~MASK_NO_CRITICAL; |
2968 m &= ~MASK_NO_CRITICAL; |
2969 } |
2969 } |
2970 if (m & MASK_CRITICAL) |
2970 if (m & (MASK_CRITICAL|MASK_NO_KILL_OR_SUSPEND)) |
2971 { |
2971 { |
2972 if (t && (t->iThreadType!=EThreadUser || nt->iCsCount>0)) |
2972 if (t && (t->iThreadType!=EThreadUser || nt->iCsCount>0)) |
2973 m &= ~MASK_CRITICAL; |
2973 m &= ~(MASK_CRITICAL|MASK_NO_KILL_OR_SUSPEND); |
2974 else if (!nt || nt->iCsCount>0) |
2974 else if (!nt || nt->iCsCount>0) |
2975 m &= ~MASK_CRITICAL; |
2975 m &= ~(MASK_CRITICAL|MASK_NO_KILL_OR_SUSPEND); |
|
2976 } |
|
2977 if (m & MASK_NO_KILL_OR_SUSPEND) |
|
2978 { |
|
2979 if (!nt || NKern::KernelLocked() || NKern::HeldFastMutex()) |
|
2980 m &= ~MASK_NO_KILL_OR_SUSPEND; |
2976 } |
2981 } |
2977 if (m & MASK_KERNEL_LOCKED) |
2982 if (m & MASK_KERNEL_LOCKED) |
2978 { |
2983 { |
2979 if (NKern::KernelLocked()) |
2984 if (NKern::KernelLocked()) |
2980 m &= ~MASK_KERNEL_LOCKED; |
2985 m &= ~MASK_KERNEL_LOCKED; |
3072 Kern::Printf("Assertion failed: Don't call from user thread in critical section"); |
3077 Kern::Printf("Assertion failed: Don't call from user thread in critical section"); |
3073 if (m & MASK_ALWAYS_FAIL) |
3078 if (m & MASK_ALWAYS_FAIL) |
3074 Kern::Printf("Assertion failed"); |
3079 Kern::Printf("Assertion failed"); |
3075 if (m & MASK_NO_RESCHED) |
3080 if (m & MASK_NO_RESCHED) |
3076 Kern::Printf("Assertion failed: Don't call from thread with kernel unlocked"); |
3081 Kern::Printf("Assertion failed: Don't call from thread with kernel unlocked"); |
|
3082 if (m & MASK_NO_KILL_OR_SUSPEND) |
|
3083 Kern::Printf("Assertion failed: Must not be suspended or killed here"); |
3077 |
3084 |
3078 #ifdef __KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
3085 #ifdef __KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
3079 if (aFunction) |
3086 if (aFunction) |
3080 Kern::Fault(aFunction, 0); |
3087 Kern::Fault(aFunction, 0); |
3081 return KErrGeneral; |
3088 return KErrGeneral; |