• Ken Rockot's avatar
    [mojo] Add IPC support to core shared library · 14c0b604
    Ken Rockot authored
    Updates the mojo_core shared library so that it is actually suitable
    for production IPC use. Namely:
    
    - MojoInitialize now spins up a background thread for I/O and gives
      it to the core impl.
    - A flag is added to Initialize(), allowing shared library consumers
      to initialize themselves as a broker process.
    - The thunks helper correctly loads the mojo_core library with
      RTLD_DEEPBIND set, avoiding heap crossover within the core impl
      due to e.g. malloc and free lazy-binding to different heaps
    - Fixes the thunks header to compile as C once again, as it was
      missing some struct keywords.
    - Adds MojoShutdown to the core ABI as a necessary call for shared
      library consumers who want clean shutdown.
    
    This also adds a new multiprocess test consuming the shared library
    to tie together and validate all of the above changes.
    
    Bug: 809320
    Change-Id: Ic1c56d99c86fd4a2dc7f812ee152994ced35ece6
    Reviewed-on: https://chromium-review.googlesource.com/c/1306347
    Commit-Queue: Ken Rockot <rockot@google.com>
    Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#605109}
    14c0b604
mojo_core.cc 3.55 KB