1. 06 Dec, 2009 2 commits
    • Rémi Denis-Courmont's avatar
      likely, unlikely: convenience portability macros for branch prediction · 827b1113
      Rémi Denis-Courmont authored
      Those are the same as the Linux kernel macros, and probably a bunch of
      other projects. Usage:
          if (likely(condition))
          if (unlikely(condition))
      Attention: those two macros convert the predicate to a boolean value.
      Therefore you generally cannot use them for assignments like this:
          void *p_sys = likely (malloc (sizeof (*p_sys)));
          if (!p_sys)
              return VLC_ENOMEM;
      Instead you can do this:
          void *p_sys = malloc (sizeof (*p_sys));
          if (unlikely (!p_sys))
              return VLC_ENOMEM;
    • Pierre Ynard's avatar
      Add missing include · 87e6f1be
      Pierre Ynard authored
  2. 05 Dec, 2009 38 commits