diff options
Diffstat (limited to 'usr/src/lib/libfakekernel/common/kmisc.c')
-rw-r--r-- | usr/src/lib/libfakekernel/common/kmisc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/src/lib/libfakekernel/common/kmisc.c b/usr/src/lib/libfakekernel/common/kmisc.c index 5feaa66a28..15730d6539 100644 --- a/usr/src/lib/libfakekernel/common/kmisc.c +++ b/usr/src/lib/libfakekernel/common/kmisc.c @@ -10,7 +10,7 @@ */ /* - * Copyright 2014 Nexenta Systems, Inc. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright 2017 RackTop Systems. */ @@ -19,13 +19,13 @@ #include <sys/thread.h> #include <sys/proc.h> #include <sys/zone.h> - #include <sys/poll.h> #include <time.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> +#include <string.h> #include <fakekernel.h> @@ -118,6 +118,12 @@ delay(clock_t ticks) (void) poll(0, 0, msec); } +int +highbit(ulong_t i) +{ + return (fls(i)); +} + /* ARGSUSED */ int issig(int why) |