Changeset ab936440 in mainline for uspace/drv/char/ski-con/ski-con.c
- Timestamp:
- 2019-02-12T20:42:42Z (6 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/ski-con/ski-con.c
r7f7817a9 rab936440 55 55 static void ski_con_connection(ipc_call_t *, void *); 56 56 57 static errno_t ski_con_read(chardev_srv_t *, void *, size_t, size_t *); 57 static errno_t ski_con_read(chardev_srv_t *, void *, size_t, size_t *, 58 chardev_flags_t); 58 59 static errno_t ski_con_write(chardev_srv_t *, const void *, size_t, size_t *); 59 60 … … 112 113 } 113 114 114 ddf_fun_add_to_category(fun, "console");115 116 115 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 } 117 123 118 124 fid = fibril_create(ski_con_fibril, con); … … 255 261 /** Read from Ski console device */ 256 262 static 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) 258 264 { 259 265 ski_con_t *con = (ski_con_t *) srv->srvs->sarg; … … 264 270 fibril_mutex_lock(&con->buf_lock); 265 271 266 while (circ_buf_nused(&con->cbuf) == 0) 272 while ((flags & chardev_f_nonblock) == 0 && 273 circ_buf_nused(&con->cbuf) == 0) 267 274 fibril_condvar_wait(&con->buf_cv, &con->buf_lock); 268 275
Note:
See TracChangeset
for help on using the changeset viewer.