[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog libbase/utility.h
From: |
Dossy Shiobara |
Subject: |
[Gnash-commit] gnash ChangeLog libbase/utility.h |
Date: |
Sat, 29 Mar 2008 03:15:38 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Dossy Shiobara <dossy> 08/03/29 03:15:38
Modified files:
. : ChangeLog
libbase : utility.h
Log message:
Provide get_thread_id() that returns the current thread ID or
gracefully degrades to returning the current process ID if
thread ID is not available.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6069&r2=1.6070
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/utility.h?cvsroot=gnash&r1=1.42&r2=1.43
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6069
retrieving revision 1.6070
diff -u -b -r1.6069 -r1.6070
--- ChangeLog 29 Mar 2008 03:13:12 -0000 1.6069
+++ ChangeLog 29 Mar 2008 03:15:37 -0000 1.6070
@@ -1,5 +1,15 @@
2008-03-28 Dossy Shiobara <address@hidden>
+ * libbase/utility.h: Provide get_thread_id() that returns the
+ current thread ID or gracefully degrades to returning the
+ current process ID if thread ID is not available.
+
+ * libbase/log.cpp, libnet/handler.cpp, libnet/http.cpp,
+ libnet/rtmp.cpp: Don't call pthread_self() directly, use
+ get_thread_id() instead.
+
+2008-03-28 Dossy Shiobara <address@hidden>
+
* libnet/http.cpp, libnet/http.h, libnet/statistics.h:
Disambiguate symbols with prefixes as GCC 3.x doesn't have
strongly typed enums.
Index: libbase/utility.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/utility.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- libbase/utility.h 27 Mar 2008 16:12:36 -0000 1.42
+++ libbase/utility.h 29 Mar 2008 03:15:37 -0000 1.43
@@ -220,6 +220,34 @@
return typeName;
}
+#ifdef HAVE_PTHREADS
+#include <pthread.h>
+#else
+# ifdef _WIN32
+/* We can't pull in all of windows.h here, so lets just copy this here. */
+extern "C" {
+ unsigned long int /* DWORD WINAPI */ GetCurrentThreadId(void);
+}
+# else
+/* getpid() */
+#include <sys/types.h>
+#include <unistd.h>
+# endif
+#endif
+
+inline unsigned long int /* pthread_t */ get_thread_id(void)
+{
+#ifdef HAVE_PTHREADS
+ return pthread_self();
+#else
+# ifdef _WIN32
+ return GetCurrentThreadId();
+# else
+ return getpid();
+# endif
+#endif
+}
+
#endif // UTILITY_H
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog libbase/utility.h,
Dossy Shiobara <=