summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/progress.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-07-08 17:12:02 +0000
committerTavian Barnes <tavianator@gmail.com>2009-07-08 17:12:02 +0000
commitbff7f2b3b440c30d0d6eb692576af57ef42edd1b (patch)
tree0ba45051db1ee7b7808339cfb587f8f76d8c7c5c /libdimension/dimension/progress.h
parent14c9cd86e1b7c6ff27c5000d72721c54a718daac (diff)
downloaddimension-bff7f2b3b440c30d0d6eb692576af57ef42edd1b.tar.xz
Comments and style adjustments, and a couple fixes.
Diffstat (limited to 'libdimension/dimension/progress.h')
-rw-r--r--libdimension/dimension/progress.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libdimension/dimension/progress.h b/libdimension/dimension/progress.h
index 57a38b6..0de1f03 100644
--- a/libdimension/dimension/progress.h
+++ b/libdimension/dimension/progress.h
@@ -52,14 +52,16 @@ typedef struct {
pthread_mutex_t *mutex;
} dmnsn_progress;
+/* Allocate a new progress object */
dmnsn_progress *dmnsn_new_progress();
/* For failed returns from *_async() functions */
void dmnsn_delete_progress(dmnsn_progress *progress);
-/* This joins the worker thread and returns it's integer return value in
- addition to deleting `progress' */
+/* Join the worker thread and returns it's integer return value in addition to
+ deleting `progress' */
int dmnsn_finish_progress(dmnsn_progress *progress);
+/* Get the progress of the background task, out of 1.0 */
double dmnsn_get_progress(const dmnsn_progress *progress);
/* Wait for the progress to be >= prog, in a better way than spinlocking */
void dmnsn_wait_progress(const dmnsn_progress *progress, double prog);