all repos — mgba @ a6fb91bb7d1544c577724f5e682cf9d4936b538e

mGBA Game Boy Advance Emulator

Do some cleanup of pthread data
Jeffrey Pfau jeffrey@endrift.com
Sun, 21 Apr 2013 14:52:25 -0700
commit

a6fb91bb7d1544c577724f5e682cf9d4936b538e

parent

225729b79c6f6c1529c78e63a2863c2b2e5d0e49

2 files changed, 6 insertions(+), 0 deletions(-)

jump to
M src/gba/gba-thread.csrc/gba/gba-thread.c

@@ -63,4 +63,7 @@ }

void GBAThreadJoin(struct GBAThread* threadContext) { pthread_join(threadContext->thread, 0); + + pthread_mutex_destroy(&threadContext->mutex); + pthread_cond_destroy(&threadContext->cond); }
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -62,6 +62,9 @@ }

static void GBAVideoSoftwareRendererDeinit(struct GBAVideoRenderer* renderer) { struct GBAVideoSoftwareRenderer* softwareRenderer = (struct GBAVideoSoftwareRenderer*) renderer; + + pthread_mutex_destroy(&softwareRenderer->mutex); + pthread_cond_destroy(&softwareRenderer->cond); } static uint16_t GBAVideoSoftwareRendererWriteVideoRegister(struct GBAVideoRenderer* renderer, uint32_t address, uint16_t value) {