Changeset d5a89a3 in mainline for uspace/lib/c/generic/setjmp.c


Ignore:
Timestamp:
2019-02-11T22:31:04Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
aaf9789c
Parents:
e3272101 (diff), 4805495 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merging with upstream/master

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/setjmp.c

    re3272101 rd5a89a3  
    3838void longjmp(jmp_buf env, int val)
    3939{
    40         /* __longjmp defined in assembly doesn't "correct" the value. */
    41         __longjmp(env, val == 0 ? 1 : val);
     40        /*
     41         * The standard requires that longjmp() ensures that val is not zero.
     42         * __context_restore doesn't do that, so we do it here.
     43         */
     44        __context_restore(env, val == 0 ? 1 : val);
    4245}
    4346
Note: See TracChangeset for help on using the changeset viewer.