1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2025-10-13 11:10:39 +00:00

Removed C++ style comments; added CPU clock measuring code

git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@29 3b4be424-7ac5-41d7-8526-f4ddcb85d872
This commit is contained in:
Veselin Georgiev 2008-11-21 18:48:11 +00:00
commit 9cf8005f3a
12 changed files with 179 additions and 30 deletions

View file

@ -64,8 +64,8 @@ static int parse_token(const char* expected_token, const char *token,
int veax, vebx, vecx, vedx;
int index;
if (*recognized) return 1; // already recognized
if (strncmp(token, expected_token, strlen(expected_token))) return 1; // not what we search for
if (*recognized) return 1; /* already recognized */
if (strncmp(token, expected_token, strlen(expected_token))) return 1; /* not what we search for */
sprintf(format, "%s[%%d]", expected_token);
*recognized = 1;
if (1 == sscanf(token, format, &index) && index >=0 && index < limit) {
@ -134,7 +134,7 @@ static int get_total_cpus(void)
}
return 1;
}
#endif // GET_TOTAL_CPUS_DEFINED
#endif /* GET_TOTAL_CPUS_DEFINED */
static void load_features_common(struct cpu_raw_data_t* raw, struct cpu_id_t* data)
@ -353,7 +353,7 @@ int cpuid_deserialize_raw_data(struct cpu_raw_data_t* data, const char* filename
strncpy(token, line, i);
token[i] = '\0';
value = &line[i + 1];
// try to recognize the line
/* try to recognize the line */
recognized = 0;
if (!strcmp(token, "version")) {
recognized = 1;