Mir

lp:~raof/mir/no-ipc-on-compositor-threads

Created by Chris Halse Rogers on 2017-07-05 and last modified on 2017-08-16
Get this branch:
bzr branch lp:~raof/mir/no-ipc-on-compositor-threads
Only Chris Halse Rogers can upload to this branch. If you are Chris Halse Rogers please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Chris Halse Rogers
Project:
Mir
Status:
Merged

Recent revisions

4236. By Chris Halse Rogers on 2017-08-16

mf::SessionMediator: Free buffers associated with a BufferStream on release

4235. By Chris Halse Rogers on 2017-08-16

frontend::BufferStream: Remove {associate,dissociate}_buffer.

This was only used for mc::Stream::client_owned_buffer_count, but as nothing calls
that anymore it's entirely superfluous.

4234. By Chris Halse Rogers on 2017-08-16

mc::Stream: Remove vestigial client_owned_buffer_count().

Nothing uses this private method!

4233. By Chris Halse Rogers on 2017-08-11

Fix typo in make_socket_self_contained()

4232. By Chris Halse Rogers on 2017-08-11

Give buffer_return_ipc_executor() a more descriptive name

4231. By Chris Halse Rogers on 2017-08-08

Merge trunk to fix CI build

4230. By Chris Halse Rogers on 2017-08-03

ThreadExecutor: Set state to Running before releasing the lock when spawning the thread.

Otherwise we *could* race and try to create the thread twice.

4229. By Chris Halse Rogers on 2017-08-03

ThreadExectuor: Oh my god, the bees!

Static storage duration of something containing std::mutex and std::condition_variable plays badly
with fork(), such as our esteemed testsuite uses.

It's also possible that Mir shells would fork() under certain circumstances, and it'd be nice if
we didn't make that break horribly.

So: register a pthread_atfork handler to quiesce the ThreadExecutor into a known-safe idle state,
and then restart it on the other side of the fork.

4228. By Chris Halse Rogers on 2017-08-01

*Another* stab at executor shutdown without deadlocks.

The C++ Executor proposal pervasively uses references to Executors rather than
owned executors, and provides the system_executor which has a lifetime that just
exceeds main().

This nicely resolves the deadlock involved with the Executor being destroyed while
a lock is held, due to shared_ptr<> destruction at an unexpected point, while still
ensuring that the Executor thread is destroyed before program exit, thus appeasing
Valgrind (and also anyone dlopen()ing Mir).

4227. By Chris Halse Rogers on 2017-07-31

mf::BasicConnector: Don't hold naked boost::asio::io_service& in objects in std::shared_ptr<>.

The boost::asio::local::stream_protocol::socket keeps a hold of the io_service reference passed into its constructor;
it's thus incorrect for the boost::…::socket to outlive the io_service it's constructed with.

We weren't doing anything special to extend the lifetime of the io_service. It just so happened that all of the
components with shared ownership of the ::socket would be destroyed before BasicConnector, but there was no
mechanism that enforced that ordering.

So, once again, embrace the GC!

Use the aliasing shared_ptr contructor to take our socket and io_service and create a shared_ptr that owns
both the io_service and the socket.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:mir
This branch contains Public information 
Everyone can see this information.