Date: Fri, 10 May 2019 23:12:37 +0000 (UTC) From: Doug Moore <dougm@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347472 - head/sys/kern Message-ID: <201905102312.x4ANCbMJ093896@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dougm Date: Fri May 10 23:12:37 2019 New Revision: 347472 URL: https://svnweb.freebsd.org/changeset/base/347472 Log: Don't use _Generic, as many systems don't know about it. Go back to a lo-tech switch statement. Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D20235 Modified: head/sys/kern/subr_blist.c Modified: head/sys/kern/subr_blist.c ============================================================================== --- head/sys/kern/subr_blist.c Fri May 10 23:10:22 2019 (r347471) +++ head/sys/kern/subr_blist.c Fri May 10 23:12:37 2019 (r347472) @@ -215,18 +215,18 @@ static inline int bitpos(u_daddr_t mask) { - return (_Generic(mask, + switch (sizeof(mask)) { #ifdef HAVE_INLINE_FFSLL - long long: ffsll(mask) - 1, + case sizeof(long long): + return (ffsll(mask) - 1); #endif -#ifdef HAVE_INLINE_FFSL - long: ffsl(mask) - 1, -#endif #ifdef HAVE_INLINE_FFS - int: ffs(mask) - 1, + case sizeof(int): + return (ffs(mask) - 1); #endif - default: generic_bitpos(mask) - )); + default: + return (generic_bitpos(mask)); + } } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905102312.x4ANCbMJ093896>