- Timestamp:
- Mar 22, 2021, 8:03:11 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- e825c9d
- Parents:
- 1c6e1ec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/preemption.cfa
r1c6e1ec r357fae8 35 35 36 36 __attribute__((weak)) Duration default_preemption() { 37 const char * preempt_rate_s = getenv("CFA_DEFAULT_PR OCESSORS");37 const char * preempt_rate_s = getenv("CFA_DEFAULT_PREEMPTION"); 38 38 if(!preempt_rate_s) { 39 __cfadbg_print_safe(preemption, "No CFA_DEFAULT_PR OCESSORSin ENV\n");39 __cfadbg_print_safe(preemption, "No CFA_DEFAULT_PREEMPTION in ENV\n"); 40 40 return __CFA_DEFAULT_PREEMPTION__; 41 41 } … … 44 44 long int preempt_rate_l = strtol(preempt_rate_s, &endptr, 10); 45 45 if(preempt_rate_l < 0 || preempt_rate_l > 65535) { 46 __cfadbg_print_safe(preemption, "CFA_DEFAULT_PR OCESSORSout of range : %ld\n", preempt_rate_l);46 __cfadbg_print_safe(preemption, "CFA_DEFAULT_PREEMPTION out of range : %ld\n", preempt_rate_l); 47 47 return __CFA_DEFAULT_PREEMPTION__; 48 48 } 49 49 if('\0' != *endptr) { 50 __cfadbg_print_safe(preemption, "CFA_DEFAULT_PR OCESSORSnot a decimal number : %s\n", preempt_rate_s);50 __cfadbg_print_safe(preemption, "CFA_DEFAULT_PREEMPTION not a decimal number : %s\n", preempt_rate_s); 51 51 return __CFA_DEFAULT_PREEMPTION__; 52 52 }
Note: See TracChangeset
for help on using the changeset viewer.