]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - include/os.h
sandbox: Improve sandbox serial port keyboard interface
[karo-tx-uboot.git] / include / os.h
index 699682a4089beed0869c88fbf5974243aa647221..c452d1b56ef8a87cc3d73e966be86f64dc76f083 100644 (file)
@@ -39,6 +39,16 @@ struct sandbox_state;
  */
 ssize_t os_read(int fd, void *buf, size_t count);
 
+/**
+ * Access to the OS read() system call with non-blocking access
+ *
+ * \param fd   File descriptor as returned by os_open()
+ * \param buf  Buffer to place data
+ * \param count        Number of bytes to read
+ * \return number of bytes read, or -1 on error
+ */
+ssize_t os_read_no_block(int fd, void *buf, size_t count);
+
 /**
  * Access to the OS write() system call
  *