summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/Makefile.am2
-rw-r--r--rpc/rpc-lib/src/rpcsvc.c10
2 files changed, 3 insertions, 9 deletions
diff --git a/rpc/rpc-lib/src/Makefile.am b/rpc/rpc-lib/src/Makefile.am
index c7171a260b5..81a96476883 100644
--- a/rpc/rpc-lib/src/Makefile.am
+++ b/rpc/rpc-lib/src/Makefile.am
@@ -8,7 +8,7 @@ libgfrpc_la_SOURCES = auth-unix.c rpcsvc-auth.c rpcsvc.c auth-null.c \
EXTRA_DIST = libgfrpc.sym
libgfrpc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
- $(top_builddir)/rpc/xdr/src/libgfxdr.la $(MATH_LIB)
+ $(top_builddir)/rpc/xdr/src/libgfxdr.la
libgfrpc_la_LDFLAGS = -version-info $(LIBGFRPC_LT_VERSION) $(GF_LDFLAGS) \
-export-symbols $(top_srcdir)/rpc/rpc-lib/src/libgfrpc.sym
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c
index d62e06cb187..b3916eb54c2 100644
--- a/rpc/rpc-lib/src/rpcsvc.c
+++ b/rpc/rpc-lib/src/rpcsvc.c
@@ -36,7 +36,6 @@
#include <fnmatch.h>
#include <stdarg.h>
#include <stdio.h>
-#include <math.h>
#include <dlfcn.h>
#ifdef IPV6_DEFAULT
@@ -89,12 +88,6 @@ rpcsvc_toggle_queue_status(rpcsvc_program_t *prog,
return;
}
-static int
-get_rightmost_set_bit(int n)
-{
- return log2(n & -n);
-}
-
int
rpcsvc_get_free_queue_index(rpcsvc_program_t *prog)
{
@@ -109,7 +102,8 @@ rpcsvc_get_free_queue_index(rpcsvc_program_t *prog)
right_most_unset_bit = 0;
break;
} else {
- right_most_unset_bit = get_rightmost_set_bit(
+ /* get_rightmost_set_bit (sic)*/
+ right_most_unset_bit = __builtin_ctz(
~prog->request_queue_status[i]);
if (right_most_unset_bit < 8) {
break;