RFR: 8252324: Signal related code should be shared among POSIX platforms
Coleen Phillimore
coleenp at openjdk.java.net
Mon Oct 5 23:58:40 UTC 2020
On Mon, 5 Oct 2020 19:15:15 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> This is a fresh start for https://github.com/openjdk/jdk/pull/157
>>
>> Please review this change that refactors common POSIX code into a separate
>> file.
>>
>> Currently there appears to be quite a bit of duplicated code among POSIX
>> platforms, which makes it difficult to apply single fix to the signal code.
>> With this fix, we will only need to touch single file for common POSIX
>> code fixes from now on.
>>
>> ---------
>> ### Progress
>> - [x] Change must not contain extraneous whitespace
>> - [x] Commit message must refer to an issue
>> - [ ] Change must be properly reviewed
>>
>>
>>
>> ### Download
>> `$ git fetch https://git.openjdk.java.net/jdk pull/497/head:pull/497`
>> `$ git checkout pull/497`
>
> src/hotspot/os/posix/signals_posix.hpp line 35:
>
>> 33: // Signal number used to suspend/resume a thread
>> 34: // do not use any signal number less than SIGSEGV, see 4355769
>> 35: static int SR_signum = SIGUSR2;
>
> Can you hide this in the .cpp file so that you can avoid including <signal.h> in the header file?
>
> And use forward declarations for outputStream, ucontext_t, and siginfo_t.
Note that these changes are not important enough to rerun testing for this cleanup, so you can make it a new RFE.
Thank you for doing consolidation!
-------------
PR: https://git.openjdk.java.net/jdk/pull/497
More information about the hotspot-runtime-dev
mailing list