6 * likely - macros for annotating likely/unlikely branches in the code
8 * Inspired by Andi Kleen's macros for the Linux Kernel, these macros
9 * help you annotate rare paths in your code for the convenience of the
10 * compiler and the reader.
12 * Licence: LGPL (2 or any later version)
15 * #include <ccan/likely/likely.h>
18 * int main(int argc, char *argv[])
20 * // This example is silly: the compiler knows exit() is unlikely.
21 * if (unlikely(argc == 1)) {
22 * fprintf(stderr, "Usage: %s <args>...\n", argv[0]);
25 * for (argc++; argv[argc]; argc++)
26 * printf("%s\n", argv[argc]);
30 int main(int argc, char *argv[])
32 /* Expect exactly one argument */
36 if (strcmp(argv[1], "depends") == 0) {
38 printf("ccan/hashtable\n");
39 printf("ccan/hash\n");