Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #27964
| From | Niklas Holsti <niklas.holsti@tidorum.invalid> |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | Re: "Boost context" for task switching on embedded Linux on ARM |
| Date | 2018-08-09 22:14 +0300 |
| Organization | Tidorum Ltd |
| Message-ID | <ft3i4nFa9jlU1@mid.individual.net> (permalink) |
| References | (6 earlier) <c1njmd1rue1r9ot26igdd05nnfffp9ngns@4ax.com> <fsuauuF4h4vU1@mid.individual.net> <9srkmdlg3n1b7rgf7kcjo7uh3i1gijhdh9@4ax.com> <fsvcu2Fbed6U1@mid.individual.net> <mgkomddat648f0tkkhrtos2ag6i6t2afb3@4ax.com> |
On 18-08-09 17:55 , George Neuner wrote:
> On Wed, 8 Aug 2018 08:21:08 +0300, Niklas Holsti
> <niklas.holsti@tidorum.invalid> wrote:
>
>> The undefinedness of a cross-thread longjmp can be far more serious
>> than, say, shifting or overflowing a signed integer. A longjmp is
>> intended to *abandon* the current execution point and return to a point
>> *lower* (earlier) in the call stack. Some C or C++ systems might
>> implement this by unwinding the stack, frame by frame, until the setjmp
>> frame is reached. This will have drastic "undefinedness" if the setjmp
>> refers to another stack...
>
> But none do ... every implementation I have seen leaves the stack data
> intact and simply resets the CPU register(s).
Ok, but that is not proof that "none do".
> longjmp is NOT equivalent to throwing an exception, and, in fact, it
> is dangerous to use it that way in C++. Using longjmp will NOT cause
> destructors to be called for local objects on the "abandoned" stack.
You cannot know if it will, or won't; it's explicitly undefined in the
C++ standard.
>> It is not advisable, today, to try to misuse setjmp/longjmp for thread
>> switching.
>
> I already said that I don't advocate doing it, and that I merely was
> explaining it to the OP.
We agree.
> Maybe you prefer to conceal information about things you don't like,
> but I prefer to educate people and let them make up their own minds.
Becoming irritated, are we?
I'll stop here.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
"Boost context" for task switching on embedded Linux on ARM gp.kiwi@gmail.com - 2018-08-03 05:52 -0700
Re: "Boost context" for task switching on embedded Linux on ARM George Neuner <gneuner2@comcast.net> - 2018-08-04 03:28 -0400
Re: "Boost context" for task switching on embedded Linux on ARM Niklas Holsti <niklas.holsti@tidorum.invalid> - 2018-08-04 11:13 +0300
Re: "Boost context" for task switching on embedded Linux on ARM George Neuner <gneuner2@comcast.net> - 2018-08-04 07:08 -0400
Re: "Boost context" for task switching on embedded Linux on ARM George Neuner <gneuner2@comcast.net> - 2018-08-04 07:22 -0400
Re: "Boost context" for task switching on embedded Linux on ARM graeme.prentice@gmail.com - 2018-08-04 04:49 -0700
Re: "Boost context" for task switching on embedded Linux on ARM "gp...@gmail.com" <graeme.prentice@gmail.com> - 2018-08-04 05:25 -0700
Re: "Boost context" for task switching on embedded Linux on ARM graeme.prentice@gmail.com - 2018-08-04 06:01 -0700
Re: "Boost context" for task switching on embedded Linux on ARM George Neuner <gneuner2@comcast.net> - 2018-08-06 04:17 -0400
Re: "Boost context" for task switching on embedded Linux on ARM Paul Rubin <no.email@nospam.invalid> - 2018-08-06 11:21 -0700
Re: "Boost context" for task switching on embedded Linux on ARM Niklas Holsti <niklas.holsti@tidorum.invalid> - 2018-08-06 22:48 +0300
Re: "Boost context" for task switching on embedded Linux on ARM gp.kiwi@gmail.com - 2018-08-07 04:43 -0700
Re: "Boost context" for task switching on embedded Linux on ARM George Neuner <gneuner2@comcast.net> - 2018-08-07 15:10 -0400
Re: "Boost context" for task switching on embedded Linux on ARM Niklas Holsti <niklas.holsti@tidorum.invalid> - 2018-08-07 22:41 +0300
Re: "Boost context" for task switching on embedded Linux on ARM George Neuner <gneuner2@comcast.net> - 2018-08-08 00:42 -0400
Re: "Boost context" for task switching on embedded Linux on ARM Niklas Holsti <niklas.holsti@tidorum.invalid> - 2018-08-08 08:21 +0300
Re: "Boost context" for task switching on embedded Linux on ARM George Neuner <gneuner2@comcast.net> - 2018-08-09 10:55 -0400
Re: "Boost context" for task switching on embedded Linux on ARM Niklas Holsti <niklas.holsti@tidorum.invalid> - 2018-08-09 22:14 +0300
Re: "Boost context" for task switching on embedded Linux on ARM George Neuner <gneuner2@comcast.net> - 2018-08-06 04:04 -0400
Re: "Boost context" for task switching on embedded Linux on ARM gp.kiwi@gmail.com - 2018-08-06 04:09 -0700
Re: "Boost context" for task switching on embedded Linux on ARM George Neuner <gneuner2@comcast.net> - 2018-08-06 12:29 -0400
csiph-web