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
ad28ffaa
Kaydet (Commit)
ad28ffaa
authored
Mar 20, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove unnecessary vcl::SolarMutexObject
Change-Id: I6dfdd7d5d211b66019dfbe364101140e28a3584d
üst
36be3d94
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
22 additions
and
138 deletions
+22
-138
solarmutex.hxx
include/vcl/solarmutex.hxx
+0
-65
Library_vcl.mk
vcl/Library_vcl.mk
+0
-1
geninst.cxx
vcl/generic/app/geninst.cxx
+3
-3
svpinst.cxx
vcl/headless/svpinst.cxx
+0
-1
geninst.h
vcl/inc/generic/geninst.h
+5
-3
svpinst.hxx
vcl/inc/headless/svpinst.hxx
+0
-2
salinst.h
vcl/inc/osx/salinst.h
+2
-2
salinst.h
vcl/inc/unx/salinst.h
+0
-1
salinst.cxx
vcl/osx/salinst.cxx
+3
-4
solarmutex.cxx
vcl/source/app/solarmutex.cxx
+0
-48
salinst.cxx
vcl/win/source/app/salinst.cxx
+9
-8
No files found.
include/vcl/solarmutex.hxx
deleted
100644 → 0
Dosyayı görüntüle @
36be3d94
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_VCL_SOLARMUTEX_HXX
#define INCLUDED_VCL_SOLARMUTEX_HXX
#include <comphelper/solarmutex.hxx>
#include <osl/mutex.h>
#include <vcl/dllapi.h>
namespace
vcl
{
/** Implementation of the SolarMutex interface.
*/
class
VCL_DLLPUBLIC
SolarMutexObject
:
public
comphelper
::
SolarMutex
{
public
:
//static SolarMutex& SAL_CALL getGlobalMutex();
/** Creates mutex
*/
SolarMutexObject
();
/** Implicitly destroys mutex
*/
virtual
~
SolarMutexObject
();
virtual
void
acquire
();
virtual
void
release
();
virtual
bool
tryToAcquire
();
protected
:
oslMutex
m_solarMutex
;
private
:
/* Disable copy/assignment
*/
SolarMutexObject
(
const
SolarMutexObject
&
);
SolarMutexObject
&
SAL_CALL
operator
=
(
const
SolarMutexObject
&
);
};
}
#endif // INCLUDED_VCL_SOLARMUTEX_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/Library_vcl.mk
Dosyayı görüntüle @
ad28ffaa
...
...
@@ -113,7 +113,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/app/IconThemeInfo \
vcl/source/app/IconThemeScanner \
vcl/source/app/IconThemeSelector \
vcl/source/app/solarmutex \
vcl/source/app/sound \
vcl/source/app/stdtext \
vcl/source/app/svapp \
...
...
vcl/generic/app/geninst.cxx
Dosyayı görüntüle @
ad28ffaa
...
...
@@ -46,7 +46,7 @@ SalYieldMutex::~SalYieldMutex()
void
SalYieldMutex
::
acquire
()
{
SolarMutexObject
::
acquire
();
m_mutex
.
acquire
();
mnThreadId
=
osl
::
Thread
::
getCurrentIdentifier
();
mnCount
++
;
}
...
...
@@ -60,12 +60,12 @@ void SalYieldMutex::release()
mnThreadId
=
0
;
mnCount
--
;
}
SolarMutexObject
::
release
();
m_mutex
.
release
();
}
bool
SalYieldMutex
::
tryToAcquire
()
{
if
(
SolarMutexObject
::
tryToAcquire
()
)
if
(
m_mutex
.
tryToAcquire
()
)
{
mnThreadId
=
osl
::
Thread
::
getCurrentIdentifier
();
mnCount
++
;
...
...
vcl/headless/svpinst.cxx
Dosyayı görüntüle @
ad28ffaa
...
...
@@ -42,7 +42,6 @@
#include <svdata.hxx>
#include <generic/gendata.hxx>
#include <basebmp/scanlineformats.hxx>
#include <vcl/solarmutex.hxx>
// FIXME: remove when we re-work the svp mainloop
#include <unx/salunxtime.h>
...
...
vcl/inc/generic/geninst.h
Dosyayı görüntüle @
ad28ffaa
...
...
@@ -20,10 +20,10 @@
#ifndef INCLUDED_VCL_INC_GENERIC_GENINST_H
#define INCLUDED_VCL_INC_GENERIC_GENINST_H
#include <comphelper/solarmutex.hxx>
#include <tools/solar.h>
#include <osl/thread.hxx>
#include <vclpluginapi.h>
#include <vcl/solarmutex.hxx>
#include <salinst.hxx>
#include <saldatabasic.hxx>
#include <generic/genprn.h>
...
...
@@ -46,8 +46,10 @@ inline SalYieldMutexReleaser::~SalYieldMutexReleaser()
GetSalData
()
->
m_pInstance
->
AcquireYieldMutex
(
m_nYieldCount
);
}
class
VCL_DLLPUBLIC
SalYieldMutex
:
public
vcl
::
SolarMutexObject
class
VCL_DLLPUBLIC
SalYieldMutex
:
public
comphelper
::
SolarMutex
{
osl
::
Mutex
m_mutex
;
protected
:
sal_uIntPtr
mnCount
;
oslThreadIdentifier
mnThreadId
;
...
...
@@ -60,7 +62,7 @@ public:
virtual
void
release
();
virtual
bool
tryToAcquire
();
virtual
sal_uIntPtr
GetAcquireCount
()
const
{
return
mnCount
;
}
sal_uIntPtr
GetAcquireCount
()
const
{
return
mnCount
;
}
oslThreadIdentifier
GetThreadId
()
const
{
return
mnThreadId
;
}
};
...
...
vcl/inc/headless/svpinst.hxx
Dosyayı görüntüle @
ad28ffaa
...
...
@@ -20,8 +20,6 @@
#ifndef INCLUDED_VCL_INC_HEADLESS_SVPINST_HXX
#define INCLUDED_VCL_INC_HEADLESS_SVPINST_HXX
#include <vcl/solarmutex.hxx>
#include <osl/mutex.hxx>
#include <osl/thread.hxx>
#include <salinst.hxx>
...
...
vcl/inc/osx/salinst.h
Dosyayı görüntüle @
ad28ffaa
...
...
@@ -23,7 +23,6 @@
#include "comphelper/solarmutex.hxx"
#include "osl/thread.hxx"
#include "osl/conditn.h"
#include <vcl/solarmutex.hxx>
#ifdef MACOSX
#include "osx/osxvcltypes.h"
...
...
@@ -37,8 +36,9 @@ class AquaSalFrame;
class
ApplicationEvent
;
class
Image
;
class
SalYieldMutex
:
public
vcl
::
SolarMutexObject
class
SalYieldMutex
:
public
comphelper
::
SolarMutex
{
osl
::
Mutex
m_mutex
;
sal_uLong
mnCount
;
oslThreadIdentifier
mnThreadId
;
...
...
vcl/inc/unx/salinst.h
Dosyayı görüntüle @
ad28ffaa
...
...
@@ -23,7 +23,6 @@
#include <osl/thread.hxx>
#include <vclpluginapi.h>
#include <salinst.hxx>
#include <vcl/solarmutex.hxx>
#include "generic/geninst.h"
#include <prex.h>
...
...
vcl/osx/salinst.cxx
Dosyayı görüntüle @
ad28ffaa
...
...
@@ -30,7 +30,6 @@
#include "vcl/svapp.hxx"
#include "vcl/window.hxx"
#include "vcl/timer.hxx"
#include "vcl/solarmutex.hxx"
#include "osx/saldata.hxx"
#include "osx/salinst.h"
...
...
@@ -278,7 +277,7 @@ SalYieldMutex::SalYieldMutex()
void
SalYieldMutex
::
acquire
()
{
SolarMutexObject
::
acquire
();
m_mutex
.
acquire
();
mnThreadId
=
osl
::
Thread
::
getCurrentIdentifier
();
mnCount
++
;
}
...
...
@@ -291,12 +290,12 @@ void SalYieldMutex::release()
mnThreadId
=
0
;
mnCount
--
;
}
SolarMutexObject
::
release
();
m_mutex
.
release
();
}
bool
SalYieldMutex
::
tryToAcquire
()
{
if
(
SolarMutexObject
::
tryToAcquire
()
)
if
(
m_mutex
.
tryToAcquire
()
)
{
mnThreadId
=
osl
::
Thread
::
getCurrentIdentifier
();
mnCount
++
;
...
...
vcl/source/app/solarmutex.cxx
deleted
100644 → 0
Dosyayı görüntüle @
36be3d94
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <vcl/solarmutex.hxx>
using
namespace
vcl
;
SolarMutexObject
::
SolarMutexObject
()
:
m_solarMutex
(
osl_createMutex
()
)
{
}
SolarMutexObject
::~
SolarMutexObject
()
{
osl_destroyMutex
(
m_solarMutex
);
}
void
SolarMutexObject
::
acquire
()
{
osl_acquireMutex
(
m_solarMutex
);
}
bool
SolarMutexObject
::
tryToAcquire
()
{
return
osl_tryToAcquireMutex
(
m_solarMutex
);
}
void
SolarMutexObject
::
release
()
{
osl_releaseMutex
(
m_solarMutex
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/win/source/app/salinst.cxx
Dosyayı görüntüle @
ad28ffaa
...
...
@@ -30,7 +30,6 @@
#include <vcl/timer.hxx>
#include <vcl/apptypes.hxx>
#include <vcl/solarmutex.hxx>
#include <win/wincomp.hxx>
#include <win/salids.hrc>
#include <win/saldata.hxx>
...
...
@@ -110,8 +109,10 @@ LRESULT CALLBACK SalComWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPa
class
SalYieldMutex
:
public
vcl
::
SolarMutexObject
class
SalYieldMutex
:
public
comphelper
::
SolarMutex
{
osl
::
Mutex
m_mutex
;
public
:
// for ImplSalYield()
WinSalInstance
*
mpInstData
;
sal_uLong
mnCount
;
...
...
@@ -140,7 +141,7 @@ SalYieldMutex::SalYieldMutex( WinSalInstance* pInstData )
void
SalYieldMutex
::
acquire
()
{
SolarMutexObject
::
acquire
();
m_mutex
.
acquire
();
mnCount
++
;
mnThreadId
=
GetCurrentThreadId
();
}
...
...
@@ -151,7 +152,7 @@ void SalYieldMutex::release()
{
DWORD
nThreadId
=
GetCurrentThreadId
();
if
(
mnThreadId
!=
nThreadId
)
SolarMutexObject
::
release
();
m_mutex
.
release
();
else
{
SalData
*
pSalData
=
GetSalData
();
...
...
@@ -168,13 +169,13 @@ void SalYieldMutex::release()
ImplPostMessage
(
mpInstData
->
mhComWnd
,
SAL_MSG_RELEASEWAITYIELD
,
0
,
0
);
mnThreadId
=
0
;
mnCount
--
;
SolarMutexObject
::
release
();
m_mutex
.
release
();
mpInstData
->
mpSalWaitMutex
->
release
();
}
else
{
mnCount
--
;
SolarMutexObject
::
release
();
m_mutex
.
release
();
}
}
else
...
...
@@ -182,7 +183,7 @@ void SalYieldMutex::release()
if
(
mnCount
==
1
)
mnThreadId
=
0
;
mnCount
--
;
SolarMutexObject
::
release
();
m_mutex
.
release
();
}
}
}
...
...
@@ -191,7 +192,7 @@ void SalYieldMutex::release()
bool
SalYieldMutex
::
tryToAcquire
()
{
if
(
SolarMutexObject
::
tryToAcquire
()
)
if
(
m_mutex
.
tryToAcquire
()
)
{
mnCount
++
;
mnThreadId
=
GetCurrentThreadId
();
...
...
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