summaryrefslogtreecommitdiff
path: root/drivers/staging/csr/csr_sched.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-11 21:59:44 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-11 21:59:44 (GMT)
commit8966961b31c251b854169e9886394c2a20f2cea7 (patch)
tree248a625b23335acbd5ca4b55eb136fe0dc8ba0aa /drivers/staging/csr/csr_sched.h
parent6a5971d8fea1f4a8c33dfe0cec6a1c490f0c9cde (diff)
parent7bcb57cde66c19df378f3468ea342166a8a4504d (diff)
downloadlinux-fsl-qoriq-8966961b31c251b854169e9886394c2a20f2cea7.tar.xz
Merge tag 'staging-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver tree merge from Greg Kroah-Hartman: "Here's the big staging tree merge for 3.8-rc1 There's a lot of patches in here, the majority being the comedi rework/cleanup that has been ongoing and is causing a huge reduction in overall code size, which is amazing to watch. We also removed some older drivers (telephony and rts_pstor), and added a new one (fwserial which also came in through the tty tree due to tty api changes, take that one if you get merge conflicts.) The iio and ipack drivers are moving out of the staging area into their own part of the kernel as they have been cleaned up sufficiently and are working well. Overall, again a reduction of code: 768 files changed, 31887 insertions(+), 82166 deletions(-) All of this has been in the linux-next tree for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'staging-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1298 commits) iio: imu: adis16480: remove duplicated include from adis16480.c iio: gyro: adis16136: remove duplicated include from adis16136.c iio:imu: adis16480: show_firmware() buffer too small iio:gyro: adis16136: divide by zero in write_frequency() iio: adc: Add Texas Instruments ADC081C021/027 support iio:ad7793: Add support for the ad7796 and ad7797 iio:ad7793: Add support for the ad7798 and ad7799 staging:iio: Move ad7793 driver out of staging staging:iio:ad7793: Implement stricter id checking staging:iio:ad7793: Move register definitions from header to source staging:iio:ad7793: Rework regulator handling staging:iio:ad7793: Rework platform data staging:iio:ad7793: Use kstrtol instead of strict_strtol staging:iio:ad7793: Use usleep_range instead of msleep staging:iio:ad7793: Fix temperature scale staging:iio:ad7793: Fix VDD monitor scale staging: gdm72xx: unlock on error in init_usb() staging: panel: pass correct lengths to keypad_send_key() staging: comedi: addi_apci_2032: fix interrupt support staging: comedi: addi_apci_2032: move i_APCI2032_ConfigDigitalOutput() ...
Diffstat (limited to 'drivers/staging/csr/csr_sched.h')
-rw-r--r--drivers/staging/csr/csr_sched.h215
1 files changed, 4 insertions, 211 deletions
diff --git a/drivers/staging/csr/csr_sched.h b/drivers/staging/csr/csr_sched.h
index cc1b8bf..c7d672c 100644
--- a/drivers/staging/csr/csr_sched.h
+++ b/drivers/staging/csr/csr_sched.h
@@ -12,10 +12,6 @@
#include <linux/types.h>
#include "csr_time.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* An identifier issued by the scheduler. */
typedef u32 CsrSchedIdentifier;
@@ -24,7 +20,6 @@ typedef u16 CsrSchedTaskId;
/* A queue identifier */
typedef u16 CsrSchedQid;
-#define CSR_SCHED_QID_INVALID ((CsrSchedQid) 0xFFFF)
/* A message identifier */
typedef CsrSchedIdentifier CsrSchedMsgId;
@@ -33,14 +28,11 @@ typedef CsrSchedIdentifier CsrSchedMsgId;
typedef CsrSchedIdentifier CsrSchedTid;
#define CSR_SCHED_TID_INVALID ((CsrSchedTid) 0)
-/* Scheduler entry functions share this structure */
-typedef void (*schedEntryFunction_t)(void **inst);
-
/* Time constants. */
-#define CSR_SCHED_TIME_MAX ((CsrTime) 0xFFFFFFFF)
-#define CSR_SCHED_MILLISECOND ((CsrTime) (1000))
-#define CSR_SCHED_SECOND ((CsrTime) (1000 * CSR_SCHED_MILLISECOND))
-#define CSR_SCHED_MINUTE ((CsrTime) (60 * CSR_SCHED_SECOND))
+#define CSR_SCHED_TIME_MAX (0xFFFFFFFF)
+#define CSR_SCHED_MILLISECOND (1000)
+#define CSR_SCHED_SECOND (1000 * CSR_SCHED_MILLISECOND)
+#define CSR_SCHED_MINUTE (60 * CSR_SCHED_SECOND)
/* Queue and primitive that identifies the environment */
#define CSR_SCHED_TASK_ID 0xFFFF
@@ -53,60 +45,6 @@ typedef void (*schedEntryFunction_t)(void **inst);
typedef u16 CsrSchedBgint;
#define CSR_SCHED_BGINT_INVALID ((CsrSchedBgint) 0xFFFF)
-typedef void (*CsrSchedBgintHandler)(void *);
-
-/*----------------------------------------------------------------------------*
- * NAME
- * CsrSchedBgintReg
- *
- * DESCRIPTION
- * Register a background interrupt handler function with the scheduler.
- * When CsrSchedBgint() is called from the foreground (e.g. an interrupt
- * routine) the registered function is called.
- *
- * If "cb" is null then the interrupt is effectively disabled. If a
- * no bgints are available, CSR_SCHED_BGINT_INVALID is returned, otherwise
- * a CsrSchedBgint value is returned to be used in subsequent calls to
- * CsrSchedBgint(). id is a possibly NULL identifier used for logging
- * purposes only.
- *
- * RETURNS
- * CsrSchedBgint -- CSR_SCHED_BGINT_INVALID denotes failure to obtain a CsrSchedBgintSet.
- *
- *----------------------------------------------------------------------------*/
-CsrSchedBgint CsrSchedBgintReg(CsrSchedBgintHandler cb,
- void *context,
- const char *id);
-
-/*----------------------------------------------------------------------------*
- * NAME
- * CsrSchedBgintUnreg
- *
- * DESCRIPTION
- * Unregister a background interrupt handler function.
- *
- * ``irq'' is a background interrupt handle previously obtained
- * from a call to CsrSchedBgintReg().
- *
- * RETURNS
- * void.
- *
- *----------------------------------------------------------------------------*/
-void CsrSchedBgintUnreg(CsrSchedBgint bgint);
-
-/*----------------------------------------------------------------------------*
- * NAME
- * CsrSchedBgintSet
- *
- * DESCRIPTION
- * Set background interrupt.
- *
- * RETURNS
- * void.
- *
- *----------------------------------------------------------------------------*/
-void CsrSchedBgintSet(CsrSchedBgint bgint);
-
/*----------------------------------------------------------------------------*
* NAME
* CsrSchedMessagePut
@@ -144,149 +82,4 @@ void CsrSchedMessagePut(CsrSchedQid q,
void *mv);
#endif
-/*----------------------------------------------------------------------------*
- * NAME
- * CsrSchedMessageBroadcast
- *
- * DESCRIPTION
- * Sends a message to all tasks.
- *
- * The user must supply a "factory function" that is called once
- * for every task that exists. The "factory function", msg_build_func,
- * must allocate and initialise the message and set the msg_build_ptr
- * to point to the message when done.
- *
- * NOTE
- * N/A
- *
- * RETURNS
- * void
- *
- *----------------------------------------------------------------------------*/
-#if defined(CSR_LOG_ENABLE) && defined(CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER)
-void CsrSchedMessageBroadcastStringLog(u16 mi,
- void *(*msg_build_func)(void *),
- void *msg_build_ptr,
- u32 line,
- const char *file);
-#define CsrSchedMessageBroadcast(mi, fn, ptr) CsrSchedMessageBroadcastStringLog((mi), (fn), (ptr), __LINE__, __FILE__)
-#else
-void CsrSchedMessageBroadcast(u16 mi,
- void *(*msg_build_func)(void *),
- void *msg_build_ptr);
-#endif
-
-/*----------------------------------------------------------------------------*
- * NAME
- * CsrSchedMessageGet
- *
- * DESCRIPTION
- * Obtains a message from the message queue belonging to the calling task.
- * The message consists of one or both of a u16 and a void *.
- *
- * RETURNS
- * u8 - TRUE if a message has been obtained from the queue, else FALSE.
- * If a message is taken from the queue, then "*pmi" and "*pmv" are set to
- * the "mi" and "mv" passed to CsrSchedMessagePut() respectively.
- *
- * "pmi" and "pmv" can be null, in which case the corresponding value from
- * them message is discarded.
- *
- *----------------------------------------------------------------------------*/
-u8 CsrSchedMessageGet(u16 *pmi, void **pmv);
-
-/*----------------------------------------------------------------------------*
- * NAME
- * CsrSchedTimerSet
- *
- * DESCRIPTION
- * Causes the void function "fn" to be called with the arguments
- * "fniarg" and "fnvarg" after "delay" has elapsed.
- *
- * "delay" must be less than half the range of a CsrTime.
- *
- * CsrSchedTimerSet() does nothing with "fniarg" and "fnvarg" except
- * deliver them via a call to "fn()". (Unless CsrSchedTimerCancel()
- * is used to prevent delivery.)
- *
- * NOTE
- * The function will be called at or after "delay"; the actual delay will
- * depend on the timing behaviour of the scheduler's tasks.
- *
- * RETURNS
- * CsrSchedTid - A timed event identifier, can be used in CsrSchedTimerCancel().
- *
- *----------------------------------------------------------------------------*/
-#if defined(CSR_LOG_ENABLE) && defined(CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER)
-CsrSchedTid CsrSchedTimerSetStringLog(CsrTime delay,
- void (*fn)(u16 mi, void *mv),
- u16 fniarg,
- void *fnvarg,
- u32 line,
- const char *file);
-#define CsrSchedTimerSet(d, fn, fni, fnv) CsrSchedTimerSetStringLog((d), (fn), (fni), (fnv), __LINE__, __FILE__)
-#else
-CsrSchedTid CsrSchedTimerSet(CsrTime delay,
- void (*fn)(u16 mi, void *mv),
- u16 fniarg,
- void *fnvarg);
-#endif
-
-/*----------------------------------------------------------------------------*
- * NAME
- * CsrSchedTimerCancel
- *
- * DESCRIPTION
- * Attempts to prevent the timed event with identifier "eventid" from
- * occurring.
- *
- * RETURNS
- * u8 - TRUE if cancelled, FALSE if the event has already occurred.
- *
- *----------------------------------------------------------------------------*/
-#if defined(CSR_LOG_ENABLE) && defined(CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER)
-u8 CsrSchedTimerCancelStringLog(CsrSchedTid eventid,
- u16 *pmi,
- void **pmv,
- u32 line,
- const char *file);
-#define CsrSchedTimerCancel(e, pmi, pmv) CsrSchedTimerCancelStringLog((e), (pmi), (pmv), __LINE__, __FILE__)
-#else
-u8 CsrSchedTimerCancel(CsrSchedTid eventid,
- u16 *pmi,
- void **pmv);
-#endif
-
-/*----------------------------------------------------------------------------*
- * NAME
- * CsrSchedTaskQueueGet
- *
- * DESCRIPTION
- * Return the queue identifier for the currently running queue
- *
- * RETURNS
- * CsrSchedQid - The current task queue identifier, or 0xFFFF if not available.
- *
- *----------------------------------------------------------------------------*/
-CsrSchedQid CsrSchedTaskQueueGet(void);
-
-
-/*----------------------------------------------------------------------------*
- * NAME
- * CsrSchedTaskQueueGet
- *
- * DESCRIPTION
- * Return the queue identifier for the currently running queue
- *
- * RETURNS
- * char - The current task queue identifier, or 0xFFFF if not available.
- *
- *----------------------------------------------------------------------------*/
-char* CsrSchedTaskNameGet(CsrSchedQid );
-
-
-#ifdef __cplusplus
-}
-#endif
-
#endif