1 /* 2 * Copyright 2007, Axel Dörfler, axeld@pinc-software.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7 #include <errno.h> 8 #include <signal.h> 9 10 #include <syscalls.h> 11 12 13 int 14 sigaltstack(const stack_t *alternateStack, stack_t *oldAlternateStack) 15 { 16 status_t status =_kern_set_signal_stack(alternateStack, oldAlternateStack); 17 if (status < B_OK) { 18 errno = status; 19 return -1; 20 } 21 22 return 0; 23 } 24