Граф коммитов

42 Коммитов

Автор SHA1 Сообщение Дата
Thomas Zimmermann d50447986e Bug 830290: Don't block DBus while waiting for replies r=bent,qdot 2013-03-11 15:22:56 +01:00
Thomas Zimmermann e747be0ff7 Bug 830290: Send blocking DBus messages from within DBus thread r=bent,qdot
The this commit moves the sending of blocking DBus messages to the
DBus thread. This allows us to avoid concurrency problems within the
DBus library, which is not explicitly thread-safe.

As a side note, I'd like to mention that blocking in distributed
systems simply doesn't work. The dbus library is especially broken
in this regard as it delays all unrelated messages until the reply
for the blocking request has been received. A future commit should
implement this functionality with an asyncronous call and make the
related thread wait for the reply.
2013-03-01 15:05:50 +01:00
Thomas Zimmermann 49b1e5406b Bug 830290: Execute DBus send operation in DBus thread r=bent,qdot
The DBus send operation simply sends a DBus message without further
processing of replies. If the sender is interested in a reply, the
respective serial number can be returned. In this case, the sending
operation (and only the sending) is serialized with the calling
thread.
2013-03-01 13:43:45 +01:00
Thomas Zimmermann 5c1a06a7d3 Bug 830290: Cleanup DBusConnectionSendWithReplyTask r=bent,qdot
The class DBusConnectionSendWithReplyTask has been renamed to
DBusConnectionSendWithReplyRunnable, which better fits its purpose. The
internal callback function and data has been move into the implementation
of DBusConnectionSendWithReplyRunnable. Additionally, there is now an
abstract base class for DBus send runnables. This class will become useful
for implementing send classes with different policies.
2013-03-01 12:49:57 +01:00
Thomas Zimmermann 04dc7482ea Bug 830290: Setup asyncronous DBus messages in DBus thread r=bent,qdot
This patch finally fixes bug 827888 were a message's reply was
received before the respective handler function could be installed.

The patch adds the class DBusConnectionSendWithReplyTask, which
asyncronously sends a DBus message and installs the reply's handler
function. The DBus utility functions for asyncronous messages create
an instance of this class and dispatch it to the DBus thread. This
intercepts the DBusPollTask, so no DBus replies can be received until
the dispatched DBusConnectionSendWithReplyTask has finished.
2013-01-28 10:15:31 +01:00
Thomas Zimmermann 09ba3f9b43 Bug 830290: Added dispatch function for DBus thread r=bent,qdot
The new function allows to schedule nsRunnables to an existing DBus
thread. This intercepts the running instance of DBusPollTask and
makes the DBus thread process the dispatched runnable. The intercepted
poll task automatically continues polling once all pending runnables
have been processed.
2013-01-14 11:50:27 +01:00
Thomas Zimmermann 6cb8692c1d Bug 830290: Use DBusPollTask r=bent,qdot
This patch replaces the DBus EventLoop function by an instance
of DBusPollTask. It also cleans up the initialization and shutdown
code of the DBusThread.
2013-01-14 11:50:25 +01:00
Thomas Zimmermann da7a4cb48a Bug 830290: Added DBusPollTask r=bent,qdot
This patch adds class DBusPollTask. The DBusPollTask class is an
nsRunnable for receiving DBus messages. It is intended to run in
a separate thread that is dedicated to DBus only.

The Run function of the poll task resembles the DBus EventLoop
function, but allows to intercept execution in favor of other
nsRunnables. Afterwards the DBusPollTask continues.
2013-01-14 11:50:21 +01:00
Thomas Zimmermann f3ddbbf1a5 Bug 830290: Cleanup DBus EventLoop function r=bent,qdot
We intent to run the DBus thread's EventLoop function as separate
nsRunnable, but the function also contains code for initializing
sockets that are used for internal communication.

With this patch the socket initialization has been moved to the
setup function. This reduces the EventLoop function to plain event
handling.
2013-01-14 11:50:18 +01:00
Mike Shal 5169c0a913 Bug 864774 - Part 2: Move CPPSRCS to moz.build as CPP_SOURCES; r=joey CLOSED TREE
From 9e0ba7f425143f545eb6c4b26a9a96b5ade4d8e9 Mon Sep 17 00:00:00 2001
2013-04-23 17:54:15 -04:00
Mike Shal df7deac25b Bug 846634 - Part 2: Move EXPORTS to moz.build; r=joey 2013-04-16 15:24:43 -04:00
Kyle Machulis 72a717a860 Bug 855465 - Add emacs python mode comments to moz.build files; r=gps 2013-04-01 11:36:59 -07:00
Kyle Machulis 43628a7867 Backout for changeset 03452b187c14 (Bug 855465) due to bustage on a CLOSED TREE; r=qdot 2013-03-29 15:12:58 -07:00
Kyle Machulis 334c0800cf Bug 855465 - Add emacs python mode comments to moz.build files; r=gps
--HG--
extra : rebase_source : 004a756492323e1a049586e85b3be5037159df20
2013-03-29 13:56:18 -07:00
Mike Shal 7ecea60097 Bug 844654 - Part 2: Move MODULE to moz.build; rs=gps 2013-03-19 11:47:00 -07:00
Gina Yeh 7e8f0d60ac Bug 841984 - Check both return value and pending_call, r=qdot 2013-03-08 12:10:09 +08:00
Gregory Szorc 0c8ee65118 Merge mozilla-central into build-system
There were merges in configure.in and some Makefile.in. None had any
conflicts. I spot verified the Makefile.in changes and confirmed that
the changes did not touch any DIRS* variables.
2013-02-27 10:03:52 -08:00
Gregory Szorc c7bf7887f9 Bug 784841 - Part 18r: Convert /ipc; r=ted f=Ms2ger 2013-02-25 12:47:22 -08:00
Kyle Machulis 5deaef7d15 Bug 843913: Set DBus watch function to null on event loop exit; r=tzimmermann 2013-02-26 10:01:48 -08:00
Thomas Zimmermann c5373c0597 Bug 827888: Explicitly call notifier if DBUS call completes early [r=echou,qdot]
If a DBUS call completes before we can set the notifier function, the
call's response never gets handled. To workaround this problem, we now
call the notifier explicitly if the call completes this early.

It can still happen that the call's response gets lost, but this
workaround greatly improves the success rate for our problem of handling
errors during Bluetooth device pairing; from maybe 10% to 75%.
2013-01-10 07:55:43 -08:00
Kyle Machulis 156f92210d Bug 790739: Patch 3 - Service and Manager changes for Bluetooth server sockets; r=cjones 2012-10-01 00:04:01 -07:00
Kyle Machulis 3825fda6ae Backing out 9a88f0d57e7d (Bug 790739) due to bustage
--HG--
extra : rebase_source : 1f6e7eda80f1b66b854c5c112f1b0816381f27e2
2012-09-30 23:16:26 -07:00
Kyle Machulis 2a50397f57 Bug 790739: Patch 3 - Service and Manager changes for Bluetooth server sockets; r=cjones 2012-09-30 22:55:27 -07:00
Kyle Machulis d2fe699a15 Bug 743933: Update B2G Bluetooth to ICS API; r=echou 2012-09-17 23:11:00 -07:00
Eric Chou 77828a8e5e Bug 783932 - [b2g-bluetooth] Fix wrong textwidth(tw=) value in Mode line, r=qdot 2012-08-21 11:21:24 +08:00
Kyle Machulis 11d7f94bbe Bug 768306 - Patch 1: Fix error handling in unpacking DBus replies, set up DBus blocking call handling thread; r=mrbkap 2012-08-08 10:46:39 -07:00
Eric Chou de6f5f272e Bug 780812 - [b2g-bluetooth] Implement function to get RFCOMM channel of specific Bluetooth service; r=qdot 2012-08-07 21:19:07 -07:00
Kyle Machulis 14894fb5f2 Bug 759883 - [b2g-bluetooth] Divide out bluetooth specifics from DBusThread object; r=echou 2012-08-07 21:16:03 -07:00
Mike Hommey 70d7c821af Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted 2012-08-04 20:26:44 +02:00
Kyle Machulis cdf8a37fda Bug 761511: Patch 2 - Added BluetoothPropertyContainer base class and utility functions; r=mrbkap 2012-07-31 21:49:59 -07:00
Aryeh Gregor d0ad5a7d0c Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Kyle Machulis f8c0d08e82 Bug 740744: Asynchronous dbus events for bluetooth, Start/StopDiscovery and device event firing; r=bent sr=mrbkap 2012-07-17 20:41:54 -07:00
Kyle Machulis 9df5dec558 Bug 744349 - Create message distribution mechanism for DBus Bluetooth Signals; r=cjones 2012-06-02 11:23:16 -07:00
Kyle Machulis 6f1c8ccf33 Bug 756389 - B2G Bluetooth: unexpected crash in DBusThread::StopEventLoop; r=cjones 2012-05-23 18:21:42 -07:00
Kyle Machulis c360d390b8 Backing out Bug 742044 - contained extra patches for another bug 2012-05-23 18:18:24 -07:00
Kyle Machulis 435352baa4 Bug 742044 - Create BluetoothManager object for managing multiple adapters and firmware loading; r=bent 2012-05-23 18:06:36 -07:00
Kyle Machulis 9e3cce85b5 Bug 753134 - B2G bluetooth interface crashes when trying to remove non-existent dbus watch sockets; r=mwu 2012-05-09 16:33:56 -07:00
Ryan VanderMeulen 9a0075da5b Re-land the patch for bug 732639 after a b2g clobber. 2012-05-07 17:50:25 -04:00
Ryan VanderMeulen 835d66af27 Backout 7a8607523522 (bug 732639) due to bustage. r=Boot2Fail 2012-05-07 17:21:01 -04:00
Kyle Machulis eda1d7b45b Bug 732639: Create event loop thread for bluetooth dbus on gonk/linux; r=cjones 2012-05-07 14:04:59 -07:00
Ms2ger 673d991d89 Backed out changeset db5d4c1aece7 for B2g bustage. 2012-04-14 09:29:41 +02:00
Kyle Machulis ca94ac726c Bug 732639: DBus Thread Implementation for B2G Bluetooth r=cjones
--HG--
extra : rebase_source : 564ff82ed63cb02ab99204c572baad6a5e761376
2012-04-13 22:40:09 -07:00