1 /*****************************************************************************
3 (c) Cambridge Silicon Radio Limited 2010
4 All rights reserved and confidential information of CSR
6 Refer to LICENSE.txt included with this source for details
9 *****************************************************************************/
11 #include <linux/kernel.h>
12 #include <linux/kthread.h>
13 #include <linux/module.h>
14 #include <linux/freezer.h>
15 #include <linux/semaphore.h>
16 #include <linux/slab.h>
17 #include <linux/bitops.h>
19 #include "csr_framework_ext.h"
21 /*----------------------------------------------------------------------------*
26 * Sleep for a given period.
31 *----------------------------------------------------------------------------*/
32 void CsrThreadSleep(u16 sleepTimeInMs)
36 /* Convert t in ms to jiffies and round up */
37 t = ((sleepTimeInMs * HZ) + 999) / 1000;
38 schedule_timeout_uninterruptible(t);
40 EXPORT_SYMBOL_GPL(CsrThreadSleep);