]> git.ozlabs.org Git - ccan/blob - ccan/cpuid/_info
cpuid: documentation fix
[ccan] / ccan / cpuid / _info
1 #include "cpuid.h"
2
3 /**
4  * cpuid - a CPUID instruction parser for x86/x86_64 CPUs.
5  *
6  * This module tries to keep-it-simple to get information about the CPU
7  * from the CPU.
8  *
9  * Example:
10  * #include <ccan/cpuid/cpuid.h>
11  * #include <stdio.h>
12  *
13  * int main(void)
14  * {
15  *      uint32_t highest;
16  *      cpuid(CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED, &highest);
17  *      printf ("Highest extended function supported: %d\n", highest);
18  *
19  *      return 0;
20  * }
21  *
22  * Author: Ahmed Samy <f.fallen45@gmail.com>
23  * License: MIT
24  * Version: 0.1
25  */
26
27 int main(int argc, char *argv[])
28 {
29         if (argc != 2)
30                 return 1;
31
32         if (strcmp(argv[1], "depends") == 0) {
33 #if defined(__i386__) || defined(__i386) || defined(__x86_64) \
34                 || defined(_M_AMD64) || defined(__M_X64)
35                 /* Nothing.  */
36 #else
37                 printf("ccan/build_assert\n");
38 #endif
39                 return 0;
40         }
41
42         return 1;
43 }
44