1 /* -------------------------------- Arctic Core ------------------------------
\r
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
\r
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
\r
6 * This source code is free software; you can redistribute it and/or modify it
\r
7 * under the terms of the GNU General Public License version 2 as published by the
\r
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
\r
10 * This program is distributed in the hope that it will be useful, but
\r
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\r
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
\r
14 * -------------------------------- Arctic Core ------------------------------*/
\r
19 struct os_conf_global_hook_s;
\r
21 typedef struct sys_s {
\r
22 // OsApplicationType *curr_application;
\r
23 /* Current running task*/
\r
24 OsPcbType *curr_pcb;
\r
25 /* List of all tasks */
\r
26 OsPcbType *pcb_list;
\r
27 /* Interrupt nested count */
\r
28 uint32 int_nest_cnt;
\r
29 /* Ptr to the interrupt stack */
\r
33 // 1-The scheduler is locked (by GetResource() or something else)
\r
36 struct OsHooks *hooks;
\r
38 // parameters for functions, used by OSErrorXXX()
\r
44 /* Current Application mode */
\r
45 AppModeType appMode;
\r
48 /* List of all pcb's,
\r
49 * Only needed for non-static configuration of the kernel
\r
51 TAILQ_HEAD(,OsPcb) pcb_head;
\r
53 TAILQ_HEAD(,OsPcb) ready_head;
\r
56 extern sys_t os_sys;
\r
58 static inline OsPcbType *Os_TaskGetCurrent( void ) {
\r
59 return os_sys.curr_pcb;
\r
63 static uint32_t OSErrorGetServiceId( void ) {
\r
64 return os_sys.serviceId;
\r