mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
Define SIGUSR1 for hybrid Linux/Genode programs
This patch fixes the 'lx_hybrid_pthread_ipc.run' test. In order to use the 'Genode::Lock' we need to set the SIGUSR1 handler to an empty handler. Normally, this happens when creating a thread via the Genode API. But as this test creates a thread via the pthread library and thereby bypasses the Genode API, the signal handler remained unset.
This commit is contained in:
parent
21c22b8b5b
commit
4b140a5202
@ -40,6 +40,8 @@ int genode___cxa_atexit(void (*func)(void*), void *arg, void *dso)
|
||||
extern char **environ;
|
||||
extern char **lx_environ;
|
||||
|
||||
static void empty_signal_handler(int) { }
|
||||
|
||||
/*
|
||||
* This function must be called before any other static constructor in the Genode
|
||||
* application, so it gets the highest priority (lowest priority number >100)
|
||||
@ -47,6 +49,12 @@ extern char **lx_environ;
|
||||
__attribute__((constructor(101))) void lx_hybrid_init()
|
||||
{
|
||||
lx_environ = environ;
|
||||
|
||||
/*
|
||||
* Set signal handler such that canceled system calls get not
|
||||
* transparently retried after a signal gets received.
|
||||
*/
|
||||
lx_sigaction(LX_SIGUSR1, empty_signal_handler);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -158,9 +166,6 @@ namespace Genode {
|
||||
}
|
||||
|
||||
|
||||
static void empty_signal_handler(int) { }
|
||||
|
||||
|
||||
/**
|
||||
* Return Linux-specific extension of the Env::CPU session interface
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user