diff options
author | waker <wakeroid@gmail.com> | 2009-07-06 03:01:41 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2009-07-06 03:01:41 +0200 |
commit | d05d431ebad5767f3afa9b6c76639e83233e2d9c (patch) | |
tree | 0ab32f81a39f5ce3fab292892aee97ee1f85e6c5 /codec.c | |
parent | b7a872069ad3990b65d8ebe6d53de8768841980f (diff) |
fixed inter-thread conflict for codec access
Diffstat (limited to 'codec.c')
-rw-r--r-- | codec.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -0,0 +1,25 @@ +#include "codec.h" +#include "threading.h" + +static uintptr_t mutex; + +void +codec_init_locking (void) { + mutex = mutex_create (); +} + +void +codec_free_locking (void) { + mutex_free (mutex); +} + +void +codec_lock (void) { + mutex_lock (mutex); +} + +void +codec_unlock (void) { + mutex_unlock (mutex); +} + |