diff --git a/mtapi_c/src/embb_mtapi_action_t_fwd.h b/mtapi_c/src/embb_mtapi_action_t_fwd.h new file mode 100644 index 0000000..9774070 --- /dev/null +++ b/mtapi_c/src/embb_mtapi_action_t_fwd.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2014, Siemens AG. All rights reserved. + * + * 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. + * + * 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 MTAPI_C_SRC_EMBB_MTAPI_ACTION_T_FWD_H_ +#define MTAPI_C_SRC_EMBB_MTAPI_ACTION_T_FWD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Action type + * \memberof embb_mtapi_action_struct + */ +typedef struct embb_mtapi_action_struct embb_mtapi_action_t; + +/** + * Action pool type. + * \memberof embb_mtapi_action_pool_struct + */ +typedef struct embb_mtapi_action_pool_struct embb_mtapi_action_pool_t; + +#ifdef __cplusplus +} +#endif + +#endif // MTAPI_C_SRC_EMBB_MTAPI_ACTION_T_FWD_H_ diff --git a/mtapi_c/src/embb_mtapi_group_t.h b/mtapi_c/src/embb_mtapi_group_t.h index 799bcf1..d0d52e2 100644 --- a/mtapi_c/src/embb_mtapi_group_t.h +++ b/mtapi_c/src/embb_mtapi_group_t.h @@ -40,7 +40,7 @@ extern "C" { /* ---- FORWARD DECLARATIONS ----------------------------------------------- */ -typedef struct embb_mtapi_node_struct embb_mtapi_node_t; +#include /* ---- CLASS DECLARATION -------------------------------------------------- */ @@ -61,11 +61,7 @@ struct embb_mtapi_group_struct { embb_mtapi_task_queue_t queue; }; -/** - * Group type - * \memberof embb_mtapi_group_struct - */ -typedef struct embb_mtapi_group_struct embb_mtapi_group_t; +#include /** * Default constructor. diff --git a/mtapi_c/src/embb_mtapi_group_t_fwd.h b/mtapi_c/src/embb_mtapi_group_t_fwd.h new file mode 100644 index 0000000..972deb0 --- /dev/null +++ b/mtapi_c/src/embb_mtapi_group_t_fwd.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2014, Siemens AG. All rights reserved. + * + * 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. + * + * 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 MTAPI_C_SRC_EMBB_MTAPI_GROUP_T_FWD_H_ +#define MTAPI_C_SRC_EMBB_MTAPI_GROUP_T_FWD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Group type + * \memberof embb_mtapi_group_struct + */ +typedef struct embb_mtapi_group_struct embb_mtapi_group_t; + +/** + * Group pool type. + * \memberof embb_mtapi_group_pool_struct + */ +typedef struct embb_mtapi_group_pool_struct embb_mtapi_group_pool_t; + +#ifdef __cplusplus +} +#endif + +#endif // MTAPI_C_SRC_EMBB_MTAPI_GROUP_T_H_ diff --git a/mtapi_c/src/embb_mtapi_job_t.h b/mtapi_c/src/embb_mtapi_job_t.h index f389c16..ae18f26 100644 --- a/mtapi_c/src/embb_mtapi_job_t.h +++ b/mtapi_c/src/embb_mtapi_job_t.h @@ -36,8 +36,8 @@ extern "C" { /* ---- FORWARD DECLARATIONS ----------------------------------------------- */ -typedef struct embb_mtapi_node_struct embb_mtapi_node_t; -typedef struct embb_mtapi_action_struct embb_mtapi_action_t; +#include +#include /* ---- CLASS DECLARATION -------------------------------------------------- */ @@ -58,11 +58,7 @@ struct embb_mtapi_job_struct { mtapi_action_hndl_t* actions; }; -/** - * Job type. - * \memberof embb_mtapi_job_struct - */ -typedef struct embb_mtapi_job_struct embb_mtapi_job_t; +#include /** * Constructs the global job list. diff --git a/mtapi_c/src/embb_mtapi_job_t_fwd.h b/mtapi_c/src/embb_mtapi_job_t_fwd.h new file mode 100644 index 0000000..17dd76d --- /dev/null +++ b/mtapi_c/src/embb_mtapi_job_t_fwd.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2014, Siemens AG. All rights reserved. + * + * 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. + * + * 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 MTAPI_C_SRC_EMBB_MTAPI_JOB_T_FWD_H_ +#define MTAPI_C_SRC_EMBB_MTAPI_JOB_T_FWD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Job type. + * \memberof embb_mtapi_job_struct + */ +typedef struct embb_mtapi_job_struct embb_mtapi_job_t; + +#ifdef __cplusplus +} +#endif + +#endif // MTAPI_C_SRC_EMBB_MTAPI_JOB_T_FWD_H_ diff --git a/mtapi_c/src/embb_mtapi_node_t.h b/mtapi_c/src/embb_mtapi_node_t.h index 3218857..f9a12b5 100644 --- a/mtapi_c/src/embb_mtapi_node_t.h +++ b/mtapi_c/src/embb_mtapi_node_t.h @@ -39,12 +39,12 @@ extern "C" { /* ---- FORWARD DECLARATIONS ----------------------------------------------- */ -typedef struct embb_mtapi_job_struct embb_mtapi_job_t; -typedef struct embb_mtapi_scheduler_struct embb_mtapi_scheduler_t; -typedef struct embb_mtapi_action_pool_struct embb_mtapi_action_pool_t; -typedef struct embb_mtapi_group_pool_struct embb_mtapi_group_pool_t; -typedef struct embb_mtapi_task_pool_struct embb_mtapi_task_pool_t; -typedef struct embb_mtapi_queue_pool_struct embb_mtapi_queue_pool_t; +#include +#include +#include +#include +#include +#include /* ---- CLASS DECLARATION -------------------------------------------------- */ @@ -73,11 +73,7 @@ struct embb_mtapi_node_struct { mtapi_affinity_t affinity_all; }; -/** - * Node type. - * \memberof embb_mtapi_node_struct - */ -typedef struct embb_mtapi_node_struct embb_mtapi_node_t; +#include /** * Checks if the node singleton was initialized already. diff --git a/mtapi_c/src/embb_mtapi_node_t_fwd.h b/mtapi_c/src/embb_mtapi_node_t_fwd.h new file mode 100644 index 0000000..0bb22fe --- /dev/null +++ b/mtapi_c/src/embb_mtapi_node_t_fwd.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2014, Siemens AG. All rights reserved. + * + * 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. + * + * 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 MTAPI_C_SRC_EMBB_MTAPI_NODE_T_FWD_H_ +#define MTAPI_C_SRC_EMBB_MTAPI_NODE_T_FWD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Node type. + * \memberof embb_mtapi_node_struct + */ +typedef struct embb_mtapi_node_struct embb_mtapi_node_t; + +#ifdef __cplusplus +} +#endif + +#endif // MTAPI_C_SRC_EMBB_MTAPI_NODE_T_FWD_H_ diff --git a/mtapi_c/src/embb_mtapi_pool_template.h b/mtapi_c/src/embb_mtapi_pool_template.h index b7738ec..38803e1 100644 --- a/mtapi_c/src/embb_mtapi_pool_template.h +++ b/mtapi_c/src/embb_mtapi_pool_template.h @@ -45,11 +45,6 @@ struct embb_mtapi_##TYPE##_pool_struct \ embb_mtapi_##TYPE##_t * storage; \ }; \ \ -/** TYPE pool type. -\memberof embb_mtapi_##TYPE##_pool_struct -*/ \ -typedef struct embb_mtapi_##TYPE##_pool_struct embb_mtapi_##TYPE##_pool_t; \ -\ /** operator new with configurable capacity. \memberof embb_mtapi_##TYPE##_pool_struct */ \ diff --git a/mtapi_c/src/embb_mtapi_queue_t.h b/mtapi_c/src/embb_mtapi_queue_t.h index 2ccde19..2ff2478 100644 --- a/mtapi_c/src/embb_mtapi_queue_t.h +++ b/mtapi_c/src/embb_mtapi_queue_t.h @@ -40,7 +40,7 @@ extern "C" { /* ---- FORWARD DECLARATIONS ----------------------------------------------- */ -typedef struct embb_mtapi_task_queue_struct embb_mtapi_task_queue_t; +#include /* ---- CLASS DECLARATION -------------------------------------------------- */ @@ -63,11 +63,7 @@ struct embb_mtapi_queue_struct { mtapi_affinity_t ordered_affinity; }; -/** - * Queue type. - * \memberof embb_mtapi_queue_struct - */ -typedef struct embb_mtapi_queue_struct embb_mtapi_queue_t; +#include /** * Default constructor. diff --git a/mtapi_c/src/embb_mtapi_queue_t_fwd.h b/mtapi_c/src/embb_mtapi_queue_t_fwd.h new file mode 100644 index 0000000..9d0a84f --- /dev/null +++ b/mtapi_c/src/embb_mtapi_queue_t_fwd.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2014, Siemens AG. All rights reserved. + * + * 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. + * + * 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 MTAPI_C_SRC_EMBB_MTAPI_QUEUE_T_FWD_H_ +#define MTAPI_C_SRC_EMBB_MTAPI_QUEUE_T_FWD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Queue type. + * \memberof embb_mtapi_queue_struct + */ +typedef struct embb_mtapi_queue_struct embb_mtapi_queue_t; + +/** + * Queue pool type. + * \memberof embb_mtapi_queue_pool_struct + */ +typedef struct embb_mtapi_queue_pool_struct embb_mtapi_queue_pool_t; + +#ifdef __cplusplus +} +#endif + +#endif // MTAPI_C_SRC_EMBB_MTAPI_QUEUE_T_FWD_H_ diff --git a/mtapi_c/src/embb_mtapi_scheduler_t.h b/mtapi_c/src/embb_mtapi_scheduler_t.h index cd0b00c..647281a 100644 --- a/mtapi_c/src/embb_mtapi_scheduler_t.h +++ b/mtapi_c/src/embb_mtapi_scheduler_t.h @@ -39,10 +39,10 @@ extern "C" { /* ---- FORWARD DECLARATIONS ----------------------------------------------- */ -typedef struct embb_mtapi_queue_struct embb_mtapi_queue_t; -typedef struct embb_mtapi_thread_context_struct embb_mtapi_thread_context_t; -typedef struct embb_mtapi_task_struct embb_mtapi_task_t; -typedef struct embb_mtapi_node_struct embb_mtapi_node_t; +#include +#include +#include +#include typedef int (embb_mtapi_scheduler_worker_func_t)(void * args); /* ---- CLASS DECLARATION -------------------------------------------------- */ @@ -87,11 +87,7 @@ struct embb_mtapi_scheduler_struct { embb_atomic_int affine_task_counter; }; -/** - * Scheduler type. - * \memberof embb_mtapi_scheduler_struct - */ -typedef struct embb_mtapi_scheduler_struct embb_mtapi_scheduler_t; +#include /** * The default worker thread function used by the scheduler. Implements diff --git a/mtapi_c/src/embb_mtapi_scheduler_t_fwd.h b/mtapi_c/src/embb_mtapi_scheduler_t_fwd.h new file mode 100644 index 0000000..dc9425b --- /dev/null +++ b/mtapi_c/src/embb_mtapi_scheduler_t_fwd.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2014, Siemens AG. All rights reserved. + * + * 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. + * + * 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 MTAPI_C_SRC_EMBB_MTAPI_SCHEDULER_T_FWD_H_ +#define MTAPI_C_SRC_EMBB_MTAPI_SCHEDULER_T_FWD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Scheduler type. + * \memberof embb_mtapi_scheduler_struct + */ +typedef struct embb_mtapi_scheduler_struct embb_mtapi_scheduler_t; + +#ifdef __cplusplus +} +#endif + +#endif // MTAPI_C_SRC_EMBB_MTAPI_SCHEDULER_T_FWD_H_ diff --git a/mtapi_c/src/embb_mtapi_task_context_t.h b/mtapi_c/src/embb_mtapi_task_context_t.h index 860b075..3a09ac3 100644 --- a/mtapi_c/src/embb_mtapi_task_context_t.h +++ b/mtapi_c/src/embb_mtapi_task_context_t.h @@ -36,8 +36,8 @@ extern "C" { /* ---- FORWARD DECLARATIONS ----------------------------------------------- */ -typedef struct embb_mtapi_thread_context_struct embb_mtapi_thread_context_t; -typedef struct embb_mtapi_task_struct embb_mtapi_task_t; +#include +#include /* ---- CLASS DECLARATION -------------------------------------------------- */ @@ -55,11 +55,7 @@ struct embb_mtapi_task_context_struct { embb_mtapi_thread_context_t* thread_context; }; -/** - * Task context type. - * \memberof embb_mtapi_task_context_struct - */ -typedef struct embb_mtapi_task_context_struct embb_mtapi_task_context_t; +#include /** * Constructor from a thread_context and a task. diff --git a/mtapi_c/src/embb_mtapi_task_context_t_fwd.h b/mtapi_c/src/embb_mtapi_task_context_t_fwd.h new file mode 100644 index 0000000..b9c5061 --- /dev/null +++ b/mtapi_c/src/embb_mtapi_task_context_t_fwd.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2014, Siemens AG. All rights reserved. + * + * 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. + * + * 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 MTAPI_C_SRC_EMBB_MTAPI_TASK_CONTEXT_T_FWD_H_ +#define MTAPI_C_SRC_EMBB_MTAPI_TASK_CONTEXT_T_FWD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Task context type. + * \memberof embb_mtapi_task_context_struct + */ +typedef struct embb_mtapi_task_context_struct embb_mtapi_task_context_t; + +#ifdef __cplusplus +} +#endif + +#endif // MTAPI_C_SRC_EMBB_MTAPI_TASK_CONTEXT_T_FWD_H_ diff --git a/mtapi_c/src/embb_mtapi_task_queue_t.h b/mtapi_c/src/embb_mtapi_task_queue_t.h index 1a4b149..bf859da 100644 --- a/mtapi_c/src/embb_mtapi_task_queue_t.h +++ b/mtapi_c/src/embb_mtapi_task_queue_t.h @@ -40,7 +40,7 @@ extern "C" { /* ---- FORWARD DECLARATIONS ----------------------------------------------- */ -typedef struct embb_mtapi_task_struct embb_mtapi_task_t; +#include /* ---- CLASS DECLARATION -------------------------------------------------- */ @@ -60,11 +60,7 @@ struct embb_mtapi_task_queue_struct { embb_mtapi_spinlock_t lock; }; -/** - * Task queue type. - * \memberof embb_mtapi_task_queue_struct - */ -typedef struct embb_mtapi_task_queue_struct embb_mtapi_task_queue_t; +#include /** * Default constructor. diff --git a/mtapi_c/src/embb_mtapi_task_queue_t_fwd.h b/mtapi_c/src/embb_mtapi_task_queue_t_fwd.h new file mode 100644 index 0000000..c75c283 --- /dev/null +++ b/mtapi_c/src/embb_mtapi_task_queue_t_fwd.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2014, Siemens AG. All rights reserved. + * + * 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. + * + * 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 MTAPI_C_SRC_EMBB_MTAPI_TASK_QUEUE_T_FWD_H_ +#define MTAPI_C_SRC_EMBB_MTAPI_TASK_QUEUE_T_FWD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Task queue type. + * \memberof embb_mtapi_task_queue_struct + */ +typedef struct embb_mtapi_task_queue_struct embb_mtapi_task_queue_t; + +#ifdef __cplusplus +} +#endif + +#endif // MTAPI_C_SRC_EMBB_MTAPI_TASK_QUEUE_T_FWD_H_ diff --git a/mtapi_c/src/embb_mtapi_task_t.h b/mtapi_c/src/embb_mtapi_task_t.h index 29ac5f3..a9268be 100644 --- a/mtapi_c/src/embb_mtapi_task_t.h +++ b/mtapi_c/src/embb_mtapi_task_t.h @@ -40,8 +40,8 @@ extern "C" { /* ---- FORWARD DECLARATIONS ----------------------------------------------- */ -typedef struct embb_mtapi_task_context_struct embb_mtapi_task_context_t; -typedef struct embb_mtapi_task_pool_struct embb_mtapi_task_pool_t; +#include +#include /* ---- CLASS DECLARATION -------------------------------------------------- */ @@ -73,11 +73,7 @@ struct embb_mtapi_task_struct { mtapi_status_t error_code; }; -/** - * Task type. - * \memberof embb_mtapi_task_struct - */ -typedef struct embb_mtapi_task_struct embb_mtapi_task_t; +#include /** * Pooled operator new. diff --git a/mtapi_c/src/embb_mtapi_task_t_fwd.h b/mtapi_c/src/embb_mtapi_task_t_fwd.h new file mode 100644 index 0000000..8062970 --- /dev/null +++ b/mtapi_c/src/embb_mtapi_task_t_fwd.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2014, Siemens AG. All rights reserved. + * + * 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. + * + * 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 MTAPI_C_SRC_EMBB_MTAPI_TASK_T_FWD_H_ +#define MTAPI_C_SRC_EMBB_MTAPI_TASK_T_FWD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Task type. + * \memberof embb_mtapi_task_struct + */ +typedef struct embb_mtapi_task_struct embb_mtapi_task_t; + +/** + * Task pool type. + * \memberof embb_mtapi_task_pool_struct + */ +typedef struct embb_mtapi_task_pool_struct embb_mtapi_task_pool_t; + +#ifdef __cplusplus +} +#endif + +#endif // MTAPI_C_SRC_EMBB_MTAPI_TASK_T_FWD_H_ diff --git a/mtapi_c/src/embb_mtapi_task_visitor_function_t.h b/mtapi_c/src/embb_mtapi_task_visitor_function_t.h index 45e15f1..d1c67c0 100644 --- a/mtapi_c/src/embb_mtapi_task_visitor_function_t.h +++ b/mtapi_c/src/embb_mtapi_task_visitor_function_t.h @@ -36,7 +36,7 @@ extern "C" { /* ---- FORWARD DECLARATIONS ----------------------------------------------- */ -typedef struct embb_mtapi_task_struct embb_mtapi_task_t; +#include /* ---- TYPE DEFINITIONS --------------------------------------------------- */ diff --git a/mtapi_c/src/embb_mtapi_thread_context_t.h b/mtapi_c/src/embb_mtapi_thread_context_t.h index bd78049..67ec3a1 100644 --- a/mtapi_c/src/embb_mtapi_thread_context_t.h +++ b/mtapi_c/src/embb_mtapi_thread_context_t.h @@ -39,9 +39,9 @@ extern "C" { /* ---- FORWARD DECLARATIONS ----------------------------------------------- */ -typedef struct embb_mtapi_task_queue_struct embb_mtapi_task_queue_t; -typedef struct embb_mtapi_node_struct embb_mtapi_node_t; -typedef struct embb_mtapi_scheduler_struct embb_mtapi_scheduler_t; +#include +#include +#include /* ---- CLASS DECLARATION -------------------------------------------------- */ @@ -68,11 +68,7 @@ struct embb_mtapi_thread_context_struct { mtapi_status_t status; }; -/** - * Thread context type. - * \memberof embb_mtapi_thread_context_struct - */ -typedef struct embb_mtapi_thread_context_struct embb_mtapi_thread_context_t; +#include /** * Constructor using attributes from node and a given core number. diff --git a/mtapi_c/src/embb_mtapi_thread_context_t_fwd.h b/mtapi_c/src/embb_mtapi_thread_context_t_fwd.h new file mode 100644 index 0000000..a38e875 --- /dev/null +++ b/mtapi_c/src/embb_mtapi_thread_context_t_fwd.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2014, Siemens AG. All rights reserved. + * + * 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. + * + * 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 MTAPI_C_SRC_EMBB_MTAPI_THREAD_CONTEXT_T_FWD_H_ +#define MTAPI_C_SRC_EMBB_MTAPI_THREAD_CONTEXT_T_FWD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Thread context type. + * \memberof embb_mtapi_thread_context_struct + */ +typedef struct embb_mtapi_thread_context_struct embb_mtapi_thread_context_t; + +#ifdef __cplusplus +} +#endif + +#endif // MTAPI_C_SRC_EMBB_MTAPI_THREAD_CONTEXT_T_FWD_H_