diff options
author | Andreas Hartmetz <ahartmetz@gmail.com> | 2017-11-05 11:16:00 +0100 |
---|---|---|
committer | Andreas Hartmetz <ahartmetz@gmail.com> | 2017-11-08 05:38:39 +0000 |
commit | eeca8895fc7e585f497e908368b8cc1a509847d3 (patch) | |
tree | 6e900fa4259be090ec8a6c486b83d7b34d346293 /src/dbus/qdbusthreaddebug_p.h | |
parent | bfcad18526dc064ac7dd1a08781c60d1d1673a0b (diff) |
Remove obsolete DBus dispatch lock
In c2049f67e4cfe5f09e1b033b910cb37d043a287e, all DBus I/O was
moved into a service thread. The dispatch lock used to protect
DBus I/O in the threading setup before that commit. It is not
needed anymore.
No discernible difference in QtDBus benchmarks, roughly 500
bytes code size reduction on AMD64. The main point is to reduce
confusion from unnecessary code.
Change-Id: Idcbdd2b7e2b317cf6da0b5bfc5ec70afed1f1b48
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/dbus/qdbusthreaddebug_p.h')
-rw-r--r-- | src/dbus/qdbusthreaddebug_p.h | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/dbus/qdbusthreaddebug_p.h b/src/dbus/qdbusthreaddebug_p.h index 96f389fa49..ad0984e26c 100644 --- a/src/dbus/qdbusthreaddebug_p.h +++ b/src/dbus/qdbusthreaddebug_p.h @@ -95,17 +95,6 @@ enum ThreadAction { PendingCallBlockAction = 28, SendMessageAction = 29, HuntAndEmitAction = 30, - - AddTimeoutAction = 50, - RealAddTimeoutAction = 51, - RemoveTimeoutAction = 52, - KillTimerAction = 58, - TimerEventAction = 59, - AddWatchAction = 60, - RemoveWatchAction = 61, - ToggleWatchAction = 62, - SocketReadAction = 63, - SocketWriteAction = 64 }; struct QDBusLockerBase @@ -176,35 +165,6 @@ struct QDBusWriteLocker: QDBusLockerBase } }; -struct QDBusMutexLocker: QDBusLockerBase -{ - QDBusConnectionPrivate *self; - QMutex *mutex; - ThreadAction action; - inline QDBusMutexLocker(ThreadAction a, QDBusConnectionPrivate *s, - QMutex *m) - : self(s), mutex(m), action(a) - { - reportThreadAction(action, BeforeLock, self); - mutex->lock(); - reportThreadAction(action, AfterLock, self); - } - - inline ~QDBusMutexLocker() - { - reportThreadAction(action, BeforeUnlock, self); - mutex->unlock(); - reportThreadAction(action, AfterUnlock, self); - } -}; - -struct QDBusDispatchLocker: QDBusMutexLocker -{ - inline QDBusDispatchLocker(ThreadAction a, QDBusConnectionPrivate *s) - : QDBusMutexLocker(a, s, &s->dispatchLock) - { } -}; - #if QDBUS_THREAD_DEBUG # define SEM_ACQUIRE(action, sem) \ do { \ |