mailing list of musl libc
 help / color / mirror / code / Atom feed
616625c534ddcd184a0bcf4cba79205d5e9a538a blob 418 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 
#include <signal.h>
#include <errno.h>
#include <unistd.h>
#include "syscall.h"

int sigaltstack(const stack_t *restrict ss, stack_t *restrict old)
{
	if (ss) {
		size_t min = sysconf(_SC_MINSIGSTKSZ);
		if (!(ss->ss_flags & SS_DISABLE) && ss->ss_size < min) {
			errno = ENOMEM;
			return -1;
		}
		if (ss->ss_flags & SS_ONSTACK) {
			errno = EINVAL;
			return -1;
		}
	}
	return syscall(SYS_sigaltstack, ss, old);
}
debug log:

solving 616625c5 ...
found 616625c5 in https://git.vuxu.org/mirror/musl/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).