Václav Slavík
35e9c131e2
Fix thread ID formatting in log messages.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-24 10:33:57 +00:00
Francesco Montorsi
363daf0bd1
fix incoherency between the wxThread implementation based on MSW threads and pthread: Delete()ing a thread which hasn't started yet must return wxTHREAD_MISC_ERROR
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-26 22:44:13 +00:00
Vadim Zeitlin
feedacd880
Include sys/time.h from threadpsx.cpp for all systems.
...
It's needed by Linux and QNX and shouldn't do any harm under the others.
See #11817 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:39 +00:00
Vadim Zeitlin
2450225e87
Don't lock global mutex when deleting wxThread to avoid deadlocks.
...
Calling out the user-defined wxThread dtor while holding gs_mutexDeleteThread
lock is a bad idea as it may result in deadlocks if the dtor deletes another
thread. Only lock the mutex directly before manipulating the data it protects.
Thanks to Neno Ganchev.
Closes #11501 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-05 17:30:53 +00:00
Paul Cornett
a243da29c8
make array data fully const
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-02 17:28:45 +00:00
Vadim Zeitlin
9a83f86094
Globally replace _T() with wxT().
...
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660 ).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-23 20:30:22 +00:00
Vadim Zeitlin
f922638305
Added wxThread::GetMainId().
...
This is useful for checking if a message was logged from the main thread or not and also allows us to implement IsMain() by comparing GetCurrentId() with GetMainId() in all ports and avoid repetition.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-11 20:46:55 +00:00
Vadim Zeitlin
711f12ef2e
made definition of wxUSE_LOG_DEBUG dependent on wxDEBUG_LEVEL and added wxUSE_LOG_TRACE (currently never enabled by default); fix warnings about unused variables after these changes
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-22 17:18:07 +00:00
Vadim Zeitlin
4b6a582bef
replace more __WXDEBUG__ occurrences with wxDEBUG_LEVEL
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-22 12:53:48 +00:00
Francesco Montorsi
122cf17b13
use %p when logging the thread IDs instead of %lu to make it easier to debug multithreaded programs when using GDB (which uses the %p syntax)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-20 12:40:30 +00:00
Vadim Zeitlin
d3b9f782ef
don't use annoying and unneeded in C++ casts of NULL to "T *" in all other files neither
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-19 13:55:27 +00:00
Stefan Csomor
e317bd3f10
solving osx problems (default inlines-hidden) by explicitely exporting the involved methods
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-11 06:46:23 +00:00
Robert Roebling
375f364ef2
Test for reentrance into non-recursive wxMutex. If it happens, yield dead lock error, don't hang
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-08 08:00:03 +00:00
Robert Roebling
0eb949e11f
Compilo for wxMac
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-05 08:21:08 +00:00
Stefan Csomor
ca9e2173a6
gcc is too aggressively hiding these inlines on wxCriticialSection on osx, expose them for wxPython
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-04 06:26:24 +00:00
Vadim Zeitlin
8cd8a7feb7
wxThread::Sleep() is the same as wxMilliSleep() on all platforms but Mac (and maybe it should be the same thing there as well)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-12 02:28:46 +00:00
Paul Cornett
d254213eb2
add MutexGuiEnter/Leave to wxAppTraits, integrate native GTK+ GUI locking
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-17 05:37:00 +00:00
Václav Slavík
79b7b95aed
catch unhandled exceptions in POSIX threads implementation the same way wxMSW does
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-26 19:41:34 +00:00
Vadim Zeitlin
a07bf2d003
fix translation of wx priority values to the standard Unix ones in SetPriority()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-03 22:52:38 +00:00
Vadim Zeitlin
e55a667c1c
test for pthread_mutex_timedlock() availability in configure
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-13 22:37:26 +00:00
Vadim Zeitlin
fd91cec141
use gettimeofday() instead of clock_gettime() as the latter lives in librt which we currently don't link with and it seems not to be worth to add another library just because of wxMutex::LockTimeout()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-08 01:46:02 +00:00
Vadim Zeitlin
696d13ee0e
added wxMutex::LockTimeout() (modified patch 1671637)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-08 00:22:11 +00:00
Vadim Zeitlin
85bf679acc
fixed detection of number of processors under Linux 2.6 (replaces patch 1663444)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-07 22:23:47 +00:00
Vadim Zeitlin
5a2d9e121f
reverted last change: wxGTK-specific wxMutextGui code breaks linkage of wxBase programs
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-18 19:53:36 +00:00
Paul Cornett
165d3652ff
use GTK-specific GUI lock
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-18 18:13:34 +00:00
Vadim Zeitlin
bc971e307d
fix crash in wxLogTrace() in Unicode build
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-08 13:58:59 +00:00
Włodzimierz Skiba
02761f6cd4
Include wx/module.h according to precompiled headers of wx/wx.h (with other minor cleaning).
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-31 19:31:43 +00:00
Włodzimierz Skiba
bb90a3e6fd
Include wx/stopwatch.h according to precompiled headers of wx/wx.h (with other minor cleaning).
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-25 08:47:47 +00:00
Vadim Zeitlin
25b34b267e
protect gs_allThreads with a mutex (modified patch 1518719)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-24 18:26:26 +00:00
Włodzimierz Skiba
c0badb709a
Include wx/timer.h according to precompiled headers of wx/wx.h (with other minor cleaning).
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-23 11:04:37 +00:00
Włodzimierz Skiba
de6185e212
Include wx/utils.h according to precompiled headers of wx/wx.h (with other minor cleaning).
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-02 10:39:23 +00:00
Włodzimierz Skiba
e4db172a3b
Include wx/log.h according to precompiled headers of wx/wx.h (with other minor cleaning).
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-26 08:21:31 +00:00
Włodzimierz Skiba
88a7a4e10e
Include wx/intl.h according to precompiled headers of wx/wx.h (with other minor cleaning).
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-25 14:38:19 +00:00
Włodzimierz Skiba
ad9835c97c
Include wx/dynarray.h according to precompiled headers of wx/wx.h (with other minor cleaning).
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-19 14:18:39 +00:00
Julian Smart
b486658282
Applied patch [ 1336712 ] Fix segfault when calling wxThread::Exit()
...
By bdonner
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-17 19:17:40 +00:00
Vadim Zeitlin
741d91c5e4
harmless DEC cc warning fixes
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-08 16:56:42 +00:00
Vadim Zeitlin
123dca7d25
don't declare pthread_mutexattr_settype() ourselves if the system already does it, we might have a slightly different declaration and this causes problems
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-25 22:48:06 +00:00
Vadim Zeitlin
17a1ebd101
first round of Intel compiler warning fixes: down from a few thousands just to slightly more than 100
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-25 19:59:19 +00:00
Stefan Neis
8a077f2872
Applied [ 1186782 ] Setting thread stack size on Unix.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-25 16:12:18 +00:00
Mart Raudsepp
8907154c1a
Nuke #pragma implementation/interface's
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-23 12:56:45 +00:00
Vadim Zeitlin
0d2c74c6ef
use WX_DEFINE_ARRAY_PTR for anarray of pointers (fixes Sun CC warning)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-13 15:58:50 +00:00
Vadim Zeitlin
4f66d445e1
fixed -Wundef warning for HAVE_SCHED_H
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-08-24 12:11:14 +00:00
Vadim Zeitlin
816a7358d3
test for wxHAVE_PTHREAD_CLEANUP with #ifdefs instead of testing for (never defined) HAVE_THREAD_CLEANUP_FUNCTIONS with #if
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-08-04 01:06:36 +00:00
Julian Smart
e61ec95a3c
stopwatch.h needed for wxGetLocalTimeMillis
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-17 09:10:35 +00:00
Robert Roebling
343b1669f3
Set state of internal thread object upon ::Exit
...
to EXITED. This is consistent with MSW and
fixes a crash with double deletion.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-31 17:55:20 +00:00
Vadim Zeitlin
cf25117b67
fixed warning about deprecated wxUsleep
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-08 19:02:01 +00:00
Julian Smart
655719367a
Use old licence name
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 20:53:33 +00:00
Julian Smart
77ffb5937e
Name and version changes
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 14:56:36 +00:00
Robin Dunn
5b65f1364d
If the threads module hasn't been initialized yet then we can assume
...
the IsMain == true. This allows wxASSERTs that happen before the
wxApp is created (as can easily happen in wxPython unfortunatly) to
behave normally instead of just calling wxTrap.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-18 19:59:18 +00:00
Robert Roebling
76a6e80383
Applied patch for Intel compiler.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-31 15:43:19 +00:00