Skip to content

Commit

Permalink
Add missing HAS_TURBO check
Browse files Browse the repository at this point in the history
  • Loading branch information
mlq committed Jan 10, 2020
1 parent 8e33510 commit 593ccb1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libsgxstep/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,14 @@ int disable_turbo(void)

int turbo_enabled( void )
{
#ifdef HAS_TURBO
int result;
file_read_int( "/sys/devices/system/cpu/intel_pstate/no_turbo", &result);

file_read_int( "/sys/devices/system/cpu/intel_pstate/no_turbo", &result);
return (result == 0)? 1 : 0;
#else
return 0;
#endif
}

int restore_system_state(void)
Expand Down

0 comments on commit 593ccb1

Please sign in to comment.