2012-06-19 17:15:42 -06:00
|
|
|
/*****************************************************************************
|
|
|
|
|
|
|
|
(c) Cambridge Silicon Radio Limited 2010
|
|
|
|
All rights reserved and confidential information of CSR
|
|
|
|
|
|
|
|
Refer to LICENSE.txt included with this source for details
|
|
|
|
on the license terms.
|
|
|
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/kthread.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/freezer.h>
|
|
|
|
#include <linux/semaphore.h>
|
2012-09-01 03:06:10 -06:00
|
|
|
#include <linux/slab.h>
|
2012-06-19 17:15:42 -06:00
|
|
|
#include <linux/bitops.h>
|
|
|
|
|
|
|
|
#include "csr_framework_ext.h"
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------------*
|
|
|
|
* NAME
|
|
|
|
* CsrThreadSleep
|
|
|
|
*
|
|
|
|
* DESCRIPTION
|
|
|
|
* Sleep for a given period.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* void
|
|
|
|
*
|
|
|
|
*----------------------------------------------------------------------------*/
|
2012-07-20 13:00:10 -06:00
|
|
|
void CsrThreadSleep(u16 sleepTimeInMs)
|
2012-06-19 17:15:42 -06:00
|
|
|
{
|
|
|
|
unsigned long t;
|
|
|
|
|
|
|
|
/* Convert t in ms to jiffies and round up */
|
|
|
|
t = ((sleepTimeInMs * HZ) + 999) / 1000;
|
|
|
|
schedule_timeout_uninterruptible(t);
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL_GPL(CsrThreadSleep);
|