This commit is contained in:
Behdad Esfahbod 2009-11-05 20:08:17 -05:00
parent 44533e773f
commit 5a11c875d8
1 changed files with 6 additions and 4 deletions

View File

@ -197,12 +197,13 @@ hb_blob_lock (hb_blob_t *blob)
hb_mutex_lock (blob->lock);
blob->lock_count++;
#if HB_DEBUG_BLOB
fprintf (stderr, "%p %s (%d) -> %p\n", blob, __FUNCTION__,
blob->lock_count, blob->data);
#endif
blob->lock_count++;
hb_mutex_unlock (blob->lock);
return blob->data;
@ -216,13 +217,14 @@ hb_blob_unlock (hb_blob_t *blob)
hb_mutex_lock (blob->lock);
assert (blob->lock_count > 0);
blob->lock_count--;
#if HB_DEBUG_BLOB
fprintf (stderr, "%p %s (%d) -> %p\n", blob, __FUNCTION__,
hb_atomic_int_get (blob->lock_count), blob->data);
blob->lock_count, blob->data);
#endif
assert (blob->lock_count > 0);
blob->lock_count--;
hb_mutex_unlock (blob->lock);
}