Changeset 959b7ec in mainline for uspace/lib/display/src


Ignore:
Timestamp:
2019-11-06T18:10:54Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e422ff6
Parents:
648e2ac
Message:

Start adding tests for libdisplay and fix display_close

So far we test display_open() and display_close().
display_conn was not closing the callback session, which led
to display_close waiting indefinitely.

Location:
uspace/lib/display/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/display/src/disp_srv.c

    r648e2ac r959b7ec  
    4040#include <io/log.h>
    4141#include <ipc/display.h>
     42#include <mem.h>
    4243#include <stdlib.h>
    4344#include <stddef.h>
     
    169170                }
    170171        }
     172
     173        /* Hang up callback session */
     174        if (srv->client_sess != NULL) {
     175                async_hangup(srv->client_sess);
     176                srv->client_sess = NULL;
     177        }
     178}
     179
     180/** Initialize display server structure
     181 *
     182 * @param srv Display server structure to initialize
     183 */
     184void display_srv_initialize(display_srv_t *srv)
     185{
     186        memset(srv, 0, sizeof(*srv));
    171187}
    172188
  • uspace/lib/display/src/display.c

    r648e2ac r959b7ec  
    2929#include <async.h>
    3030#include <display.h>
     31#include <display/event.h>
    3132#include <errno.h>
    3233#include <fibril_synch.h>
     
    5758                return ENOMEM;
    5859
     60        fibril_mutex_initialize(&display->lock);
     61        fibril_condvar_initialize(&display->cv);
    5962        list_initialize(&display->windows);
    6063
Note: See TracChangeset for help on using the changeset viewer.