From cc0bf788e5a3104c2435225ca2abb3a4434bf37e Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Tue, 5 Jun 2012 14:48:30 -0700 Subject: [PATCH] Refresh of rs-spin --- src/rsocket.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/rsocket.c b/src/rsocket.c index ee1fd6c1..b8ae3b4d 100644 --- a/src/rsocket.c +++ b/src/rsocket.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -65,7 +66,7 @@ static struct index_map idm; static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; -static long long polling_time; +static unsigned long long polling_time; /* * Immediate data format is determined by the upper bits @@ -205,7 +206,7 @@ void rs_configure(void) FILE *f; if ((f = fopen(RS_CONF_DIR "/polling_time", "r"))) { - fscanf(f, "%L", &polling_time); + fscanf(f, "%Lu", &polling_time); fclose(f); } } @@ -940,7 +941,7 @@ static int rs_process_cq(struct rsocket *rs, int nonblock, int (*test)(struct rs static int rs_get_comp(struct rsocket *rs, int nonblock, int (*test)(struct rsocket *rs)) { struct timeval s, e; - long long poll_time = 0; + unsigned long long poll_time = 0; int ret; do { @@ -1507,7 +1508,7 @@ int rpoll(struct pollfd *fds, nfds_t nfds, int timeout) { struct timeval s, e; struct pollfd *rfds; - long long poll_time = 0; + unsigned long long poll_time = 0; int ret; do { -- 2.45.2