Commit graph

43 commits

Author SHA1 Message Date
Michael Meeks
328e2263fb targetted re-work of cppunit pieces. 2012-06-27 19:13:11 +01:00
Michael Meeks
46b8dbda43 re-base on ALv2 code. 2012-06-26 21:48:59 +01:00
Michael Meeks
b3d8fd8a41 re-base on ALv2 code. 2012-06-12 17:51:46 +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
Bjoern Michaelsen
b1c3e8ae28 make gbuild the default assumption of build.pl
this removes dmake completely out of the build for migrated modules
build.pl now assumes modules to be gbuild, unless there is a
prj/dmake file

Change-Id: I674a036b182ee13c5ec093e83cb3d38133112d3b
2012-04-29 03:50:46 +02:00
Michael Stahl
40aaefeb25 put the missing type into the exception message 2012-04-14 21:07:14 +02:00
Michael Stahl
c923f7d2c2 gbuild: "use" vs. "add":
Naming convention for gbuild methods:
- "add" is used for stuff that is logically a part of the target
  (i.e. not registered at the Module, but defined in the target's makefile)
- "use" is used for stuff that is logically a different target
  (i.e. it is registered at the Module, has it's own makefile, may be
  in a different module than the target)
2012-04-08 01:05:52 +02:00
Szabolcs Dezsi
d6bc02f8c4 Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator 2012-04-06 20:03:42 +02:00
Stephan Bergmann
a4abe212c1 Unused includes 2012-03-20 08:56:53 +01:00
Bjoern Michaelsen
d54e03caf9 binaryurp has cppunit tests 2012-03-13 14:53:02 +01:00
Stephan Bergmann
672ad9493a Clarifying comment added 2012-03-08 14:22:54 +01:00
Stephan Bergmann
d21fb1451e Adapted Reader/Writer to safer-to-use salhelper::Thread 2012-02-23 10:47:36 +01:00
Norbert Thiebaud
c857dff7fc switch to include-based build rather than sourced-based build 2012-02-05 19:34:05 -06: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
Tor Lillqvist
25e10370fe Link most libs and executables with gb_STDLIBS as presumably is intended 2011-12-20 01:12:23 +02:00
Stephan Bergmann
c4e5203999 Code modules no longer depend on stlport. 2011-12-16 17:45:10 +01:00
Olivier Hallot
9201704ede Fix for fdo43460 Part IV getLength to isEmpty
Part IV
Module
basic (small fix per demand from Ivan Timofeev)
binaryurp
bridges
2011-12-13 00:11:25 +04:00
Bjoern Michaelsen
2acd8fbac9 in modules, when we have a env we are in stage gbuild 2011-12-07 15:53:06 +01:00
Takeshi Abe
7113c7152d catch by constant reference 2011-11-30 11:27:42 +09:00
Bjoern Michaelsen
d73e574d8a move reconfigure into gbuild 2011-11-29 17:25:14 +01:00
Stephan Bergmann
9c53350ab8 Demote SAL_WARN that happens regularly during bridge shutdown to SAL_INFO. 2011-11-29 13:12:20 +01:00
Stephan Bergmann
ebdbd2b578 Adapted to new assertion/logging mechanisms. 2011-11-28 22:05:46 +01:00
Bjoern Michaelsen
f2f0dbd273 make gbuild makefiles run independant of pwd again 2011-11-25 12:04:40 +01:00
Norbert Thiebaud
0ea8c014ef tweak gbuild standart Makefile to allow partial build in unsourced env
This allow to run make in a module wihtout the need to source
Env.Host.sh.
2011-11-16 06:18:54 -06:00
Bjoern Michaelsen
e94a19f3e0 simplfy dmake to gbuild bridgefile 2011-10-05 00:31:50 +02:00
Tor Lillqvist
40b0fcec20 WaE: 'static_cast' : truncation of constant value 2011-10-04 11:05:16 +03:00
Matúš Kukan
4768ce0f24 convert binaryurp to gbuild 2011-09-25 23:43:06 +02:00
Caolán McNamara
871426533f just silence the auto_ptr deprecations in isolation 2011-09-22 15:01:05 +01:00
Stephan Bergmann
d996328cd5 sb140: #i113503# mixing system CppUnit and OOo STLport does not work, backed out a6913c9677c2
For LibO, that just means replacing sal/cppunit.h with sal/precppunit.hxx.
2011-09-12 22:47:50 +02:00
Caolán McNamara
d0964b3ea1 callcatcher: unused methods 2011-08-15 09:21:49 +01:00
Tor Lillqvist
f6d8dfb5c4 Nah, we cannot build binaryurp_cppunittester_all (for iOS) here
It depends on CPPUHELPERLIB which for iOS depends on BOOTSTRAPUNOLIB
which hasn't been built yet.
2011-08-09 00:40:46 +03:00
Tor Lillqvist
634824aa76 Build static binaryurp unit tester for iOS 2011-08-01 14:48:08 +03:00
Matúš Kukan
15f10fc946 Remove component_getImplementationEnvironment 2011-07-12 16:30:06 +02:00
Hans-Joachim Lankenau
4313f43185 ause130: #i117218# change .idl handling to gnu make 2011-06-18 11:30:46 +02:00
Tor Lillqvist
d1797e45ae No testing, sorry, when cross-compiling 2011-06-07 00:46:36 +03:00
Tor Lillqvist
7862e397af Drop %_EXT% which was always empty 2011-06-03 13:28:35 +03:00
Caolán McNamara
d3c0f25fa4 round this one up too to get forms to pass 2011-06-02 21:38:33 +01:00
Caolán McNamara
bc09ec8dee add mode lines to new files 2011-06-02 16:49:28 +01:00
Caolán McNamara
ac9fcba54a round allocated struct return space to sizeof(size_t)
this fixes the sfx2 subsequenttest
2011-06-02 16:38:12 +01:00
Francisco Saito
a09675b4c5 drop bogus executable flag from [ch]xx/bas/asm files 2011-03-29 21:39:03 +01:00
sb
f78c98fc9c sb138: #i115619#, #i116038# use osl_setThreadName in binaryurp 2011-01-28 13:41:34 +01:00
sb
138ab06ecc sb138: #i116038# fresh implementation of binary URP bridge 2011-01-26 09:26:59 +01:00