Commit graph

421 commits

Author SHA1 Message Date
Caolán McNamara
73f453bd11 just use rtl::OUString::createFromAscii
Change-Id: I425e7bcc8f81b2d67a98244ba4419ace1ba569ec
2012-07-03 21:21:09 +01:00
Caolán McNamara
7d851250e5 we don't need to check for complete length, any non 0 length will do
Change-Id: I6978524ef934ee97d151e0fd22f3a0dfc91fd26e
2012-07-03 21:21:09 +01:00
Caolán McNamara
57ea40b8b6 WaE: clear higher debugging levels warnings
Change-Id: I611dc412b5461f368f23aa8239e48d0e175f5168
2012-06-15 15:41:12 +01:00
Michael Meeks
c3a6a57fc2 re-base on ALv2 code. 2012-06-13 14:18:29 +01:00
Michael Meeks
544c785c13 quiet potential size warnings. 2012-06-13 14:09:19 +01:00
Michael Meeks
aa00f6f1ce targetted sb140 revert. 2012-06-13 14:09:19 +01:00
Stephan Bergmann
2fa2660b55 Better fix for ThreadPool/ORequestThread life cycle
This is a follow up to d015384e1d "Fixed
ThreadPool (and dependent ORequestThread) life cycle" that still had some
problems:

* First, if Bridge::terminate was first entered from the reader or writer
thread, it would not join on that thread, so that thread could still be running
during exit.

That has been addressed by giving Bridge::dispose new semantics:  It waits until
both Bridge::terminate has completed (even if that was called from a different
thread) and all spawned threads (reader, writer, ORequestThread workers) have
been joined.  (This implies that Bridge::dispose must not be called from such a
thread, to avoid deadlock.)

* Second, if Bridge::terminate was first entered from an ORequestThread, the
call to uno_threadpool_dispose(0) to join on all such worker threads could
deadlock.

That has been addressed by making the last call to uno_threadpool_destroy wait
to join on all worker threads, and by calling uno_threadpool_destroy only from
the final Bridge::terminate (from Bridge::dispose), to avoid deadlock.  (The
special semantics of uno_threadpool_dispose(0) are no longer needed and have
been removed, as they conflicted with the fix for the third problem below.)

* Third, once uno_threadpool_destroy had called uno_threadpool_dispose(0), the
ThreadAdmin singleton had been disposed, so no new remote bridges could
successfully be created afterwards.

That has been addressed by making ThreadAdmin a member of ThreadPool, and making
(only) those uno_ThreadPool handles with overlapping life spans share one
ThreadPool instance (which thus is no longer a singleton, either).
Additionally, ORequestThread has been made more robust (in the style of
salhelper::Thread) to avoid races.

Change-Id: I2cbd1b3f9aecc1bf4649e482d2c22b33b471788f
2012-05-23 10:10:51 +02:00
Stephan Bergmann
d015384e1d Fixed ThreadPool (and dependent ORequestThread) life cycle
At least with sw_complex test under load, it happened that an ORequestThread
could still process a remote release request while the main thread was already
in exit(3).  This was because (a) ThreadPool never joined with the spawned
worker threads (which has been rectified by calling uno_threadpool_dispose(0)
from the final uno_threadpool_destroy), and (b) binaryurp::Bridge called
uno_threadpool_destroy only from its destructor (which could go as late as
exit(3)) instead of from terminate.

Additional clean up:
* Access to Bridge's threadPool_ is now cleanly controlled by mutex_ (even
  though that might not be necessary in every case).
* ThreadPool's stopDisposing got renamed to destroy, to make meaning clearer.

Change-Id: I45fa76e80e790a11065e7bf8ac9d92af2e62f262
2012-05-16 22:09:21 +02:00
Caolán McNamara
df6d495f2a fix OSL_DEBUG_LEVEL > 1 build 2012-04-26 11:41:59 +01:00
Stephan Bergmann
61a8905c48 Reverted "Leak TypeDescriptor_Init_Impl to avoid problems at exit."
(This reverts commit 0ba6bd3ddc025666a6d4bb0640bf443728b23bd3.)

The problems worked-around there are no longer observed by me, so they
were hopefully only a temporal problem (the real root cause had never
been found back then).  If problems start to pop up again, we'll need
to have another look at this.
2012-04-26 09:33:12 +02:00
Catalin Iacob
fd0790a219 WaE: Clang unused variable 2012-04-25 10:07:00 +02:00
Szabolcs Dezsi
d6bc02f8c4 Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator 2012-04-06 20:03:42 +02:00
Szabolcs Dezsi
743f22045c Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Pattern used:

find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\)) *) *)$/\1\2 ( \3 == \4 )/' \{\} \;
2012-04-06 15:07:41 +02:00
Tor Lillqvist
694bb9f5de Do two fairly useless but often emitted OSL_TRACEs only if OSL_DEBUG_LEVEL > 2 2012-04-05 20:46:26 +03:00
Tor Lillqvist
128749140f More hacking on static linking (iOS) support 2012-03-21 00:00:05 +02:00
Tor Lillqvist
c0ab229dc7 Uniquify uno_initEnvironment and uno_ext_getMapping in the static linking case 2012-03-21 00:00:04 +02:00
Tor Lillqvist
a8f19ca300 Use MAX_ALIGNMENT_4 also for iOS 2012-03-21 00:00:02 +02:00
Stephan Bergmann
ba6714d34f Dead code 2012-03-14 15:23:22 +01:00
Stephan Bergmann
6e67c03dc0 Enable -Wnon-virtual-dtor for GCC 4.6
...which has the necessary features to support it.

Change a lot of classes to either contain a protected non-virtual dtor
(which is backwards compatible, so even works for cppumaker-generated
UNO headers) or a public virtual one.

cppuhelper/propertysetmixin.hxx still needs to disable the warning, as
the relevant class has a non-virtual dtor but friends, which would still
cause GCC to warn.

Includes a patch for libcmis, intended to be upstreamed.
2012-03-14 13:32:02 +01:00
Michael Stahl
a860cd108c cppu: JobQueue::enter: add mutex guards for m_nToDo
Considered replacing it with oslInterlockedCount, but wondered why there is
no osl_getInterlockedCount (similar to glib's g_atomic_int_get)...
2012-02-27 20:53:20 +01:00
Stephan Bergmann
cba3ac1eab Avoid deadlocks when disposing recursive JobQueue::enter
...where the outer JobQueue::enter blocks on m_cndWait after it has been reset
again due to m_lstJob.empty().
2012-02-10 16:26:00 +01:00
Alexander Bergmann
0439af27e1 Code cleanup: ( () ) replaced by (()) 2012-01-26 17:41:07 +00:00
Stephan Bergmann
7c704c78d3 Removed some unused parameters; added SAL_UNUSED_PARAMETER.
SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC)
is used to annotate legitimately unused parameters, so that static
analysis tools can tell legitimately unused parameters from truly
unnecessary ones.  To that end, some patches for external modules
are also added, that are only applied when compiling with GCC and
add necessary __attribute__ ((unused)) in headers.
2012-01-21 15:21:16 +01:00
Caolán McNamara
504e01e52e typo in OSL_DEBUG_LEVEL > 1 code 2012-01-06 09:52:42 +00:00
Stephan Bergmann
0ba6bd3ddc Leak TypeDescriptor_Init_Impl to avoid problems at exit. 2012-01-05 11:58:40 +01:00
Stephan Bergmann
321894af2c Explicitly initialize TypeDescriptor_Init_Impl. 2012-01-05 11:54:08 +01:00
Stephan Bergmann
9d54084d61 Replace dynamic array with std::vector. 2012-01-02 18:01:42 +01:00
Stephan Bergmann
c84a5ec4cb OSL_ASSERT -> assert 2011-12-23 18:56:18 +01:00
Caolán McNamara
bc4c7b52a8 get this to build under msvc 2008 2011-12-19 15:16:51 +00:00
Stephan Bergmann
b68640c44e Prevent creation of new ORequestThreads during shutdown. 2011-12-19 16:08:20 +01:00
Stephan Bergmann
2af1a97346 Removed superfluous CPPU_DLLPUBLIC from definitions. 2011-12-19 11:33:13 +01:00
Matúš Kukan
d899f976ee cppu: add visibility symbols 2011-12-19 10:14:52 +01:00
Matúš Kukan
051fdda153 cppu: convert to gbuild
Because of unit tests is here custom target where are idl files
processed.
2011-12-19 10:14:51 +01:00
Olivier Hallot
1b99d8800e Fix for fdo43460 Part X getLength() to isEmpty()
Part X
Module
cppu
cppuhelper
cpputools
2011-12-17 17:15:53 +04:00
Tor Lillqvist
7904a8cc56 I don't see NO_BSYMBOLIC being used anywhere 2011-12-11 02:57:59 +02:00
Stefan Knorr (astron)
ad2eb6c4ba Less succes, more success 2011-12-08 09:06:09 +01:00
Stephan Bergmann
beebf578ed -Wstrict-aliasing fix 2011-12-01 21:24:50 +01:00
Stephan Bergmann
db4017cb71 The other uses of pReserved had been changed to nStaticRefCount in 2001. 2011-12-01 21:24:49 +01:00
Norbert Thiebaud
24b4c075d5 remove include of pch header in cppu 2011-11-27 13:02:56 -06:00
Caolán McNamara
424dcd6813 targeting gcc 4.6.1 gentoo strict-aliasing warnings 2011-10-03 17:00:54 +01:00
Thomas Arnhold
be6a8677a6 OSL_TRACE: Remove trailing newlines
Done with perl regex:
s/(\n\s*OSL_TRACE\(\s*\"[^\n]+?)\s*(\\n)+(\"[^\n]*\)\;\n)/$1$3/gs;

- removed trailing whitespaces and (multiple) newlines
2011-09-21 09:28:39 +02:00
Stephan Bergmann
315e6ca249 sb140: silence warnings 2011-09-09 17:46:38 +02:00
Tor Lillqvist
e081225623 Tweak some DLL and import library names in the WNTGCC case 2011-08-30 11:13:32 +03:00
Tor Lillqvist
b6a9f3560a Link cppu statically to gcc3_uno on iOS 2011-08-21 17:49:11 +03:00
Tor Lillqvist
9097947b9b Revert "I am tired of thesee assertions, put them behind dbglevel>2"
Nah, having them behind dbglevel>1 is fine (which already means these
assertions won't normally be compiled even with --enable-debug).

I got mislead as I was building with dbglevel=2 everywhere. But
pondering the point of dbglevel a.k.a. OSL_DEBUG_LEVEL, I think the
right way to see it is: You are not supposed to build all (or large
parts) of LibreOffice with dbglevel=2. If we used OSL_TRACE all over
the place as thoroughly as in some files in sal/rtl, that would lead
to astronomical amounts of tracing output. (We don't use OSL_TRACE
like that, but that is another thing...)

I think the intended use of dbglevel is that you should build with
dbglevel=2 only the small part of code you are currently actively
working on, when you want to see trace output.

Of course, another problem then is that in some modules and/or
libraries it might not be possible to compile just a part of the
sources with dbglevel=2. That should be fixed.

This reverts commit a3bad28550.
2011-08-21 14:30:37 +03:00
Tor Lillqvist
a3bad28550 I am tired of thesee assertions, put them behind dbglevel>2 2011-08-19 17:58:50 +03:00
Tor Lillqvist
d7e16fdbab Fix compilation errors with dbglevel>1 2011-08-09 10:27:40 +03:00
Tor Lillqvist
bb0f5c9359 No dynamic module loading on iOS 2011-06-13 02:50:38 +03:00
Francois Tigeot
35e1b53c7e Remove OS/2 support. 2011-04-18 16:59:48 +02:00
Caolán McNamara
44d2445580 use rtl::Static where double-locked pattern used 2011-04-03 21:43:48 +01:00