Skip to content

Commit

Permalink
implement __sigsetjmp()
Browse files Browse the repository at this point in the history
__sigsetjmp() was stubbed, but we already had sigsetjmp() and __sigsetjmp()
should just be exactly the same.

After this patch, the python3 app no longer prints an annoying stub warning
at startup. control-C now also works, but weirdly - the control-C doesn't
take effect until pressing enter. I don't know why. That's an unrelated bug.

Fixes #645.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
  • Loading branch information
nyh committed Aug 29, 2018
1 parent c381595 commit 161b4a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 3 additions & 0 deletions libc/arch/aarch64/setjmp/sigsetjmp.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
* BSD license as described in the LICENSE file in the top-level directory.
*/

.global __sigsetjmp
.global _sigsetjmp
.global sigsetjmp
.type __sigsetjmp,@function
.type _sigsetjmp,@function
.type sigsetjmp,@function
__sigsetjmp:
_sigsetjmp:
sigsetjmp:
wfi
Expand Down
3 changes: 3 additions & 0 deletions libc/arch/x64/setjmp/sigsetjmp.s
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/* Copyright 2011-2012 Nicholas J. Kain, licensed under standard MIT license */
.global sigsetjmp
.global __sigsetjmp
.type sigsetjmp,@function
.type __sigsetjmp,@function
__sigsetjmp:
sigsetjmp:
andl %esi,%esi
movq %rsi,64(%rdi)
Expand Down
6 changes: 0 additions & 6 deletions libc/signal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -627,12 +627,6 @@ int sigaltstack(const stack_t *ss, stack_t *oss)
return 0;
}

extern "C" int __sigsetjmp(sigjmp_buf env, int savemask)
{
WARN_STUBBED();
return 0;
}

extern "C" int signalfd(int fd, const sigset_t *mask, int flags)
{
WARN_STUBBED();
Expand Down

0 comments on commit 161b4a1

Please sign in to comment.