mirror of
https://sourceware.org/git/glibc.git
synced 2026-01-06 11:51:29 +03:00
S/390: Fix uc_link == NULL handling for makecontext
This commit is contained in:
@@ -80,10 +80,10 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
|
||||
sp -= 24;
|
||||
*sp = 0;
|
||||
|
||||
/* Pass (*func) to __start_context in %r7. */
|
||||
/* Pass (*func) to __makecontext_ret in %r7. */
|
||||
ucp->uc_mcontext.gregs[7] = (long int) func;
|
||||
|
||||
/* Pass ucp->uc_link to __start_context in %r8. */
|
||||
/* Pass ucp->uc_link to __makecontext_ret in %r8. */
|
||||
ucp->uc_mcontext.gregs[8] = (long int) ucp->uc_link;
|
||||
|
||||
/* Pass address of setcontext in %r9. */
|
||||
@@ -93,12 +93,4 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
|
||||
ucp->uc_mcontext.gregs[15] = (long int) sp;
|
||||
}
|
||||
|
||||
asm (".text\n"
|
||||
".type __makecontext_ret,@function\n"
|
||||
"__makecontext_ret:\n"
|
||||
" basr %r14,%r7\n"
|
||||
" lr %r2,%r8\n"
|
||||
" br %r9\n"
|
||||
".size __makecontext_ret, .-__makecontext_ret");
|
||||
|
||||
weak_alias (__makecontext, makecontext)
|
||||
|
||||
Reference in New Issue
Block a user