Changeset 7bf29e5 in mainline for uspace/lib/display/src/display.c


Ignore:
Timestamp:
2025-01-09T11:29:38Z (7 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
a5c2960e
Parents:
bc3d695 (diff), 4e1221c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge 'upstream/master' into helenraid-para

File:
1 edited

Legend:

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

    rbc3d695 r7bf29e5  
    11/*
    2  * Copyright (c) 2023 Jiri Svoboda
     2 * Copyright (c) 2025 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    138138}
    139139
     140/*
     141 * Lock display.
     142 *
     143 * While display is locked, display event handlers will not be called.
     144 *
     145 * @param display Display
     146 */
     147void display_lock(display_t *display)
     148{
     149        fibril_mutex_lock(&display->lock);
     150}
     151
     152/*
     153 * Unlock display.
     154 *
     155 * @param display Display
     156 */
     157void display_unlock(display_t *display)
     158{
     159        fibril_mutex_unlock(&display->lock);
     160}
     161
    140162/** Initialize window parameters structure.
    141163 *
     
    700722        display_wnd_ev_t event;
    701723
     724        display_lock(display);
     725
    702726        while (true) {
    703                 fibril_mutex_lock(&display->lock);
    704 
    705727                if (display->sess != NULL)
    706728                        rc = display_get_event(display, &window, &event);
    707729                else
    708730                        rc = ENOENT;
    709 
    710                 fibril_mutex_unlock(&display->lock);
    711731
    712732                if (rc != EOK)
     
    752772        }
    753773
     774        display_unlock(display);
    754775        async_answer_0(icall, EOK);
    755776}
Note: See TracChangeset for help on using the changeset viewer.