1 /* -------------------------------- Arctic Core ------------------------------
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
6 * This source code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by the
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * -------------------------------- Arctic Core ------------------------------*/
26 * Created on: 2009-jan-25
\r
34 void Os_GetStackInfo( TaskType task, StackInfoType *s) {
\r
36 pcb_t *pcb = os_get_pcb(task);
\r
38 s->curr = os_arch_get_stackptr();
\r
39 s->top = pcb->stack.top;
\r
40 s->at_swap = pcb->stack.curr;
\r
41 s->size = pcb->stack.size;
\r
42 s->usage = (void *)os_arch_get_stack_usage(pcb);
\r