diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-06-22 21:56:19 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-06-22 21:56:19 +0000 |
commit | efe600537740bb572f4a062ab6b9df12623e0c24 (patch) | |
tree | 0f7903c7a53fb068f87dc1a62d676ba00eb7f65e /libdimension/dimension | |
parent | 9a72562eca9eb76e11439fb892a7b41bfc2c0a3e (diff) | |
download | dimension-efe600537740bb572f4a062ab6b9df12623e0c24.tar.xz |
Finish asynchronous PNG interface, and test it in png test.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r-- | libdimension/dimension/progress.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libdimension/dimension/progress.h b/libdimension/dimension/progress.h index d436b5d..194ae83 100644 --- a/libdimension/dimension/progress.h +++ b/libdimension/dimension/progress.h @@ -36,6 +36,10 @@ typedef struct { /* The worker thread */ pthread_t thread; + + /* Condition variable for waiting for a particular amount of progress */ + pthread_cond_t cond; + pthread_mutex_t mutex; } dmnsn_progress; dmnsn_progress *dmnsn_new_progress(); @@ -47,7 +51,10 @@ int dmnsn_finish_progress(dmnsn_progress *progress); double dmnsn_get_progress(const dmnsn_progress* progress); -void dmnsn_new_progress_element(dmnsn_progress* progress, unsigned int total); -void dmnsn_increment_progress(dmnsn_progress* progress); +void dmnsn_new_progress_element(dmnsn_progress *progress, unsigned int total); +void dmnsn_increment_progress(dmnsn_progress *progress); +void dmnsn_progress_done(dmnsn_progress *progress); + +void dmnsn_wait_progress(dmnsn_progress *progress, double prog); #endif /* DIMENSION_PROGRESS_H */ |