Changeset 524990c in rtems-libbsd for freebsd/sys/sys/libkern.h


Ignore:
Timestamp:
10/30/15 13:14:46 (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, 5-freebsd-12, 6-freebsd-12, freebsd-9.3, master
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.