mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 23:23:13 +00:00
address arithmetic changed to be more portable
This commit is contained in:
@@ -21,6 +21,7 @@ void b() {}
|
|||||||
void blow_stack( void )
|
void blow_stack( void )
|
||||||
{
|
{
|
||||||
volatile unsigned32 *low, *high;
|
volatile unsigned32 *low, *high;
|
||||||
|
unsigned char *area;
|
||||||
|
|
||||||
b();
|
b();
|
||||||
/*
|
/*
|
||||||
@@ -28,9 +29,12 @@ b();
|
|||||||
* does not cause problems :)
|
* does not cause problems :)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
low = _Thread_Executing->Start.Initial_stack.area + HEAP_OVERHEAD;
|
area = (unsigned char *)_Thread_Executing->Start.Initial_stack.area;
|
||||||
high = _Thread_Executing->Start.Initial_stack.area +
|
|
||||||
_Thread_Executing->Start.Initial_stack.size - 16;
|
low = (volatile unsigned32 *) (area + HEAP_OVERHEAD);
|
||||||
|
high = (volatile unsigned32 *)
|
||||||
|
(area + _Thread_Executing->Start.Initial_stack.size - 16);
|
||||||
|
|
||||||
|
|
||||||
low[0] = 0x11111111;
|
low[0] = 0x11111111;
|
||||||
low[1] = 0x22222222;
|
low[1] = 0x22222222;
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ void b() {}
|
|||||||
void blow_stack( void )
|
void blow_stack( void )
|
||||||
{
|
{
|
||||||
volatile unsigned32 *low, *high;
|
volatile unsigned32 *low, *high;
|
||||||
|
unsigned char *area;
|
||||||
|
|
||||||
b();
|
b();
|
||||||
/*
|
/*
|
||||||
@@ -28,9 +29,12 @@ b();
|
|||||||
* does not cause problems :)
|
* does not cause problems :)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
low = _Thread_Executing->Start.Initial_stack.area + HEAP_OVERHEAD;
|
area = (unsigned char *)_Thread_Executing->Start.Initial_stack.area;
|
||||||
high = _Thread_Executing->Start.Initial_stack.area +
|
|
||||||
_Thread_Executing->Start.Initial_stack.size - 16;
|
low = (volatile unsigned32 *) (area + HEAP_OVERHEAD);
|
||||||
|
high = (volatile unsigned32 *)
|
||||||
|
(area + _Thread_Executing->Start.Initial_stack.size - 16);
|
||||||
|
|
||||||
|
|
||||||
low[0] = 0x11111111;
|
low[0] = 0x11111111;
|
||||||
low[1] = 0x22222222;
|
low[1] = 0x22222222;
|
||||||
|
|||||||
Reference in New Issue
Block a user