Skip to content

Restartable syscalls on BSDs #150

@nbuwe

Description

@nbuwe

When I ported Self VM to NetBSD and FreeBSD one kludge I had to not use SA_RESTART like linux does. I didn't have time to figure out what was wrong, I might have messed up elsewhere in the Self code (cf. setAsyncIfFail and friends).

# elif TARGET_OS_VERSION == NETBSD_VERSION \
|| TARGET_OS_VERSION == FREEBSD_VERSION
// This needs to play along with setNotifyEvents and setAsync - and
// with SA_RESTART it doesn't (cf. unix.self). I'm not quite sure
// why yet. For now just commit what is known to work.
static int install_flags() { return SA_ONSTACK | SA_SIGINFO; }

This also most likely has implications for InterruptedContext::in_system_trap b/c the pc will not be pointing to the trap instruction, but past it.

This is a reminder that this issue needs further investigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions