/*
 * Project Name JPEG DRIVER IN WINCE
 * Copyright  2007 Samsung Electronics Co, Ltd. All Rights Reserved. 
 *
 * This software is the confidential and proprietary information
 * of Samsung Electronics  ("Confidential Information").   
 * you shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with Samsung Electronics 
 *
 * This file implements JPEG driver.
 *
 * @name JPEG DRIVER MODULE Module (JPGMisc.c)
 * @author Jiyoung Shin (idon.shin@samsung.com)
 * @date 28-03-07
 */

#include <windows.h>
#include <pmplatform.h>
#include "bsp_args.h"
#include "JPGMisc.h"

static CRITICAL_SECTION cs;


void JPGMutexCreate(void)
{
    InitializeCriticalSection(&cs);
}

void JPGMutexDelete(void)
{
    DeleteCriticalSection(&cs);
}

BOOL JPGMutexLock(void)
{
    EnterCriticalSection(&cs);

    return TRUE;
}

BOOL JPGMutexRelease(void)
{
    LeaveCriticalSection(&cs);

    return TRUE;
}


/*----------------------------------------------------------------------------
*Function: JPGDelay

*Parameters:         fmt        :
*Implementation Notes: delay function
-----------------------------------------------------------------------------*/
void JPGDelay(unsigned int msec) 
{
#if 1
    Sleep(msec);
#endif
}
 