Landfall

Annotated pkg/devices/fb/src/server/fb-run.cc

153:929b5f0a63e4
16 months ago Paul Boddie Converted the remaining code to use libipc and generated IPC components. idl4re-libipc-libsystypes
paul@153 1
/*
paul@153 2
 * Export the framebuffer as a data space accessible via the "fb" capability.
paul@153 3
 *
paul@153 4
 * Copyright (C) 2018, 2023 Paul Boddie <paul@boddie.org.uk>
paul@153 5
 *
paul@153 6
 * This program is free software; you can redistribute it and/or
paul@153 7
 * modify it under the terms of the GNU General Public License as
paul@153 8
 * published by the Free Software Foundation; either version 2 of
paul@153 9
 * the License, or (at your option) any later version.
paul@153 10
 *
paul@153 11
 * This program is distributed in the hope that it will be useful,
paul@153 12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
paul@153 13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
paul@153 14
 * GNU General Public License for more details.
paul@153 15
 *
paul@153 16
 * You should have received a copy of the GNU General Public License
paul@153 17
 * along with this program; if not, write to the Free Software
paul@153 18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
paul@153 19
 * Boston, MA  02110-1301, USA
paul@153 20
 */
paul@153 21
paul@153 22
#include "fb-run.h"
paul@153 23
paul@153 24
#include <ipc/server.h>
paul@153 25
paul@153 26
#include "framebuffer_server.h"
paul@153 27
paul@153 28
paul@153 29
paul@153 30
int run(Framebuffer *obj)
paul@153 31
{
paul@153 32
  /* Bind and start the IPC server loop. */
paul@153 33
paul@153 34
  if (ipc_server_loop_for(Framebuffer, obj, "fb"))
paul@153 35
    return 1;
paul@153 36
paul@153 37
  return 0;
paul@153 38
}