Eliminate include files to export microkernel APIs to user space
There is no longer any need to differentiate between kernel-visible and user space-visible APIs, as only kernel space is supported. Change-Id: I681ed15d3fa0b90f3e2ba2ed793031ec3dd02b3b Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
parent
678aea8e65
commit
6a7e93d3a9
14 changed files with 83 additions and 345 deletions
|
@ -37,7 +37,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <microkernel/event_api_export.h>
|
||||
#include <microkernel/cmdPkt.h>
|
||||
|
||||
extern void isr_event_send(kevent_t event);
|
||||
|
@ -47,6 +46,13 @@ extern int task_event_set_handler(kevent_t event, kevent_handler_t handler);
|
|||
extern int task_event_send(kevent_t event);
|
||||
extern int _task_event_recv(kevent_t event, int32_t time);
|
||||
|
||||
#define task_event_recv(event) _task_event_recv(event, TICKS_NONE)
|
||||
#define task_event_recv_wait(event) _task_event_recv(event, TICKS_UNLIMITED)
|
||||
|
||||
#ifndef CONFIG_TICKLESS_KERNEL
|
||||
#define task_event_recv_wait_timeout(event, time) _task_event_recv(event, time)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
/* event macros/types/values exportable to user-space */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2015 Wind River Systems, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2) Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3) Neither the name of Wind River Systems nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _event_api_export__h_
|
||||
#define _event_api_export__h_
|
||||
|
||||
#define task_event_recv(event) _task_event_recv(event, TICKS_NONE)
|
||||
#define task_event_recv_wait(event) _task_event_recv(event, TICKS_UNLIMITED)
|
||||
|
||||
#ifndef CONFIG_TICKLESS_KERNEL
|
||||
#define task_event_recv_wait_timeout(event, time) _task_event_recv(event, time)
|
||||
#endif
|
||||
|
||||
#endif /* _event_api_export__h_ */
|
|
@ -39,12 +39,27 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <microkernel/fifo_api_export.h>
|
||||
|
||||
extern int _task_fifo_put(kfifo_t queue, void *data, int32_t time);
|
||||
extern int _task_fifo_get(kfifo_t queue, void *data, int32_t time);
|
||||
extern int _task_fifo_ioctl(kfifo_t queue, int op);
|
||||
|
||||
#define task_fifo_put(q, p) _task_fifo_put(q, p, TICKS_NONE)
|
||||
#define task_fifo_put_wait(q, p) _task_fifo_put(q, p, TICKS_UNLIMITED)
|
||||
|
||||
#ifndef CONFIG_TICKLESS_KERNEL
|
||||
#define task_fifo_put_wait_timeout(q, p, t) _task_fifo_put(q, p, t)
|
||||
#endif
|
||||
|
||||
#define task_fifo_get(q, p) _task_fifo_get(q, p, TICKS_NONE)
|
||||
#define task_fifo_get_wait(q, p) _task_fifo_get(q, p, TICKS_UNLIMITED)
|
||||
|
||||
#ifndef CONFIG_TICKLESS_KERNEL
|
||||
#define task_fifo_get_wait_timeout(q, p, t) _task_fifo_get(q, p, t)
|
||||
#endif
|
||||
|
||||
#define task_fifo_size_get(q) _task_fifo_ioctl(q, 0)
|
||||
#define task_fifo_purge(q) _task_fifo_ioctl(q, 1)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
/* FIFO macros/types/values exportable to user-space */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2015 Wind River Systems, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2) Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3) Neither the name of Wind River Systems nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _fifo_api_export__h_
|
||||
#define _fifo_api_export__h_
|
||||
|
||||
#define task_fifo_put(q, p) _task_fifo_put(q, p, TICKS_NONE)
|
||||
#define task_fifo_put_wait(q, p) _task_fifo_put(q, p, TICKS_UNLIMITED)
|
||||
|
||||
#define task_fifo_get(q, p) _task_fifo_get(q, p, TICKS_NONE)
|
||||
#define task_fifo_get_wait(q, p) _task_fifo_get(q, p, TICKS_UNLIMITED)
|
||||
|
||||
#ifndef CONFIG_TICKLESS_KERNEL
|
||||
#define task_fifo_put_wait_timeout(q, p, t) _task_fifo_put(q, p, t)
|
||||
#define task_fifo_get_wait_timeout(q, p, t) _task_fifo_get(q, p, t)
|
||||
#endif
|
||||
|
||||
#define task_fifo_size_get(q) _task_fifo_ioctl(q, 0)
|
||||
#define task_fifo_purge(q) _task_fifo_ioctl(q, 1)
|
||||
|
||||
#endif /* _fifo_api_export__h_ */
|
||||
|
|
@ -39,8 +39,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <microkernel/mail_api_export.h>
|
||||
|
||||
extern int _task_mbox_put(kmbox_t mbox,
|
||||
kpriority_t prio,
|
||||
struct k_msg *M,
|
||||
|
@ -60,6 +58,20 @@ extern int _task_mbox_data_get_async_block(struct k_msg *M,
|
|||
kmemory_pool_t pid,
|
||||
int32_t time);
|
||||
|
||||
#define task_mbox_put(b, p, m) _task_mbox_put(b, p, m, TICKS_NONE)
|
||||
#define task_mbox_put_wait(b, p, m) _task_mbox_put(b, p, m, TICKS_UNLIMITED)
|
||||
|
||||
#ifndef CONFIG_TICKLESS_KERNEL
|
||||
#define task_mbox_put_wait_timeout(b, p, m, t) _task_mbox_put(b, p, m, t)
|
||||
#endif
|
||||
|
||||
#define task_mbox_get(b, m) _task_mbox_get(b, m, TICKS_NONE)
|
||||
#define task_mbox_get_wait(b, m) _task_mbox_get(b, m, TICKS_UNLIMITED)
|
||||
|
||||
#ifndef CONFIG_TICKLESS_KERNEL
|
||||
#define task_mbox_get_wait_timeout(b, m, t) _task_mbox_get(b, m, t)
|
||||
#endif
|
||||
|
||||
#define task_mbox_put_async(b, p, m, s) _task_mbox_put_async(b, p, m, s)
|
||||
#define task_mbox_data_get(m) _task_mbox_data_get(m)
|
||||
#define task_mbox_data_get_async_block(m, b, p) \
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
/* mailbox macros/types/values exportable to user-space */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2015 Wind River Systems, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2) Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3) Neither the name of Wind River Systems nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _mail_api_export__h_
|
||||
#define _mail_api_export__h_
|
||||
|
||||
#define task_mbox_put(b, p, m) _task_mbox_put(b, p, m, TICKS_NONE)
|
||||
#define task_mbox_put_wait(b, p, m) _task_mbox_put(b, p, m, TICKS_UNLIMITED)
|
||||
|
||||
#define task_mbox_get(b, m) _task_mbox_get(b, m, TICKS_NONE)
|
||||
#define task_mbox_get_wait(b, m) _task_mbox_get(b, m, TICKS_UNLIMITED)
|
||||
|
||||
#ifndef CONFIG_TICKLESS_KERNEL
|
||||
#define task_mbox_put_wait_timeout(b, p, m, t) _task_mbox_put(b, p, m, t)
|
||||
#define task_mbox_get_wait_timeout(b, m, t) _task_mbox_get(b, m, t)
|
||||
#endif
|
||||
|
||||
#endif /* _mail_api_export__h_ */
|
|
@ -37,11 +37,18 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <microkernel/mutex_api_export.h>
|
||||
|
||||
extern int _task_mutex_lock(kmutex_t, int32_t);
|
||||
extern void _task_mutex_unlock(kmutex_t);
|
||||
|
||||
#define task_mutex_lock(m) _task_mutex_lock(m, TICKS_NONE)
|
||||
#define task_mutex_lock_wait(m) _task_mutex_lock(m, TICKS_UNLIMITED)
|
||||
|
||||
#ifndef CONFIG_TICKLESS_KERNEL
|
||||
#define task_mutex_lock_wait_timeout(m, t) _task_mutex_lock(m, t)
|
||||
#endif
|
||||
|
||||
#define task_mutex_unlock(m) _task_mutex_unlock(m)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
/* mutex macros/types/values exportable to user-space */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2015 Wind River Systems, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2) Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3) Neither the name of Wind River Systems nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _mutex_api_export__h_
|
||||
#define _mutex_api_export__h_
|
||||
|
||||
#define task_mutex_lock(m) _task_mutex_lock(m, TICKS_NONE)
|
||||
#define task_mutex_lock_wait(m) _task_mutex_lock(m, TICKS_UNLIMITED)
|
||||
|
||||
#ifndef CONFIG_TICKLESS_KERNEL
|
||||
#define task_mutex_lock_wait_timeout(m, t) _task_mutex_lock(m, t)
|
||||
#endif
|
||||
|
||||
#define task_mutex_unlock(m) _task_mutex_unlock(m)
|
||||
|
||||
#endif /* _mutex_api_export__h_ */
|
|
@ -37,7 +37,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <microkernel/sema_api_export.h>
|
||||
#include <microkernel/cmdPkt.h>
|
||||
|
||||
extern void isr_sem_give(ksem_t sema, struct cmd_pkt_set *pSet);
|
||||
|
@ -51,6 +50,15 @@ extern void task_sem_group_reset(ksemg_t semagroup);
|
|||
extern int _task_sem_take(ksem_t sema, int32_t time);
|
||||
extern ksem_t _task_sem_group_take(ksemg_t semagroup, int32_t time);
|
||||
|
||||
#define task_sem_take(s) _task_sem_take(s, TICKS_NONE)
|
||||
#define task_sem_take_wait(s) _task_sem_take(s, TICKS_UNLIMITED)
|
||||
#define task_sem_group_take_wait(g) _task_sem_group_take(g, TICKS_UNLIMITED)
|
||||
|
||||
#ifndef CONFIG_TICKLESS_KERNEL
|
||||
#define task_sem_take_wait_timeout(s, t) _task_sem_take(s, t)
|
||||
#define task_sem_group_take_wait_timeout(g, t) _task_sem_group_take(g, t)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
/* semaphore macros/types/values exportable to user-space */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2015 Wind River Systems, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2) Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3) Neither the name of Wind River Systems nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _sema_api_export__h_
|
||||
#define _sema_api_export__h_
|
||||
|
||||
#define task_sem_take(s) _task_sem_take(s, TICKS_NONE)
|
||||
#define task_sem_take_wait(s) _task_sem_take(s, TICKS_UNLIMITED)
|
||||
#define task_sem_group_take_wait(g) _task_sem_group_take(g, TICKS_UNLIMITED)
|
||||
|
||||
#ifndef CONFIG_TICKLESS_KERNEL
|
||||
#define task_sem_take_wait_timeout(s, t) _task_sem_take(s, t)
|
||||
#define task_sem_group_take_wait_timeout(g, t) _task_sem_group_take(g, t)
|
||||
#endif
|
||||
|
||||
#endif /* _sema_api_export__h_ */
|
|
@ -37,8 +37,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <microkernel/task_api_export.h>
|
||||
|
||||
extern struct k_proc *_k_current_task;
|
||||
|
||||
/*
|
||||
|
@ -64,13 +62,20 @@ extern void task_entry_set(ktask_t task, void (*func)(void));
|
|||
extern void task_abort_handler_set(void (*func)(void));
|
||||
|
||||
/*
|
||||
* The following task/group operations may only be performed with
|
||||
* _task_ioctl() and _task_group_ioctl() in the kernel.
|
||||
* Operations supported by _task_ioctl() and _task_group_ioctl()
|
||||
*/
|
||||
|
||||
#define TASK_START 0
|
||||
#define TASK_ABORT 1
|
||||
#define TASK_SUSPEND 2
|
||||
#define TASK_RESUME 3
|
||||
#define TASK_BLOCK 4
|
||||
#define TASK_UNBLOCK 5
|
||||
|
||||
#define TASK_GROUP_START 0
|
||||
#define TASK_GROUP_ABORT 1
|
||||
#define TASK_GROUP_SUSPEND 2
|
||||
#define TASK_GROUP_RESUME 3
|
||||
#define TASK_GROUP_BLOCK 4
|
||||
#define TASK_GROUP_UNBLOCK 5
|
||||
|
||||
|
@ -80,9 +85,18 @@ extern void KS_TaskSetSwitchCallBack(taskswitchcallbackfunc func);
|
|||
|
||||
#define task_id_get() (_k_current_task->Ident)
|
||||
#define task_priority_get() (_k_current_task->Prio)
|
||||
#define task_start(t) _task_ioctl(t, TASK_START)
|
||||
#define task_abort(t) _task_ioctl(t, TASK_ABORT)
|
||||
#define task_suspend(t) _task_ioctl(t, TASK_SUSPEND)
|
||||
#define task_resume(t) _task_ioctl(t, TASK_RESUME)
|
||||
|
||||
#define task_group_mask_get() (_k_current_task->Group)
|
||||
#define task_group_join(g) (_k_current_task->Group |= g)
|
||||
#define task_group_leave(g) (_k_current_task->Group &= ~g)
|
||||
#define task_group_start(g) _task_group_ioctl(g, TASK_GROUP_START)
|
||||
#define task_group_abort(g) _task_group_ioctl(g, TASK_GROUP_ABORT)
|
||||
#define task_group_suspend(g) _task_group_ioctl(g, TASK_GROUP_SUSPEND)
|
||||
#define task_group_resume(g) _task_group_ioctl(g, TASK_GROUP_RESUME)
|
||||
|
||||
#define isr_task_id_get() task_id_get()
|
||||
#define isr_task_priority_get() task_priority_get()
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
/* task macros/types/values exportable to user-space */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2015 Wind River Systems, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2) Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3) Neither the name of Wind River Systems nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _task_api_export__h_
|
||||
#define _task_api_export__h_
|
||||
|
||||
#define TASK_START 0
|
||||
#define TASK_ABORT 1
|
||||
#define TASK_SUSPEND 2
|
||||
#define TASK_RESUME 3
|
||||
|
||||
#define TASK_GROUP_START 0
|
||||
#define TASK_GROUP_ABORT 1
|
||||
#define TASK_GROUP_SUSPEND 2
|
||||
#define TASK_GROUP_RESUME 3
|
||||
|
||||
#define task_abort(t) _task_ioctl(t, TASK_ABORT)
|
||||
#define task_suspend(t) _task_ioctl(t, TASK_SUSPEND)
|
||||
#define task_resume(t) _task_ioctl(t, TASK_RESUME)
|
||||
#define task_group_abort(g) _task_group_ioctl(g, TASK_GROUP_ABORT)
|
||||
#define task_group_suspend(g) _task_group_ioctl(g, TASK_GROUP_SUSPEND)
|
||||
#define task_group_resume(g) _task_group_ioctl(g, TASK_GROUP_RESUME)
|
||||
|
||||
#define task_start(t) _task_ioctl(t, TASK_START)
|
||||
#define task_group_start(g) _task_group_ioctl(g, TASK_GROUP_START)
|
||||
|
||||
#endif /* _task_api_export__h_ */
|
|
@ -34,7 +34,8 @@
|
|||
#define TASK_IRQ_H
|
||||
|
||||
#include <microkernel/k_types.h>
|
||||
#include <microkernel/task_irq_api_export.h>
|
||||
|
||||
#define INVALID_VECTOR 0xFFFFFFFF
|
||||
|
||||
struct task_irq_info {
|
||||
ktask_t taskId; /* task ID of task IRQ object's owner */
|
||||
|
@ -52,4 +53,11 @@ extern int _task_irq_test(kirq_t irq_ob, int32_t time);
|
|||
extern void task_irq_ack(kirq_t irq_obj);
|
||||
extern void task_irq_free(kirq_t irq_obj);
|
||||
|
||||
#define task_irq_test(irq_obj) _task_irq_test(irq_obj, TICKS_NONE)
|
||||
#define task_irq_test_wait(irq_obj) _task_irq_test(irq_obj, TICKS_UNLIMITED)
|
||||
|
||||
#ifndef CONFIG_TICKLESS_KERNEL
|
||||
#define task_irq_test_wait_timeout(irq_obj, time) _task_irq_test(irq_obj, time)
|
||||
#endif
|
||||
|
||||
#endif /* TASK_IRQ_H */
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
/* task IRQ macros/types/values exportable to user-space */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2015 Wind River Systems, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2) Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3) Neither the name of Wind River Systems nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _task_irq_api_export__h_
|
||||
#define _task_irq_api_export__h_
|
||||
|
||||
#define INVALID_VECTOR 0xFFFFFFFF
|
||||
|
||||
#define task_irq_test(irq_obj) _task_irq_test(irq_obj, TICKS_NONE)
|
||||
#define task_irq_test_wait(irq_obj) _task_irq_test(irq_obj, TICKS_UNLIMITED)
|
||||
|
||||
#ifndef CONFIG_TICKLESS_KERNEL
|
||||
#define task_irq_test_wait_timeout(irq_obj, time) _task_irq_test(irq_obj, time)
|
||||
#endif
|
||||
|
||||
#endif /* _task_irq_api_export__h_ */
|
Loading…
Add table
Add a link
Reference in a new issue