Pavel Pisa commented on a discussion on cpukit/dev/can/sja1000/sja1000.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1183#note_148190

 > +    "sja1000",
 > +    irq_option,
 > +    sja1000_interrupt,
 > +    chip
 > +  );
 > +  if ( sc != RTEMS_SUCCESSFUL ) {
 > +    free( internal );
 > +    free( chip->qends_dev );
 > +    free( chip );
 > +    return NULL;
 > +  }
 > +
 > +  sc = rtems_task_create(
 > +    rtems_build_name( 'C', 'A', 'N', 'S' ),
 > +    worker_priority,
 > +    RTEMS_MINIMUM_STACK_SIZE + 0x1000,

Some stack usage statistic from i386_pc686
```
SHLL [/] # stackuse
                             STACK USAGE BY THREAD
ID         NAME                  LOW        HIGH       CURRENT     AVAIL   USED
0x09010001 IDLE                  0x001b79d8 0x001b89bf 0x001b8918   4072    232
0x0a010002 RMON                  0x001bb1f4 0x001bd1ef 0x001bcd2c   8188   1892
0x0a010003 SHLL                  0x001bd208 0x001bf1ff 0x001be37c   8184   3812
0x0a010004 CANS                  0x001bf28c 0x001c127f 0x001c10ac   8180    700
0x0a010005 CANS                  0x001c12a0 0x001c328f 0x001c30bc   8176    692
0x0a010006 CANS                  0x001c32b4 0x001c52af 0x001c50dc   8188    564
0x0a010007 CANS                  0x001c52c8 0x001c72bf 0x001c70ec   8184    564
0x0a010008 CAND                  0x001c72dc 0x001c92cf 0x001c91cc   8180    356
0x00000000 Interrupt Stack       0x001b69d0 0x001b79af 0x00000000   4064   1072
```
It is 32-bit but register count is restricted so more local variables on stack. 
The first two `CANS` are SJA1000 workers actively used, the the other two 
`CANS` are only configured but not started. `CAND` is the background thread for 
postponed queues removal/free. So there is lot space but on the other hand, it 
is question how exceptions, task switching and interrupts occupy additional 
space on stack at different concurrent events. But main interrupt stack is 
separate so it should no be so much.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1183#note_148190
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to