summaryrefslogtreecommitdiffstats
path: root/libdimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-07-26 09:38:41 -0600
committerTavian Barnes <tavianator@gmail.com>2011-07-26 09:38:41 -0600
commit6940ad0441911964573b8c39e816eea6daac897e (patch)
tree3b63da812b92d69afe1eaac31581071efa33f975 /libdimension
parent5f8ce1e256462a9addbe318966a70a4bc6399bad (diff)
downloaddimension-6940ad0441911964573b8c39e816eea6daac897e.tar.xz
Add some sanity checking.
Diffstat (limited to 'libdimension')
-rw-r--r--libdimension/threads.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdimension/threads.c b/libdimension/threads.c
index 54939e6..04874de 100644
--- a/libdimension/threads.c
+++ b/libdimension/threads.c
@@ -93,6 +93,8 @@ int
dmnsn_execute_concurrently(dmnsn_ccthread_fn *ccthread_fn,
void *arg, unsigned int nthreads)
{
+ dmnsn_assert(nthreads > 0, "Attempt to execute using 0 concurrent threads.");
+
pthread_t threads[nthreads];
dmnsn_ccthread_payload payloads[nthreads];