r4049 - trunk/birnet



Author: stw
Date: 2006-11-01 06:49:13 -0500 (Wed, 01 Nov 2006)
New Revision: 4049

Modified:
   trunk/birnet/ChangeLog
   trunk/birnet/birnetcdefs.h
   trunk/birnet/birnetthreadimpl.cc
Log:
Wed Nov  1 11:46:10 2006  Stefan Westerfeld  <stefan space twc de>

	* birnetcdefs.h: Applied Patch from Tim to define BirnetInt64 and
	BirnetUInt64 as (signed) long long int, as otherwise %lld printf
	formats on AMD64 emit compiler warnings.
	
	* birnetthreadimpl.cc: Use BirnetUInt64 arguments for thread table
	function implementations of thread_awake_after and
	thread_emit_wakeups, to be consistent with the thread table function
	pointers defined in birnetcdefs.h.


Modified: trunk/birnet/ChangeLog
===================================================================
--- trunk/birnet/ChangeLog	2006-10-31 13:56:08 UTC (rev 4048)
+++ trunk/birnet/ChangeLog	2006-11-01 11:49:13 UTC (rev 4049)
@@ -1,3 +1,14 @@
+Wed Nov  1 11:46:10 2006  Stefan Westerfeld  <stefan space twc de>
+
+	* birnetcdefs.h: Applied Patch from Tim to define BirnetInt64 and
+	BirnetUInt64 as (signed) long long int, as otherwise %lld printf
+	formats on AMD64 emit compiler warnings.
+	
+	* birnetthreadimpl.cc: Use BirnetUInt64 arguments for thread table
+	function implementations of thread_awake_after and
+	thread_emit_wakeups, to be consistent with the thread table function
+	pointers defined in birnetcdefs.h.
+
 Tue Oct 24 23:51:12 2006  Tim Janik  <timj gtk org>
 
 	* birnettests.h: added cpu name to treport_*() output.

Modified: trunk/birnet/birnetcdefs.h
===================================================================
--- trunk/birnet/birnetcdefs.h	2006-10-31 13:56:08 UTC (rev 4048)
+++ trunk/birnet/birnetcdefs.h	2006-11-01 11:49:13 UTC (rev 4049)
@@ -136,30 +136,32 @@
 
 /* --- provide canonical integer types --- */
 #if 	BIRNET_SIZEOF_SYS_TYPESH_UINT == 0
-typedef unsigned int          uint;	/* for systems that don't define uint in types.h */
+typedef unsigned int		uint;	/* for systems that don't define uint in types.h */
 #else
 BIRNET_STATIC_ASSERT (BIRNET_SIZEOF_SYS_TYPESH_UINT == 4);
 #endif
 BIRNET_STATIC_ASSERT (sizeof (uint) == 4);
-typedef unsigned int          BirnetUInt8  __attribute__ ((__mode__ (__QI__)));
-typedef unsigned int          BirnetUInt16 __attribute__ ((__mode__ (__HI__)));
-typedef unsigned int          BirnetUInt32 __attribute__ ((__mode__ (__SI__)));
-typedef unsigned int          BirnetUInt64 __attribute__ ((__mode__ (__DI__)));
+typedef unsigned int		BirnetUInt8  __attribute__ ((__mode__ (__QI__)));
+typedef unsigned int		BirnetUInt16 __attribute__ ((__mode__ (__HI__)));
+typedef unsigned int		BirnetUInt32 __attribute__ ((__mode__ (__SI__)));
+// typedef unsigned int         BirnetUInt64 __attribute__ ((__mode__ (__DI__)));
+typedef unsigned long long int  BirnetUInt64; // AMD64 needs this for %llu printf format strings
 // provided by birnetcdefs.h: uint;
 BIRNET_STATIC_ASSERT (sizeof (BirnetUInt8)  == 1);
 BIRNET_STATIC_ASSERT (sizeof (BirnetUInt16) == 2);
 BIRNET_STATIC_ASSERT (sizeof (BirnetUInt32) == 4);
 BIRNET_STATIC_ASSERT (sizeof (BirnetUInt64) == 8);
-typedef signed int            BirnetInt8  __attribute__ ((__mode__ (__QI__)));
-typedef signed int            BirnetInt16 __attribute__ ((__mode__ (__HI__)));
-typedef signed int            BirnetInt32 __attribute__ ((__mode__ (__SI__)));
-typedef signed int            BirnetInt64 __attribute__ ((__mode__ (__DI__)));
+typedef signed int		BirnetInt8  __attribute__ ((__mode__ (__QI__)));
+typedef signed int		BirnetInt16 __attribute__ ((__mode__ (__HI__)));
+typedef signed int		BirnetInt32 __attribute__ ((__mode__ (__SI__)));
+// typedef signed long long int BirnetInt64 __attribute__ ((__mode__ (__DI__)));
+typedef signed long long int	BirnetInt64;  // AMD64 needs this for %lld printf format strings
 // provided by compiler       int;
 BIRNET_STATIC_ASSERT (sizeof (BirnetInt8)  == 1);
 BIRNET_STATIC_ASSERT (sizeof (BirnetInt16) == 2);
 BIRNET_STATIC_ASSERT (sizeof (BirnetInt32) == 4);
 BIRNET_STATIC_ASSERT (sizeof (BirnetInt64) == 8);
-typedef BirnetUInt32          BirnetUnichar;
+typedef BirnetUInt32		BirnetUnichar;
 BIRNET_STATIC_ASSERT (sizeof (BirnetUnichar) == 4);
 
 

Modified: trunk/birnet/birnetthreadimpl.cc
===================================================================
--- trunk/birnet/birnetthreadimpl.cc	2006-10-31 13:56:08 UTC (rev 4048)
+++ trunk/birnet/birnetthreadimpl.cc	2006-11-01 11:49:13 UTC (rev 4049)
@@ -589,7 +589,7 @@
  * greater than @a stamp.
  */
 static void
-common_thread_awake_after (guint64 stamp)
+common_thread_awake_after (BirnetUInt64 stamp)
 {
   BirnetThread *self = ThreadTable.thread_self ();
   
@@ -614,7 +614,7 @@
  * stamp smaller than @a wakeup_stamp.
  */
 static void
-common_thread_emit_wakeups (guint64 wakeup_stamp)
+common_thread_emit_wakeups (BirnetUInt64 wakeup_stamp)
 {
   g_return_if_fail (wakeup_stamp > 0);
   




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]