2015-04-11 07:44:37 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2011-2012, 2014 Wind River Systems, Inc.
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2015-04-11 07:44:37 +08:00
|
|
|
*/
|
|
|
|
|
2015-12-04 23:09:39 +08:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief Stack frame created by swap (IA-32)
|
|
|
|
*
|
2015-10-21 00:42:33 +08:00
|
|
|
* This file details the stack frame generated by _Swap() when it saves a task
|
2017-10-29 19:10:22 +08:00
|
|
|
* or thread's context. This is specific to the IA-32 processor architecture.
|
2015-10-21 00:42:33 +08:00
|
|
|
*
|
|
|
|
* NOTE: _Swap() does not use this file as it uses the push instruction to
|
|
|
|
* save a context. Changes to the file will not automatically be picked up by
|
|
|
|
* _Swap(). Conversely, changes to _Swap() should be mirrored here if the
|
|
|
|
* stack frame is modified.
|
2015-07-02 05:22:39 +08:00
|
|
|
*/
|
2015-04-11 07:44:37 +08:00
|
|
|
|
|
|
|
#ifndef _SWAPSTK_H
|
|
|
|
#define _SWAPSTK_H
|
|
|
|
|
2016-01-23 01:38:49 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-04-11 07:44:37 +08:00
|
|
|
#ifndef _ASMLANGUAGE
|
|
|
|
|
|
|
|
/* Stack of a saved context */
|
|
|
|
typedef struct s_SwapStk {
|
|
|
|
unsigned int eax; /* EAX register */
|
|
|
|
unsigned int ebp; /* EBP register */
|
|
|
|
unsigned int ebx; /* EBX register */
|
|
|
|
unsigned int esi; /* ESI register */
|
|
|
|
unsigned int edi; /* EDI register */
|
|
|
|
unsigned int retAddr; /* Return address of caller of _Swap() */
|
|
|
|
unsigned int param; /* Parameter passed to _Swap() */
|
|
|
|
} tSwapStk;
|
|
|
|
|
|
|
|
#endif /* _ASMLANGUAGE */
|
|
|
|
|
2016-01-23 01:38:49 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-04-11 07:44:37 +08:00
|
|
|
#endif /* _SWAPSTK_H */
|