All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Dealing with too small thread stacks
@ 2015-04-17 17:34 Jan Kiszka
  2015-04-17 17:50 ` Gilles Chanteperdrix
  2015-04-17 18:22 ` Jan Kiszka
  0 siblings, 2 replies; 14+ messages in thread
From: Jan Kiszka @ 2015-04-17 17:34 UTC (permalink / raw)
  To: Xenomai

Hi,

analyzing page faults of an application that prefers to set its own
stacks, I noticed a problem in Xenomai (2 and 3), at least from the
usability POV: We document the minimum stack stack as PTHREAD_STACK_MIN
+ 1 page, at least in Xenomai 3, and we enforce that on thread creation.
However, enforcement is doomed to fail if the stack is preallocated (and
that too small).

As we cannot detect if the user set a stack address in pthread_attr_t, I
would suggest to fail thread creation instead of performing it with
improper parameters. Other suggestions? If not, I would prepare a patch
for Xenomai 3 (for 2 only if desired).

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-04-17 18:50 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-17 17:34 [Xenomai] Dealing with too small thread stacks Jan Kiszka
2015-04-17 17:50 ` Gilles Chanteperdrix
2015-04-17 18:05   ` Jan Kiszka
2015-04-17 18:08     ` Gilles Chanteperdrix
2015-04-17 18:10       ` Jan Kiszka
2015-04-17 18:12         ` Gilles Chanteperdrix
2015-04-17 18:17           ` Jan Kiszka
2015-04-17 18:24             ` Gilles Chanteperdrix
2015-04-17 18:26               ` Jan Kiszka
2015-04-17 18:30                 ` Gilles Chanteperdrix
2015-04-17 18:34                   ` Jan Kiszka
2015-04-17 18:46                     ` Gilles Chanteperdrix
2015-04-17 18:50                     ` Gilles Chanteperdrix
2015-04-17 18:22 ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.