summaryrefslogtreecommitdiffstats
path: root/libdimension/threads.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-11-14 21:20:43 -0500
committerTavian Barnes <tavianator@gmail.com>2010-11-14 21:20:43 -0500
commit8fe33a340b8979a73fa84f201c15519a9b5d0266 (patch)
tree12cdbb1c1b9a48f533ab36980602785be1e1deeb /libdimension/threads.h
parent20a55aa78050d94b187d4edfaac91ea00efea505 (diff)
downloaddimension-8fe33a340b8979a73fa84f201c15519a9b5d0266.tar.xz
Document libdimension with Doxygen.
Diffstat (limited to 'libdimension/threads.h')
-rw-r--r--libdimension/threads.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/libdimension/threads.h b/libdimension/threads.h
index 00be0a9..7ae6288 100644
--- a/libdimension/threads.h
+++ b/libdimension/threads.h
@@ -18,15 +18,28 @@
* <http://www.gnu.org/licenses/>. *
*************************************************************************/
+/**
+ * @file
+ * Background threading interface.
+ */
+
#ifndef DIMENSION_IMPL_THREADS_H
#define DIMENSION_IMPL_THREADS_H
-#include <pthread.h>
-
+/**
+ * Thread callback type.
+ * @param[in,out] ptr An arbitrary pointer.
+ * @return 0 on success, non-zero on failure.
+ */
typedef int dmnsn_thread_fn(void *ptr);
-/* Creates a thread that cleans up after itself on errors */
-void dmnsn_new_thread(dmnsn_progress *progress, const pthread_attr_t *attr,
- dmnsn_thread_fn *thread_fn, void *arg);
+/**
+ * Create a thread that cleans up after itself on errors.
+ * @param[in,out] progress The progress object to associate with the thread.
+ * @param[in] thread_fn The thread callback.
+ * @param[in,out] arg The pointer to pass to the thread callback.
+ */
+void dmnsn_new_thread(dmnsn_progress *progress, dmnsn_thread_fn *thread_fn,
+ void *arg);
#endif /* DIMENSION_IMPL_THREADS_H */