Changeset 0b63dc2 in mainline for uspace/lib/ddev/src/ddev_srv.c


Ignore:
Timestamp:
2019-12-07T20:26:28Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
df1a019
Parents:
71cbe5c
Message:

Switch compositor → display server

Convert KFB from visualizer to display device interface. Add ability
of display device implementor to provide client with arg2, arg3 needed
to connect to GC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ddev/src/ddev_srv.c

    r71cbe5c r0b63dc2  
    4545#include <stdio.h>
    4646
     47/** Connect to a GC.
     48 *
     49 * XXX As a workaround here we tell the client the values of arg2 and arg3
     50 * needed to connect to the GC using async_connect_me_to(), these need
     51 * to be provided by the ddev_ops_t.get_gc. Different values are needed
     52 * for a DDF driver or a regular server. This would not be needed if we
     53 * had a proper way of creating an endpoint and passing it to our client.
     54 */
     55static void ddev_get_gc_srv(ddev_srv_t *srv, ipc_call_t *icall)
     56{
     57        sysarg_t arg2;
     58        sysarg_t arg3;
     59        errno_t rc;
     60
     61        printf("ddev_get_gc_srv\n");
     62
     63        if (srv->ops->get_gc == NULL) {
     64                async_answer_0(icall, ENOTSUP);
     65                return;
     66        }
     67
     68        rc = srv->ops->get_gc(srv->arg, &arg2, &arg3);
     69        async_answer_2(icall, rc, arg2, arg3);
     70}
     71
    4772void ddev_conn(ipc_call_t *icall, ddev_srv_t *srv)
    4873{
    4974        /* Accept the connection */
    5075        async_accept_0(icall);
    51         printf("display_conn\n");
     76        printf("ddev_conn\n");
    5277
    5378        while (true) {
     
    6691                switch (method) {
    6792                case DDEV_GET_GC:
     93                        ddev_get_gc_srv(srv, &call);
     94                        break;
    6895                default:
    6996                        async_answer_0(&call, ENOTSUP);
Note: See TracChangeset for help on using the changeset viewer.