2015-04-11 07:44:37 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2011-2012, 2014 Wind River Systems, Inc.
|
|
|
|
*
|
2015-10-07 00:00:37 +08:00
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
2015-04-11 07:44:37 +08:00
|
|
|
*
|
2015-10-07 00:00:37 +08:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2015-04-11 07:44:37 +08:00
|
|
|
*
|
2015-10-07 00:00:37 +08:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
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
|
|
|
|
* or fiber's context. This is specific to the IA-32 processor architecture.
|
|
|
|
*
|
|
|
|
* 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 */
|