summaryrefslogtreecommitdiffstats
path: root/apps/buffering.h
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-11-02 19:13:03 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-11-02 19:13:03 +0000
commitb838a62adf4a6e05d657bed5867ab9f47ba5ddfe (patch)
treed5198282eba3bc59cb52b92606649e8f26ba924c /apps/buffering.h
parentc70671b6527d8be1905d0d3f5c104c3f1d768ef0 (diff)
downloadrockbox-b838a62adf4a6e05d657bed5867ab9f47ba5ddfe.tar.gz
rockbox-b838a62adf4a6e05d657bed5867ab9f47ba5ddfe.zip
Make bufread and bufgetdata blocking. They now return when enough data is available or when EOF is reached. This improves the API and removes the need for several duplicate waiting loops.
Also fix a few logfqueue messages. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15412 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/buffering.h')
-rw-r--r--apps/buffering.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/buffering.h b/apps/buffering.h
index 46f2fadf47..799c18aa93 100644
--- a/apps/buffering.h
+++ b/apps/buffering.h
@@ -40,7 +40,6 @@ enum data_type {
#define ERR_BUFFER_FULL -2
#define ERR_INVALID_VALUE -3
#define ERR_FILE_ERROR -4
-#define ERR_DATA_NOT_READY -5
/* Initialise the buffering subsystem */
@@ -61,6 +60,9 @@ bool buffering_reset(char *buf, size_t buflen);
* bufadvance: Move handle reading index, relatively to current position
* bufread : Copy data from a handle to a buffer
* bufgetdata: Obtain a pointer for linear access to a "size" amount of data
+ *
+ * NOTE: bufread and bufgetdata will block the caller until the requested
+ * amount of data is ready (unless EOF is reached).
****************************************************************************/
int bufopen(const char *file, size_t offset, enum data_type type);