SA_REGISTER(2)

NAME
sa_register - register a scheduler activation upcall handler

LIBRARY
libc

SYNOPSIS
#include <sa.h>
int
sa_register(sa_upcall_t new, sa_upcall_t *old, int flags, ssize_t stackinfo_offset);

DESCRIPTION
sa_register is used to prepare scheduler activation. It registers the upcall handler specified by new. If old isn't NULL, the previous handler will be returned to the location pointed by it. If SA_FLAG_STACKINFO is specified in flags, stackinfo_offset is used to locate per upcall stack memory areas shared between userland and kernel. stackinfo_offset is a byte offset from the corresponding upcall stack.

RETURN VALUES
sa_register() returns zero on success. Otherwise, a value of -1 is returned and errno is set to indicate the error.

SEE ALSO
pthread(3)