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 * License: LGPL (v2.1 or any later version)
13 * Author: Rusty Russell <rusty@rustcorp.com.au>
16 * #include <ccan/likely/likely.h>
19 * int main(int argc, char *argv[])
21 * // This example is silly: the compiler knows exit() is unlikely.
22 * if (unlikely(argc == 1)) {
23 * fprintf(stderr, "Usage: %s <args>...\n", argv[0]);
26 * for (argc++; argv[argc]; argc++)
27 * printf("%s\n", argv[argc]);
31 int main(int argc, char *argv[])
33 /* Expect exactly one argument */
37 if (strcmp(argv[1], "depends") == 0) {
39 printf("ccan/htable\n");
40 printf("ccan/hash\n");