Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
9b518087
Kaydet (Commit)
9b518087
authored
Eyl 30, 2011
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
move SalYieldMutexReleaser into a more sensible place
üst
10517629
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
36 deletions
+31
-36
geninst.h
vcl/inc/generic/geninst.h
+20
-1
saldata.hxx
vcl/inc/unx/saldata.hxx
+0
-18
saldata.cxx
vcl/unx/generic/app/saldata.cxx
+1
-11
gtkdata.cxx
vcl/unx/gtk/app/gtkdata.cxx
+8
-4
KDEXLib.cxx
vcl/unx/kde4/KDEXLib.cxx
+2
-2
No files found.
vcl/inc/generic/geninst.h
Dosyayı görüntüle @
9b518087
...
...
@@ -31,8 +31,27 @@
#include <vcl/sv.h>
#include <osl/thread.hxx>
#include <vclpluginapi.h>
#include <salinst.hxx>
#include <vcl/solarmutex.hxx>
#include <salinst.hxx>
#include <saldatabasic.hxx>
class
VCL_DLLPUBLIC
SalYieldMutexReleaser
{
sal_uLong
m_nYieldCount
;
public
:
inline
SalYieldMutexReleaser
();
inline
~
SalYieldMutexReleaser
();
};
inline
SalYieldMutexReleaser
::
SalYieldMutexReleaser
()
{
m_nYieldCount
=
GetSalData
()
->
m_pInstance
->
ReleaseYieldMutex
();
}
inline
SalYieldMutexReleaser
::~
SalYieldMutexReleaser
()
{
GetSalData
()
->
m_pInstance
->
AcquireYieldMutex
(
m_nYieldCount
);
}
class
VCL_DLLPUBLIC
SalYieldMutex
:
public
vcl
::
SolarMutexObject
{
...
...
vcl/inc/unx/saldata.hxx
Dosyayı görüntüle @
9b518087
...
...
@@ -104,24 +104,6 @@ inline void X11SalData::XError( Display *pDisplay, XErrorEvent *pEvent ) const
{
pXLib_
->
XError
(
pDisplay
,
pEvent
);
}
#endif
class
YieldMutexReleaser
{
sal_uLong
m_nYieldCount
;
public
:
inline
YieldMutexReleaser
();
inline
~
YieldMutexReleaser
();
};
inline
YieldMutexReleaser
::
YieldMutexReleaser
()
{
m_nYieldCount
=
GetSalData
()
->
m_pInstance
->
ReleaseYieldMutex
();
}
inline
YieldMutexReleaser
::~
YieldMutexReleaser
()
{
GetSalData
()
->
m_pInstance
->
AcquireYieldMutex
(
m_nYieldCount
);
}
#endif // _SV_SALDATA_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/unx/generic/app/saldata.cxx
Dosyayı görüntüle @
9b518087
...
...
@@ -685,16 +685,6 @@ void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
if
(
pEntry
->
HasPendingEvent
()
)
{
pEntry
->
HandleNextEvent
();
// #63862# da jetzt alle user-events ueber die interne
// queue kommen, wird die Kontrolle analog zum select
// gesteuerten Zweig einmal bei bWait abgegeben
/* #i9277# do not reschedule since performance gets down the
the drain under heavy load
YieldMutexReleaser aReleaser;
if ( bWait ) osl_yieldThread();
*/
return
;
}
}
...
...
@@ -728,7 +718,7 @@ void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
{
// release YieldMutex (and re-acquire at block end)
YieldMutexReleaser
aReleaser
;
Sal
YieldMutexReleaser
aReleaser
;
nFound
=
select
(
nFDs
,
&
ReadFDS
,
NULL
,
&
ExceptionFDS
,
pTimeout
);
}
if
(
nFound
<
0
)
// error
...
...
vcl/unx/gtk/app/gtkdata.cxx
Dosyayı görüntüle @
9b518087
...
...
@@ -563,15 +563,19 @@ GtkData::~GtkData()
Yield
(
true
,
true
);
g_warning
(
"TESTME: We used to have a stop-timer here, but the central code should do this"
);
// sanity check: at this point nobody should be yielding, but wake them
// up anyway before the condition they're waiting on gets destroyed.
osl_setCondition
(
m_aDispatchCondition
);
osl_acquireMutex
(
m_aDispatchMutex
);
if
(
m_pUserEvent
)
{
g_source_destroy
(
m_pUserEvent
);
g_source_unref
(
m_pUserEvent
);
m_pUserEvent
=
NULL
;
}
// sanity check: at this point nobody should be yielding, but wake them
// up anyway before the condition they're waiting on gets destroyed.
osl_setCondition
(
m_aDispatchCondition
);
osl_destroyCondition
(
m_aDispatchCondition
);
osl_releaseMutex
(
m_aDispatchMutex
);
osl_destroyMutex
(
m_aDispatchMutex
);
}
...
...
@@ -586,7 +590,7 @@ void GtkData::Yield( bool bWait, bool bHandleAllCurrentEvents )
bool
bWasEvent
=
false
;
{
// release YieldMutex (and re-acquire at block end)
YieldMutexReleaser
aReleaser
;
Sal
YieldMutexReleaser
aReleaser
;
if
(
osl_tryToAcquireMutex
(
m_aDispatchMutex
)
)
bDispatchThread
=
true
;
else
if
(
!
bWait
)
...
...
vcl/unx/kde4/KDEXLib.cxx
Dosyayı görüntüle @
9b518087
...
...
@@ -261,7 +261,7 @@ void KDEXLib::setupEventLoop()
#ifdef GLIB_EVENT_LOOP_SUPPORT
gint
gpoll_wrapper
(
GPollFD
*
ufds
,
guint
nfds
,
gint
timeout
)
{
YieldMutexReleaser
release
;
// release YieldMutex (and re-acquire at block end)
Sal
YieldMutexReleaser
release
;
// release YieldMutex (and re-acquire at block end)
return
old_gpoll
(
ufds
,
nfds
,
timeout
);
}
#endif
...
...
@@ -270,7 +270,7 @@ gint gpoll_wrapper( GPollFD* ufds, guint nfds, gint timeout )
int
lo_select
(
int
nfds
,
fd_set
*
fdread
,
fd_set
*
fdwrite
,
fd_set
*
fdexcept
,
const
struct
timeval
*
orig_timeout
)
{
YieldMutexReleaser
release
;
// release YieldMutex (and re-acquire at block end)
Sal
YieldMutexReleaser
release
;
// release YieldMutex (and re-acquire at block end)
return
qt_select
(
nfds
,
fdread
,
fdwrite
,
fdexcept
,
orig_timeout
);
}
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment