[netperf-dev] netperf4 commit notice r74 - in trunk: . src
raj at netperf.org
raj at netperf.org
Thu Mar 2 16:59:50 PST 2006
Author: raj
Date: 2006-03-02 16:59:45 -0800 (Thu, 02 Mar 2006)
New Revision: 74
Modified:
trunk/configure
trunk/configure.ac
trunk/src/netperf.c
trunk/src/netperf.h
trunk/src/netserver.c
Log:
Will wonders ever cease, looks like it works with --with-glib now :)
The last bit was to use pkg-config with gthread-2.0 rather than
glib-2.0 - would have been nice if the glib threads reference said
something about that...
Modified: trunk/configure
===================================================================
--- trunk/configure 2006-03-03 00:25:57 UTC (rev 73)
+++ trunk/configure 2006-03-03 00:59:45 UTC (rev 74)
@@ -24032,8 +24032,11 @@
fi
if test "x$have_pkg_config"="xyes"; then
- glib_cflags=`pkg-config --cflags glib-2.0`
- glib_libs=`pkg-config --libs glib-2.0`
+ # while we are using "glib" we are really using gthread it seems so do
+ # the pkg-config thing with that name instead as it seems to be a
+ # proper superset
+ glib_cflags=`pkg-config --cflags gthread-2.0`
+ glib_libs=`pkg-config --libs gthread-2.0`
cat >>confdefs.h <<\_ACEOF
#define WITH_GLIB 1
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2006-03-03 00:25:57 UTC (rev 73)
+++ trunk/configure.ac 2006-03-03 00:59:45 UTC (rev 74)
@@ -132,8 +132,11 @@
if test "${with_glib+set}" = set && test "$with_glib" != no; then
AC_CHECK_PROG(have_pkg_config, pkg-config, "yes","no")
if test "x$have_pkg_config"="xyes"; then
- glib_cflags=`pkg-config --cflags glib-2.0`
- glib_libs=`pkg-config --libs glib-2.0`
+ # while we are using "glib" we are really using gthread it seems so do
+ # the pkg-config thing with that name instead as it seems to be a
+ # proper superset
+ glib_cflags=`pkg-config --cflags gthread-2.0`
+ glib_libs=`pkg-config --libs gthread-2.0`
AC_DEFINE([WITH_GLIB],1,[Define to one to use glib instead of direct pthreads])
else
AC_MSG_ERROR(Cannot find pkg-config and so cannot use glib.)
Modified: trunk/src/netperf.c
===================================================================
--- trunk/src/netperf.c 2006-03-03 00:25:57 UTC (rev 73)
+++ trunk/src/netperf.c 2006-03-03 00:59:45 UTC (rev 74)
@@ -43,6 +43,16 @@
#include <stdio.h>
#endif
+#ifdef WITH_GLIB
+# ifdef HAVE_GLIB_H
+# include <glib.h>
+# endif
+#else
+# ifdef HAVE_PTHREAD_H
+# include <pthread.h>
+# endif
+#endif
+
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -1011,7 +1021,7 @@
#ifdef WITH_GLIB
g_get_current_time(&abstime);
g_time_val_add(&abstime,1000);
- g_cond_timedwait(h->condition, &h->hash_lock, &abstime);
+ g_cond_timed_wait(h->condition, h->hash_lock, &abstime);
#else
get_expiration_time(&delta_time,&abstime);
@@ -1328,7 +1338,7 @@
#ifdef WITH_GLIB
g_get_current_time(&abstime);
g_time_val_add(&abstime,1000);
- g_cond_timedwait(h->condition, &h->hash_lock, &abstime);
+ g_cond_timed_wait(h->condition, h->hash_lock, &abstime);
#else
get_expiration_time(&delta_time,&abstime);
Modified: trunk/src/netperf.h
===================================================================
--- trunk/src/netperf.h 2006-03-03 00:25:57 UTC (rev 73)
+++ trunk/src/netperf.h 2006-03-03 00:59:45 UTC (rev 74)
@@ -52,8 +52,8 @@
#define NETPERF_MUTEX_UNLOCK g_mutex_unlock
#define NETPERF_COND_TIMEDWAIT g_cond_timedwait
#define NETPERF_COND_BROADCAST g_cond_broadcast
-#define NETPERF_RWLOCK_WRLOCK g_static_rwlock_writer_lock
-#define NETPERF_RWLOCK_WRITER_UNLOCK g_static_rwlock_writer_unlock
+#define NETPERF_RWLOCK_WRLOCK g_static_rw_lock_writer_lock
+#define NETPERF_RWLOCK_WRITER_UNLOCK g_static_rw_lock_writer_unlock
#elif defined(HAVE_PTHREAD_H)
#include <pthread.h>
#define NETPERF_MUTEX_T pthread_mutex_t
Modified: trunk/src/netserver.c
===================================================================
--- trunk/src/netserver.c 2006-03-03 00:25:57 UTC (rev 73)
+++ trunk/src/netserver.c 2006-03-03 00:59:45 UTC (rev 74)
@@ -39,6 +39,16 @@
#include "config.h"
#endif
+#ifdef WITH_GLIB
+# ifdef HAVE_GLIB_H
+# include <glib.h>
+# endif
+#else
+# ifdef HAVE_PTHREAD_H
+# include <pthread.h>
+# endif
+#endif
+
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
More information about the netperf-dev
mailing list