summaryrefslogtreecommitdiffstats
path: root/src/kernel
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-10-08 12:59:30 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-10-08 12:59:30 +0900
commit8066b05478ac646d0410fc9cedca5f82163b53d3 (patch)
treea8954c8902a4012da3274e060e35e93f461ac7b9 /src/kernel
parent1e335369f9446417dab9bf93e1395346e11c5af9 (diff)
downloadtqt3-8066b05478ac646d0410fc9cedca5f82163b53d3.tar.gz
tqt3-8066b05478ac646d0410fc9cedca5f82163b53d3.zip
Remove use of glib thread code. Use pthread instead
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/tqthread_unix.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/kernel/tqthread_unix.cpp b/src/kernel/tqthread_unix.cpp
index 00c389d20..db780ee18 100644
--- a/src/kernel/tqthread_unix.cpp
+++ b/src/kernel/tqthread_unix.cpp
@@ -52,10 +52,6 @@ typedef pthread_mutex_t Q_MUTEX_T;
#include <errno.h>
#include <sched.h>
-#if defined(QT_USE_GLIBMAINLOOP)
-#include <glib.h>
-#endif // QT_USE_GLIBMAINLOOP
-
static TQMutexPool *qt_thread_mutexpool = 0;
#if defined(Q_C_CALLBACKS)
@@ -126,12 +122,6 @@ void *TQThreadInstance::start( void *_arg )
{
void **arg = (void **) _arg;
-#if defined(QT_USE_GLIBMAINLOOP)
- // This is the first time we have access to the native pthread ID of this newly created thread
- ((TQThreadInstance*)arg[1])->thread_id = pthread_self();
- pthread_detach(pthread_self());
-#endif // QT_USE_GLIBMAINLOOP
-
#ifdef QT_DEBUG
tqDebug("TQThreadInstance::start: Setting thread storage to %p\n", (TQThread *) arg[0]);
#endif // QT_DEBUG
@@ -417,26 +407,6 @@ void TQThread::start(Priority priority)
d->args[0] = this;
d->args[1] = d;
-#if defined(QT_USE_GLIBMAINLOOP)
- // The correct thread_id is set in TQThreadInstance::start using the value of d->args[1]
- d->thread_id = 0;
-
- // glib versions < 2.32.0 requires threading system initialization call
- #if GLIB_CHECK_VERSION(2, 32, 0)
- GThread* glib_thread_handle = g_thread_new( NULL, (GThreadFunc)TQThreadInstance::start, d->args );
- #else
- if( !g_thread_get_initialized() );
- g_thread_init(NULL);
- GThread* glib_thread_handle = g_thread_create((GThreadFunc)TQThreadInstance::start, d->args, false, NULL);
- #endif
-
- if (glib_thread_handle) {
- ret = 0;
- }
- else {
- ret = -1;
- }
-#else // QT_USE_GLIBMAINLOOP
ret = pthread_create( &d->thread_id, &attr, (TQtThreadCallback)TQThreadInstance::start, d->args );
#if defined (Q_OS_HPUX)
if (ret == EPERM) {
@@ -445,7 +415,6 @@ void TQThread::start(Priority priority)
}
#endif
pthread_attr_destroy( &attr );
-#endif // QT_USE_GLIBMAINLOOP
if ( ret ) {
#ifdef QT_CHECK_STATE