Changeset ab936440 in mainline for uspace/drv/char/ski-con/ski-con.c


Ignore:
Timestamp:
2019-02-12T20:42:42Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f31ca47
Parents:
7f7817a9 (diff), 4805495 (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.
git-author:
Matthieu Riolo <matthieu.riolo@…> (2019-02-12 20:26:18)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-02-12 20:42:42)
Message:

Merge branch 'master' into bdsh_alias

Conflicts:

uspace/app/bdsh/Makefile
uspace/app/bdsh/cmds/modules/modules.h

Ccheck correction and removing header which includes itself

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/char/ski-con/ski-con.c

    r7f7817a9 rab936440  
    5555static void ski_con_connection(ipc_call_t *, void *);
    5656
    57 static errno_t ski_con_read(chardev_srv_t *, void *, size_t, size_t *);
     57static errno_t ski_con_read(chardev_srv_t *, void *, size_t, size_t *,
     58    chardev_flags_t);
    5859static errno_t ski_con_write(chardev_srv_t *, const void *, size_t, size_t *);
    5960
     
    112113        }
    113114
    114         ddf_fun_add_to_category(fun, "console");
    115 
    116115        bound = true;
     116
     117        rc = ddf_fun_add_to_category(fun, "console");
     118        if (rc != EOK) {
     119                ddf_msg(LVL_ERROR, "Error adding function 'a' to category "
     120                    "'console'.");
     121                goto error;
     122        }
    117123
    118124        fid = fibril_create(ski_con_fibril, con);
     
    255261/** Read from Ski console device */
    256262static errno_t ski_con_read(chardev_srv_t *srv, void *buf, size_t size,
    257     size_t *nread)
     263    size_t *nread, chardev_flags_t flags)
    258264{
    259265        ski_con_t *con = (ski_con_t *) srv->srvs->sarg;
     
    264270        fibril_mutex_lock(&con->buf_lock);
    265271
    266         while (circ_buf_nused(&con->cbuf) == 0)
     272        while ((flags & chardev_f_nonblock) == 0 &&
     273            circ_buf_nused(&con->cbuf) == 0)
    267274                fibril_condvar_wait(&con->buf_cv, &con->buf_lock);
    268275
Note: See TracChangeset for help on using the changeset viewer.