Changeset 524990c in rtems-libbsd


Ignore:
Timestamp:
Oct 30, 2015, 1:14:46 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
b96abfd647154f10ea8f7fac68e25676636eded5, debc0aed8b9bef9996b8ec0ae7a70b0b41912e27, 0ad342ae5f65d22eb6c914d58664d3b5d1d3d43f, freebsd-9.3, 98d197895b6162050176ea18d66783a1dc216d82
Children:
c164446
Parents:
293fefa
git-author:
Sebastian Huber <sebastian.huber@…> (10/30/15 13:14:46)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/02/15 08:11:22)
Message:

Provide ffs() and ffsl() via builtins

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/sys/libkern.h

    r293fefa r524990c  
    8989void    *bsearch(const void *, const void *, size_t,
    9090            size_t, int (*)(const void *, const void *));
     91#ifndef __rtems__
    9192#ifndef HAVE_INLINE_FFS
    9293int      ffs(int);
     
    9596int      ffsl(long);
    9697#endif
     98#else /* __rtems__ */
     99#define ffs(_x) __builtin_ffs((unsigned int)(_x))
     100#define ffsl(_x) __builtin_ffsl((unsigned long)(_x))
     101#endif /* __rtems__ */
    97102#ifndef HAVE_INLINE_FLS
    98103int      fls(int);
Note: See TracChangeset for help on using the changeset viewer.