misc
authorTero Marttila <terom@fixme.fi>
Thu, 31 Dec 2009 17:01:22 +0200
changeset 21 47f15166e25a
parent 20 f0d1011e8874
child 22 811c88041c06
misc
src/lib/ctx.c
src/lib/tile.c
--- a/src/lib/ctx.c	Thu Dec 31 16:53:07 2009 +0200
+++ b/src/lib/ctx.c	Thu Dec 31 17:01:22 2009 +0200
@@ -6,6 +6,9 @@
 #include <assert.h>
 #include <stdio.h> // for perror
 
+/**
+ * Wrapper around pthread_mutex_unlock for use with pthread_cleanup_push
+ */
 static void pt_mutex_unlock (void *arg)
 {
     pthread_mutex_t *mutex = arg;
@@ -226,10 +229,11 @@
     struct pt_work *work;
 
     // check state
+    // XXX: this is kind of retarded, because pt_ctx_shutdown/work should only be called from the same thread...
     if (!ctx->running)
         RETURN_ERROR(PT_ERR_CTX_SHUTDOWN);
 
-    // construct
+    // alloc
     if ((work = calloc(1, sizeof(*work))) == NULL)
         RETURN_ERROR(PT_ERR_MEM);
 
--- a/src/lib/tile.c	Thu Dec 31 16:53:07 2009 +0200
+++ b/src/lib/tile.c	Thu Dec 31 17:01:22 2009 +0200
@@ -149,3 +149,4 @@
 
     free(tile);
 }
+