zephyr/include/microkernel/task_irq.h
Andrew Boie a83f895dd5 microkernel: deprecate task IRQs
This mechanism does not add enough value to the kernel to be worth
maintaining it. Drivers that need deferred processing of interrupts
can simply define their own task and have the interrupt handler
release an event that the task waits on.

The API is marked as deprecated and it is removed from unit test
coverage as well as the documentation.

Change-Id: Ib87b91cb41e9b6d7fdf0dc62b240a531b6a8889f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-15 16:02:12 +00:00

99 lines
2.7 KiB
C

/* taskDevInt.h - APIs for managing task IRQ objects */
/*
* Copyright (c) 2013-2014 Wind River Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef TASK_IRQ_H
#define TASK_IRQ_H
/**
* @brief Microkernel Interrupt Services
* @defgroup microkernel_irq Microkernel Interrupt Services
* @ingroup microkernel_services
* @{
*/
#include <microkernel/base_api.h>
#ifdef __cplusplus
extern "C" {
#endif
#define INVALID_VECTOR 0xFFFFFFFF
/**
*
* @brief Register a task IRQ object.
*
* This routine connects a task IRQ object to a system interrupt based
* upon the specified IRQ and priority values.
*
* IRQ allocation is done via the microkernel server fiber, making simultaneous
* allocation requests single-threaded.
*
* @param irq_obj IRQ object identifier.
* @param irq Request IRQ.
* @param priority Requested interrupt priority.
* @param flags IRQ flags.
*
* @return assigned interrupt vector if successful, INVALID_VECTOR if not
*/
extern uint32_t task_irq_alloc(kirq_t irq_obj, uint32_t irq, uint32_t priority,
uint32_t flags) __attribute__((deprecated));
/**
*
* @brief Re-enable a task IRQ object's interrupt.
*
* This re-enables the interrupt for a task IRQ object.
*
* @param irq_obj IRQ object identifier.
*
* @return N/A
*/
extern void task_irq_ack(kirq_t irq_obj) __attribute__((deprecated));
/**
* @brief Wait for task IRQ to signal an interrupt.
*
* This routine waits up to @a timeout ticks for the IRQ object @a irq_obj
* to signal an interrupt.
*
* @param irq_obj IRQ object identifier.
* @param timeout Determines the action when task IRQ is not yet signaled.
* For TICKS_NONE, return immediately.
* For TICKS_UNLIMITED, wait as long as necessary.
* Otherwise, wait up to the specified number of ticks before timing out.
*
* @retval RC_OK Successfully detected signaled interrupt.
* @retval RC_TIME Timed out while waiting for interrupt.
* @retval RC_FAIL Failed to immediately detect signaled interrupt when
* @a timeout = TICKS_NONE.
* @sa TICKS_NONE, TICKS_UNLIMITED
*/
extern int task_irq_wait(kirq_t irq_obj, int32_t timeout)
__attribute__((deprecated));
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* TASK_IRQ_H */